summaryrefslogtreecommitdiffstats
path: root/share/mk/local.gendirdeps.mk
diff options
context:
space:
mode:
authorsjg <sjg@FreeBSD.org>2015-06-13 19:20:56 +0000
committersjg <sjg@FreeBSD.org>2015-06-13 19:20:56 +0000
commit008d7c831feeec7a3430b92f009e28762c6740f1 (patch)
tree224d8be23eae518123c5b6db18c9819fe6ac6c62 /share/mk/local.gendirdeps.mk
parent9c7d3132bfe16d56cf42cff4126ecc32c4dbc2a9 (diff)
parenta4e18934b74c201653c0142376816d9d840a5ced (diff)
downloadFreeBSD-src-008d7c831feeec7a3430b92f009e28762c6740f1.zip
FreeBSD-src-008d7c831feeec7a3430b92f009e28762c6740f1.tar.gz
Add META_MODE support.
Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp
Diffstat (limited to 'share/mk/local.gendirdeps.mk')
-rw-r--r--share/mk/local.gendirdeps.mk50
1 files changed, 50 insertions, 0 deletions
diff --git a/share/mk/local.gendirdeps.mk b/share/mk/local.gendirdeps.mk
new file mode 100644
index 0000000..024e1cb
--- /dev/null
+++ b/share/mk/local.gendirdeps.mk
@@ -0,0 +1,50 @@
+# $FreeBSD$
+
+# we need a keyword, this noise is to prevent it being expanded
+GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @} ';
+
+# supress optional/auto dependecies
+# local.dirdeps.mk will put them in if necessary
+GENDIRDEPS_FILTER+= \
+ Ngnu/lib/libssp/libssp_nonshared \
+ Ncddl/usr.bin/ctf* \
+ Nlib/clang/include \
+ Nlib/libc_nonshared \
+ Ntargets/pseudo/stage* \
+ Ntools/*
+
+.if ${RELDIR:Mtargets*} == ""
+.if ${RELDIR:Nusr.bin/clang/*:Ngnu/usr.bin/cc/*:Nlib/clang*} != ""
+GENDIRDEPS_FILTER.host+= \
+ Nusr.bin/clang/* \
+ Ngnu/usr.bin/cc/* \
+
+.endif
+GENDIRDEPS_FILTER+= \
+ Nusr.bin/clang/clang.host \
+ Ngnu/usr.bin/cc* \
+ Ngnu/usr.bin/binutils*.host \
+
+.endif
+
+GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER.${MACHINE}:U}
+
+# gendirdeps.mk will turn _{VAR} into ${VAR} which keeps this simple
+# order of this list matters!
+GENDIRDEPS_FILTER_DIR_VARS+= \
+ CSU_DIR \
+ BOOT_MACHINE_DIR
+
+# order of this list matters!
+GENDIRDEPS_FILTER_VARS+= \
+ KERNEL_NAME \
+ MACHINE_CPUARCH \
+ MACHINE_ARCH \
+ MACHINE
+
+GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_DIR_VARS:@v@S,${$v},_{${v}},@}
+GENDIRDEPS_FILTER+= ${GENDIRDEPS_FILTER_VARS:@v@S,/${$v}/,/_{${v}}/,@:NS,//,*:u}
+
+# handle the non-standard way that gnu/usr.bin/groff/tmac is staged
+GENDIRDEPS_FILTER+= C,.*usr/share/tmac.*stage,gnu/usr.bin/groff/tmac,
+
OpenPOWER on IntegriCloud