Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Nov 2011 18:11:49 +0000 (UTC)
From:      Max Khon <fjoe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228158 - in head: . share/mk sys/conf
Message-ID:  <201111301811.pAUIBnr6008539@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fjoe
Date: Wed Nov 30 18:11:49 2011
New Revision: 228158
URL: http://svn.freebsd.org/changeset/base/228158

Log:
  - CTF knob is now implemented using common scheme: MK_CTF=yes/no is
  defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF,
  NO_CTF overrides WITH_CTF (used by Makefile.inc1)
  - CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string
  if make(1) can handle empty commands

Modified:
  head/Makefile.inc1
  head/share/mk/bsd.lib.mk
  head/share/mk/bsd.own.mk
  head/share/mk/bsd.prog.mk
  head/sys/conf/kern.post.mk
  head/sys/conf/kern.pre.mk
  head/sys/conf/kmod.mk

Modified: head/Makefile.inc1
==============================================================================
--- head/Makefile.inc1	Wed Nov 30 18:07:38 2011	(r228157)
+++ head/Makefile.inc1	Wed Nov 30 18:11:49 2011	(r228158)
@@ -59,8 +59,6 @@ SUBDIR+=games
 .endif
 .if ${MK_CDDL} != "no"
 SUBDIR+=cddl
-.else
-NO_CTF=1
 .endif
 SUBDIR+=gnu include
 .if ${MK_KERBEROS} != "no"

Modified: head/share/mk/bsd.lib.mk
==============================================================================
--- head/share/mk/bsd.lib.mk	Wed Nov 30 18:07:38 2011	(r228157)
+++ head/share/mk/bsd.lib.mk	Wed Nov 30 18:11:49 2011	(r228158)
@@ -36,7 +36,7 @@ NO_WERROR=
 .if defined(DEBUG_FLAGS)
 CFLAGS+= ${DEBUG_FLAGS}
 
-.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "")
+.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
 CTFFLAGS+= -g
 .endif
 .endif
