Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/mk Wrap CTFCONVERT invocations in ${defined(CTFCONVERT...



details:   https://anonhg.NetBSD.org/src/rev/9bb3bfcdaa0d
branches:  trunk
changeset: 798024:9bb3bfcdaa0d
user:      apb <apb%NetBSD.org@localhost>
date:      Wed Aug 06 15:23:48 2014 +0000

description:
Wrap CTFCONVERT invocations in ${defined(CTFCONVERT):? ... :}
so it performs the test at the time the rule is invoked.  We can't
use a ".if defined" test because that would be tested at the time the
sys.mk file is parsed, which may be before CTFCONVERT has been set by
bsd.own.mk.

Remove the now-unnecessary assignment "CTFCONVERT ?= : ctfconvert",
and the similar assignment to CTFMERGE.  Now the build logs are not
cluttered by many unnecessary invocations of the ": ctfconvert ..."

diffstat:

 share/mk/sys.mk |  35 +++++++++++++++--------------------
 1 files changed, 15 insertions(+), 20 deletions(-)

diffs (121 lines):

diff -r ccffdab648fc -r 9bb3bfcdaa0d share/mk/sys.mk
--- a/share/mk/sys.mk   Wed Aug 06 15:23:07 2014 +0000
+++ b/share/mk/sys.mk   Wed Aug 06 15:23:48 2014 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: sys.mk,v 1.125 2014/06/29 05:20:15 tsutsui Exp $
+#      $NetBSD: sys.mk,v 1.126 2014/08/06 15:23:48 apb Exp $
 #      @(#)sys.mk      8.2 (Berkeley) 3/21/94
 #
 # This file contains the basic rules for make(1) and is read first
@@ -47,11 +47,6 @@
 # Use only one thread for now.
 CTFMFLAGS      ?=      -S 1 -g -t -L VERSION
 
-# We have to define these here, because if we don't the rules below will
-# not work
-CTFCONVERT     ?=      : ctfconvert
-CTFMERGE       ?=      : ctfmerge
-
 CXX?=          c++
 CXXFLAGS?=     ${CFLAGS:N-Wno-traditional:N-Wstrict-prototypes:N-Wmissing-prototypes:N-Wno-pointer-sign:N-ffreestanding:N-std=gnu[0-9][0-9]:N-Wold-style-definition:N-Wno-format-zero-length}
 
@@ -118,10 +113,10 @@
 .c:
        ${LINK.c} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
 # XXX: disable for now
-#      ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+#      ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .c.o:
        ${COMPILE.c} ${.IMPSRC}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .c.a:
        ${COMPILE.c} ${.IMPSRC}
        ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
@@ -146,7 +141,7 @@
        ${LINK.f} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
 .f.o:
        ${COMPILE.f} ${.IMPSRC}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .f.a:
        ${COMPILE.f} ${.IMPSRC}
        ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
@@ -154,10 +149,10 @@
 
 .F:
        ${LINK.F} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .F.o:
        ${COMPILE.F} ${.IMPSRC}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .F.a:
        ${COMPILE.F} ${.IMPSRC}
        ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
@@ -167,7 +162,7 @@
        ${LINK.r} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
 .r.o:
        ${COMPILE.r} ${.IMPSRC}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .r.a:
        ${COMPILE.r} ${.IMPSRC}
        ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
@@ -176,10 +171,10 @@
 # Pascal
 .p:
        ${LINK.p} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .p.o:
        ${COMPILE.p} ${.IMPSRC}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .p.a:
        ${COMPILE.p} ${.IMPSRC}
        ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
@@ -188,20 +183,20 @@
 # Assembly
 .s:
        ${LINK.s} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .s.o:
        ${COMPILE.s} ${.IMPSRC}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .s.a:
        ${COMPILE.s} ${.IMPSRC}
        ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
        rm -f ${.PREFIX}.o
 .S:
        ${LINK.S} -o ${.TARGET} ${.IMPSRC} ${LDLIBS}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .S.o:
        ${COMPILE.S} ${.IMPSRC}
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
 .S.a:
        ${COMPILE.S} ${.IMPSRC}
        ${AR} ${ARFLAGS} ${.TARGET} ${.PREFIX}.o
@@ -218,7 +213,7 @@
 .l.o:
        ${LEX.l} ${.IMPSRC}
        ${COMPILE.c} -o ${.TARGET} lex.yy.c
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
        rm -f lex.yy.c
 
 # Yacc
@@ -232,7 +227,7 @@
 .y.o:
        ${YACC.y} ${.IMPSRC}
        ${COMPILE.c} -o ${.TARGET} y.tab.c
-       ${CTFCONVERT} ${CTFFLAGS} ${.TARGET}
+       ${defined(CTFCONVERT):?${CTFCONVERT} ${CTFFLAGS} ${.TARGET}:}
        rm -f y.tab.c
 
 # Shell



Home | Main Index | Thread Index | Old Index