summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.dep.mk
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2012-10-06 20:01:05 +0000
committermarcel <marcel@FreeBSD.org>2012-10-06 20:01:05 +0000
commit52e7fd7c5436658853af57ebcba4109961c9126c (patch)
tree70de730ba0fbf9e81dd585c1575a057d03a31be8 /share/mk/bsd.dep.mk
parentb84b597f7acedbe94a9dac4963137a33677e7e19 (diff)
downloadFreeBSD-src-52e7fd7c5436658853af57ebcba4109961c9126c.zip
FreeBSD-src-52e7fd7c5436658853af57ebcba4109961c9126c.tar.gz
Add support for bmake. This includes:
1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE, there's a bootstrap complication in ths respect. Avoid it. Make the necessary changes to have upgrade_checks work wth bmake anyway. 2. Remove the use of -E. It's not needed in our build because we use ?= for the respective variables, which means that we'll take the environment value (if any) anyway. 3. Properly declare phony targets as phony as bmake is a lot smarter (and thus agressive) about build avoidance. 4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot smarter about build avoidance and should not find files we generate in the source tree. We should not have files in the repository we want to generate, but this is an easier way to cross this hurdle. 5. Have behavior under bmake the same as it is under make with respect to halting when sub-commands fail. Add "set -e" to compound commands so that bmake is informed when sub-commands fail. 6. Make sure crunchgen uses the same make as the rest of the build. This is important when the make utility isn't called make (but bmake for example). 7. While here, add support for using MAKEOBJDIR to set the object tree location. It's the second alternative bmake looks for when determining the actual object directory (= .OBJDIR). Submitted by: Simon Gerraty <sjg@juniper.net> Submitted by: John Van Horne <jvanhorne@juniper.net>
Diffstat (limited to 'share/mk/bsd.dep.mk')
-rw-r--r--share/mk/bsd.dep.mk7
1 files changed, 5 insertions, 2 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk
index 5e4ec0b..deac736 100644
--- a/share/mk/bsd.dep.mk
+++ b/share/mk/bsd.dep.mk
@@ -102,8 +102,8 @@ ${_YC} y.tab.h: ${_YSRC}
CLEANFILES+= y.tab.c y.tab.h
.elif !empty(YFLAGS:M-d)
.for _YH in ${_YC:R}.h
-.ORDER: ${_YC} ${_YH}
-${_YC} ${_YH}: ${_YSRC}
+${_YH}: ${_YC}
+${_YC}: ${_YSRC}
${YACC} ${YFLAGS} -o ${_YC} ${.ALLSRC}
SRCS+= ${_YH}
CLEANFILES+= ${_YH}
@@ -123,6 +123,9 @@ ${_YC:R}.o: ${_YC}
.if defined(SRCS)
depend: beforedepend ${DEPENDFILE} afterdepend
+# Tell bmake not to look for generated files via .PATH
+.NOPATH: ${DEPENDFILE}
+
# Different types of sources are compiled with slightly different flags.
# Split up the sources, and filter out headers and non-applicable flags.
MKDEP_CFLAGS= ${CFLAGS:M-nostdinc*} ${CFLAGS:M-[BIDU]*} ${CFLAGS:M-std=*} \
OpenPOWER on IntegriCloud