aboutsummaryrefslogtreecommitdiff
path: root/share/mk/bsd.lib.mk
diff options
context:
space:
mode:
authorMax Khon <fjoe@FreeBSD.org>2011-11-29 16:34:44 +0000
committerMax Khon <fjoe@FreeBSD.org>2011-11-29 16:34:44 +0000
commit78e7e3ecb5c1043a8d580f0f6cf4cf6b5b1a15f9 (patch)
treeef01e11f9b000a3be27c28fc99c8e771f661a104 /share/mk/bsd.lib.mk
parentcf1911a9ad8b07e46ac2368091cb9d72ec3fe48f (diff)
downloadsrc-78e7e3ecb5c1043a8d580f0f6cf4cf6b5b1a15f9.tar.gz
src-78e7e3ecb5c1043a8d580f0f6cf4cf6b5b1a15f9.zip
- fix WITH_CTF when specified in /etc/src.conf [1]
- CTFCONVERT_CMD=... is a hack (should be defined to empty string instead): make(1) should be taught to ignore empty commands silently in compat mode (as it does in !compat mode, GNU make also silently ignores empty commands) and to skip printing empty commands in !compat mode - config(8) should generate ${NORMAL_CTFCONVERT} invocation without '@': this will allow to simplify kern.pre.mk even more and lessen the number of shell invocations during kernel build when CTF is turned off - WITH_CTF can now be converted to usual MK_CTF=yes/no infrastructure Pointy hat to: fjoe [1]
Notes
Notes: svn path=/head/; revision=228137
Diffstat (limited to 'share/mk/bsd.lib.mk')
-rw-r--r--share/mk/bsd.lib.mk49
1 files changed, 12 insertions, 37 deletions
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index 6132a757b220..a575536a4ae7 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -33,15 +33,10 @@ CFLAGS+= -DNDEBUG
NO_WERROR=
.endif
-# Enable CTF conversion on request.
-.if defined(WITH_CTF)
-.undef NO_CTF
-.endif
-
.if defined(DEBUG_FLAGS)
CFLAGS+= ${DEBUG_FLAGS}
-.if !defined(NO_CTF) && (${DEBUG_FLAGS:M-g} != "")
+.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "")
CTFFLAGS+= -g
.endif
.endif
@@ -69,21 +64,15 @@ PO_FLAG=-pg
.c.o:
${CC} ${STATIC_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
- @[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \
- (${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET})
+ ${CTFCONVERT_CMD}
.c.po:
${CC} ${PO_FLAG} ${STATIC_CFLAGS} ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.c.So:
${CC} ${PICFLAG} -DPIC ${SHARED_CFLAGS} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.cc.o:
${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@@ -96,47 +85,33 @@ PO_FLAG=-pg
.f.po:
${FC} -pg ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.f.So:
${FC} ${PICFLAG} -DPIC ${FFLAGS} -o ${.TARGET} -c ${.IMPSRC}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.s.po .s.So:
${AS} ${AFLAGS} -o ${.TARGET} ${.IMPSRC}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.asm.po:
${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.asm.So:
${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.S.po:
${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
.S.So:
${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
-.if !defined(NO_CTF)
- ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.endif
+ ${CTFCONVERT_CMD}
all: objwarn
@@ -211,7 +186,7 @@ ${SHLIB_NAME}: ${SOBJS}
-o ${.TARGET} -Wl,-soname,${SONAME} \
`NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
.endif
-.if !defined(NO_CTF)
+.if defined(WITH_CTF)
${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
.endif
.endif