Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Apr 2006 03:01:30 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 95469 for review
Message-ID:  <200604180301.k3I31UCH072557@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95469

Change 95469 by jb@jb_freebsd2 on 2006/04/18 03:01:16

	Move the CTF definitions into sys.mk and add the ones for CTFMERGE.
	
	This means that more cases are added by default because sys.mk is
	always included by BSD make by default.
	
	The side effect (I think) is that ports which use the BSD make are
	going to get CTF symbols whether they like it or not. Obviously the
	ports don't know to specify NO_CTF to make.

Affected files ...

.. //depot/projects/dtrace/src/share/mk/bsd.lib.mk#3 edit
.. //depot/projects/dtrace/src/share/mk/bsd.prog.mk#3 edit
.. //depot/projects/dtrace/src/share/mk/sys.mk#3 edit

Differences ...

==== //depot/projects/dtrace/src/share/mk/bsd.lib.mk#3 (text+ko) ====

@@ -4,18 +4,6 @@
 
 .include <bsd.init.mk>
 
-# C Type Format data is required for DTrace
-CTFFLAGS=-L VERSION
-
-.if !defined(NO_CTF)
-CTFCONVERT?=ctfconvert
-.if defined(DEBUG_FLAGS)
-CTFFLAGS+=-g
-.else
-DEBUG_FLAGS=-g
-.endif
-.endif
-
 # Set up the variables controlling shared libraries.  After this section,
 # SHLIB_NAME will be defined only if we are to create a shared library.
 # SHLIB_LINK will be defined only if we are to create a link to it.

==== //depot/projects/dtrace/src/share/mk/bsd.prog.mk#3 (text+ko) ====

@@ -10,18 +10,6 @@
 CFLAGS+=${COPTS}
 .endif
 
-# C Type Format data is required for DTrace
-CTFFLAGS=-L VERSION
-
-.if !defined(NO_CTF)
-CTFCONVERT?=ctfconvert
-.if defined(DEBUG_FLAGS)
-CTFFLAGS+=-g
-.else
-DEBUG_FLAGS=-g
-.endif
-.endif
-
 .if defined(DEBUG_FLAGS)
 CFLAGS+=${DEBUG_FLAGS}
 .endif
@@ -59,6 +47,9 @@
 .else
 	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
 .endif
+.if defined(CTFMERGE)
+	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
+.endif
 
 .else	# !defined(SRCS)
 
@@ -82,6 +73,9 @@
 .else
 	${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
 .endif
+.if defined(CTFMERGE)
+	${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${OBJS}
+.endif
 .endif
 
 .endif

==== //depot/projects/dtrace/src/share/mk/sys.mk#3 (text+ko) ====

@@ -40,6 +40,19 @@
 CFLAGS		?=	-O2 -fno-strict-aliasing -pipe
 .endif
 
+# C Type Format data is required for DTrace
+CTFFLAGS	?=	-L VERSION
+
+.if !defined(NO_CTF)
+CTFCONVERT	?=	ctfconvert
+CTFMERGE	?=	ctfmerge
+.if defined(DEBUG_FLAGS)
+CTFFLAGS	+=	-g
+.else
+DEBUG_FLAGS	=	-g
+.endif
+.endif
+
 CXX		?=	c++
 CXXFLAGS	?=	${CFLAGS:N-std=*:N-Wnested-externs:N-W*-prototypes}
 
@@ -286,22 +299,34 @@
 
 .s.out .c.out .o.out:
 	${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
+.if defined(CTFCONVERT)
+	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+.endif
 
 .f.out .F.out .r.out .e.out:
 	${FC} ${EFLAGS} ${RFLAGS} ${FFLAGS} ${LDFLAGS} ${.IMPSRC} \
 	    ${LDLIBS} -o ${.TARGET}
 	rm -f ${.PREFIX}.o
+.if defined(CTFCONVERT)
+	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+.endif
 
 # XXX not -j safe
 .y.out:
 	${YACC} ${YFLAGS} ${.IMPSRC}
 	${CC} ${CFLAGS} ${LDFLAGS} y.tab.c ${LDLIBS} -ly -o ${.TARGET}
 	rm -f y.tab.c
+.if defined(CTFCONVERT)
+	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+.endif
 
 .l.out:
 	${LEX} -t ${LFLAGS} ${.IMPSRC} > ${.PREFIX}.tmp.c
 	${CC} ${CFLAGS} ${LDFLAGS} ${.PREFIX}.tmp.c ${LDLIBS} -ll -o ${.TARGET}
 	rm -f ${.PREFIX}.tmp.c
+.if defined(CTFCONVERT)
+	${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+.endif
 
 # FreeBSD build pollution.  Hide it in the non-POSIX part of the ifdef.
 __MAKE_CONF?=/etc/make.conf



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