@@ -186,7 +186,7 @@ ${SHLIB_NAME}: ${SOBJS}
 	    -o ${.TARGET} -Wl,-soname,${SONAME} \
 	    `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
 .endif
-.if defined(WITH_CTF)
+.if ${MK_CTF} != "no"
 	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS}
 .endif
 .endif

Modified: head/share/mk/bsd.own.mk
==============================================================================
--- head/share/mk/bsd.own.mk	Wed Nov 30 18:07:38 2011	(r228157)
+++ head/share/mk/bsd.own.mk	Wed Nov 30 18:11:49 2011	(r228158)
@@ -189,12 +189,6 @@ STRIP?=		-s
 COMPRESS_CMD?=	gzip -cn
 COMPRESS_EXT?=	.gz
 
-.if defined(WITH_CTF)
-CTFCONVERT_CMD=	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
-.else
-CTFCONVERT_CMD=	@:
-.endif
-
 .if !defined(_WITHOUT_SRCCONF)
 #
 # Define MK_* variables (which are either "yes" or "no") for users
@@ -209,6 +203,7 @@ CTFCONVERT_CMD=	@:
 # regardless of user's setting).
 #
 .for var in \
+    CTF \
     INSTALLLIB \
     MAN \
     PROFILE
@@ -418,6 +413,7 @@ __DEFAULT_NO_OPTIONS = \
     BIND_LIBS \
     BIND_SIGCHASE \
     BIND_XML \
+    CTF \
     HESIOD \
     ICONV \
     IDEA \
@@ -516,6 +512,7 @@ MK_BIND_ETC:=	no
 
 .if ${MK_CDDL} == "no"
 MK_ZFS:=	no
+MK_CTF:=	no
 .endif
 
 .if ${MK_CRYPT} == "no"
@@ -616,6 +613,14 @@ MK_${vv:H}:=	${MK_${vv:T}}
 .endif
 .endfor
 
+.if ${MK_CTF} != "no"
+CTFCONVERT_CMD=	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+.elif ${MAKE_VERSION} >= 5201111300
+CTFCONVERT_CMD=
+.else
+CTFCONVERT_CMD=	@:
+.endif 
+
 .endif # !_WITHOUT_SRCCONF
 
 .endif	# !target(__<bsd.own.mk>__)

Modified: head/share/mk/bsd.prog.mk
==============================================================================
--- head/share/mk/bsd.prog.mk	Wed Nov 30 18:07:38 2011	(r228157)
+++ head/share/mk/bsd.prog.mk	Wed Nov 30 18:11:49 2011	(r228158)
@@ -19,7 +19,7 @@ NO_WERROR=
 CFLAGS+=${DEBUG_FLAGS}
 CXXFLAGS+=${DEBUG_FLAGS}
 
-.if defined(WITH_CTF) && (${DEBUG_FLAGS:M-g} != "")
+.if ${MK_CTF} != "no" && ${DEBUG_FLAGS:M-g} != ""
 CTFFLAGS+= -g
 .endif
 .endif
@@ -55,7 +55,7 @@ ${PROG}: ${OBJS}
 .else
 	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
 .endif
-.if defined(WITH_CTF)
+.if ${MK_CTF} != "no"
 	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
 .endif
 
@@ -85,7 +85,7 @@ ${PROG}: ${OBJS}
 .else
 	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
 .endif
-.if defined(WITH_CTF)
+.if ${MK_CTF} != "no"
 	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
 .endif
 .endif

Modified: head/sys/conf/kern.post.mk
==============================================================================
--- head/sys/conf/kern.post.mk	Wed Nov 30 18:07:38 2011	(r228157)
+++ head/sys/conf/kern.post.mk	Wed Nov 30 18:11:49 2011	(r228158)
@@ -94,7 +94,7 @@ ${FULLKERNEL}: ${SYSTEM_DEP} vers.o
 	@rm -f ${.TARGET}
 	@echo linking ${.TARGET}
 	${SYSTEM_LD}
-.if defined(WITH_CTF)
+.if ${MK_CTF} != "no"
 	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o
 .endif
 .if !defined(DEBUG)
@@ -249,7 +249,7 @@ kernel-reinstall:
 
 config.o env.o hints.o vers.o vnode_if.o:
 	${NORMAL_C}
-	@${NORMAL_CTFCONVERT}
+	${NORMAL_CTFCONVERT}
 
 config.ln env.ln hints.ln vers.ln vnode_if.ln:
 	${NORMAL_LINT}

Modified: head/sys/conf/kern.pre.mk
==============================================================================
--- head/sys/conf/kern.pre.mk	Wed Nov 30 18:07:38 2011	(r228157)
+++ head/sys/conf/kern.pre.mk	Wed Nov 30 18:11:49 2011	(r228158)
@@ -123,10 +123,12 @@ NORMAL_C_NOWERROR= ${CC} -c ${CFLAGS} ${
 NORMAL_M= ${AWK} -f $S/tools/makeobjops.awk ${.IMPSRC} -c ; \
 	  ${CC} -c ${CFLAGS} ${WERROR} ${PROF} ${.PREFIX}.c
 
-.if defined(WITH_CTF)
+.if ${MK_CTF} != "no"
 NORMAL_CTFCONVERT=	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+.elif ${MAKE_VERSION} >= 5201111300
+NORMAL_CTFCONVERT=
 .else
-NORMAL_CTFCONVERT=	:
+NORMAL_CTFCONVERT=	@:
 .endif
 
 NORMAL_LINT=	${LINT} ${LINTFLAGS} ${CFLAGS:M-[DIU]*} ${.IMPSRC}

Modified: head/sys/conf/kmod.mk
==============================================================================
--- head/sys/conf/kmod.mk	Wed Nov 30 18:07:38 2011	(r228157)
+++ head/sys/conf/kmod.mk	Wed Nov 30 18:11:49 2011	(r228158)
@@ -201,7 +201,7 @@ ${KMOD}.kld: ${OBJS}
 ${FULLPROG}: ${OBJS}
 .endif
 	${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS}
-.if defined(WITH_CTF)
+.if ${MK_CTF} != "no"
 	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
 .endif
 .if defined(EXPORT_SYMS)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111301811.pAUIBnr6008539>