summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbdrewery <bdrewery@FreeBSD.org>2016-04-14 21:06:10 +0000
committerbdrewery <bdrewery@FreeBSD.org>2016-04-14 21:06:10 +0000
commitb40d5fe0a7b8550ca5f6cfb5e750e946b12b1dcb (patch)
tree8aaa286b7ad01438e74918c3c600dd2e1609dfc1
parentc027e2497fa58d9f68775e67f319f8d69b3d849d (diff)
downloadFreeBSD-src-b40d5fe0a7b8550ca5f6cfb5e750e946b12b1dcb.zip
FreeBSD-src-b40d5fe0a7b8550ca5f6cfb5e750e946b12b1dcb.tar.gz
META_MODE: Don't rebuild build-tools targets during normal build.
This avoids 'build command changed' due to CFLAGS/CC changes during the normal build. Without this the build-tools targets end up rebuilding for the *target* rather than keeping the native versions built in build-tools. Sponsored by: EMC / Isilon Storage Division
-rw-r--r--Makefile.inc14
-rw-r--r--Makefile.libcompat4
-rw-r--r--bin/csh/Makefile2
-rw-r--r--bin/sh/Makefile6
-rw-r--r--lib/libmagic/Makefile2
-rw-r--r--lib/ncurses/ncurses/Makefile4
-rw-r--r--share/syscons/scrnmaps/Makefile2
-rw-r--r--usr.bin/awk/Makefile2
-rw-r--r--usr.bin/mkcsmapper_static/Makefile2
-rw-r--r--usr.bin/mkesdb_static/Makefile2
-rw-r--r--usr.bin/vi/catalog/Makefile2
11 files changed, 22 insertions, 10 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 4c60536..7d0238f 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -296,6 +296,10 @@ CROSSENV+= MAKEOBJDIRPREFIX=${OBJTREE} \
MACHINE_ARCH=${TARGET_ARCH} \
MACHINE=${TARGET} \
CPUTYPE=${TARGET_CPUTYPE}
+.if ${MK_META_MODE} != "no"
+# Don't rebuild build-tools targets during normal build.
+CROSSENV+= BUILD_TOOLS_META=.NOMETA_CMP
+.endif
.if ${MK_GROFF} != "no"
CROSSENV+= GROFF_BIN_PATH=${WORLDTMP}/legacy/usr/bin \
GROFF_FONT_PATH=${WORLDTMP}/legacy/usr/share/groff_font \
diff --git a/Makefile.libcompat b/Makefile.libcompat
index 2c15a9b..560a50c 100644
--- a/Makefile.libcompat
+++ b/Makefile.libcompat
@@ -88,6 +88,10 @@ LIBCOMPATWMAKEENV+= MAKEOBJDIRPREFIX=${LIBCOMPAT_OBJTREE} \
LIBDIR=/usr/lib${libcompat} \
SHLIBDIR=/usr/lib${libcompat} \
DTRACE="${LIB$COMPATDTRACE:U${DTRACE}}"
+.if ${MK_META_MODE} != "no"
+# Don't rebuild build-tools targets during normal build.
+LIBCOMPATWMAKEENV+= BUILD_TOOLS_META=.NOMETA_CMP
+.endif
LIBCOMPATWMAKEFLAGS+= CC="${XCC} ${LIBCOMPATCFLAGS}" \
CXX="${XCXX} ${LIBCOMPATCFLAGS} ${LIBCOMPATCXXFLAGS}" \
DESTDIR=${LIBCOMPATTMP} \
diff --git a/bin/csh/Makefile b/bin/csh/Makefile
index 2c9ae22..f55f241 100644
--- a/bin/csh/Makefile
+++ b/bin/csh/Makefile
@@ -109,7 +109,7 @@ csh.1: tcsh.man
build-tools: gethost
-gethost: gethost.c sh.err.h tc.const.h sh.h
+gethost: gethost.c sh.err.h tc.const.h sh.h ${BUILD_TOOLS_META}
@rm -f ${.TARGET}
${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
${TCSHDIR}/gethost.c
diff --git a/bin/sh/Makefile b/bin/sh/Makefile
index 3f28a12..e6d1d83 100644
--- a/bin/sh/Makefile
+++ b/bin/sh/Makefile
@@ -44,10 +44,10 @@ builtins.c builtins.h: mkbuiltins builtins.def
# XXX this is just to stop the default .c rule being used, so that the
# intermediate object has a fixed name.
# XXX we have a default .c rule, but no default .o rule.
-.o:
+mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
-mknodes: mknodes.o
-mksyntax: mksyntax.o
+mknodes: mknodes.o ${BUILD_TOOLS_META}
+mksyntax: mksyntax.o ${BUILD_TOOLS_META}
.ORDER: nodes.c nodes.h
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile
index 2add1d3..6baacc8 100644
--- a/lib/libmagic/Makefile
+++ b/lib/libmagic/Makefile
@@ -39,7 +39,7 @@ magic.mgc: mkmagic magic
CLEANFILES+= mkmagic
build-tools: mkmagic
-mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c
+mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${BUILD_TOOLS_META}
${CC} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} ${.ALLSRC} \
${LDADD}
diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile
index fc55bfe..f5405e8 100644
--- a/lib/ncurses/ncurses/Makefile
+++ b/lib/ncurses/ncurses/Makefile
@@ -389,10 +389,10 @@ keys.list: MKkeys_list.sh Caps
# Build tools
build-tools: make_hash make_keys
-make_keys: make_keys.c names.c ncurses_def.h ${HEADERS}
+make_keys: make_keys.c names.c ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META}
${CC} -o $@ ${CFLAGS} ${NCURSES_DIR}/ncurses/tinfo/make_keys.c
-make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS}
+make_hash: make_hash.c hashsize.h ncurses_def.h ${HEADERS} ${BUILD_TOOLS_META}
${CC} -o $@ ${CFLAGS} -DMAIN_PROGRAM \
${NCURSES_DIR}/ncurses/tinfo/make_hash.c
diff --git a/share/syscons/scrnmaps/Makefile b/share/syscons/scrnmaps/Makefile
index 1c5dc88..1e14e50 100644
--- a/share/syscons/scrnmaps/Makefile
+++ b/share/syscons/scrnmaps/Makefile
@@ -19,7 +19,7 @@ ${SCRMAPS}: ${.TARGET:R}.mk
uuencode ${.TARGET:R}.tmp ${.TARGET:R} > ${.TARGET}
rm -f ${.TARGET:R}.tmp
-${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c
+${SCRMAPS_MK}: ${.TARGET:R} mkscrfil.c ${BUILD_TOOLS_META}
${CC} ${CFLAGS} -I${.CURDIR} -DFIL=\"${.TARGET:R}\" ${LDFLAGS} \
-o ${.TARGET} ${.CURDIR}/mkscrfil.c
diff --git a/usr.bin/awk/Makefile b/usr.bin/awk/Makefile
index 80ca5db..e2e2758 100644
--- a/usr.bin/awk/Makefile
+++ b/usr.bin/awk/Makefile
@@ -24,6 +24,6 @@ proctab.c: maketab
./maketab > proctab.c
build-tools: maketab
-maketab: ytab.h ${AWKSRC}/maketab.c
+maketab: ytab.h ${AWKSRC}/maketab.c ${BUILD_TOOLS_META}
.include <bsd.prog.mk>
diff --git a/usr.bin/mkcsmapper_static/Makefile b/usr.bin/mkcsmapper_static/Makefile
index 21014e9..a416b20 100644
--- a/usr.bin/mkcsmapper_static/Makefile
+++ b/usr.bin/mkcsmapper_static/Makefile
@@ -13,3 +13,5 @@ build-tools: mkcsmapper_static
.include "${.CURDIR}/../mkcsmapper/Makefile.inc"
.include <bsd.prog.mk>
+
+${PROG}: ${BUILD_TOOLS_META}
diff --git a/usr.bin/mkesdb_static/Makefile b/usr.bin/mkesdb_static/Makefile
index 2696a23..9ce0209 100644
--- a/usr.bin/mkesdb_static/Makefile
+++ b/usr.bin/mkesdb_static/Makefile
@@ -13,3 +13,5 @@ build-tools: mkesdb_static
.include "${.CURDIR}/../mkesdb/Makefile.inc"
.include <bsd.prog.mk>
+
+${PROG}: ${BUILD_TOOLS_META}
diff --git a/usr.bin/vi/catalog/Makefile b/usr.bin/vi/catalog/Makefile
index e2ca579..d2c349a 100644
--- a/usr.bin/vi/catalog/Makefile
+++ b/usr.bin/vi/catalog/Makefile
@@ -100,7 +100,7 @@ english.base: dump ${SCAN} #Makefile
sort -nu > $@
-dump: dump.c
+dump: dump.c ${BUILD_TOOLS_META}
${CC} -o ${.TARGET} ${.ALLSRC}
CLEANFILES+= dump ${CAT} english.base *.check __ck1 __ck2
OpenPOWER on IntegriCloud