diff options
-rw-r--r-- | share/mk/dirdeps.mk | 17 | ||||
-rw-r--r-- | share/mk/local.gendirdeps.mk | 1 | ||||
-rw-r--r-- | share/mk/sys.mk | 5 |
3 files changed, 19 insertions, 4 deletions
diff --git a/share/mk/dirdeps.mk b/share/mk/dirdeps.mk index c3c19d2..a989f95 100644 --- a/share/mk/dirdeps.mk +++ b/share/mk/dirdeps.mk @@ -1,5 +1,5 @@ # $FreeBSD$ -# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $ +# $Id: dirdeps.mk,v 1.55 2015/10/20 22:04:53 sjg Exp $ # Copyright (c) 2010-2013, Juniper Networks, Inc. # All rights reserved. @@ -243,6 +243,21 @@ DEP_${TARGET_SPEC_VARS:[$i]} := ${_tspec:[$i]} DEP_MACHINE := ${_DEP_TARGET_SPEC} .endif +.if ${MAKEFILE:T} == ${.PARSEFILE} && empty(DIRDEPS) && ${.TARGETS:Uall:M*/*} != "" +# This little trick let's us do +# +# mk -f dirdeps.mk some/dir.${TARGET_SPEC} +# +all: +${.TARGETS:Nall}: all +DIRDEPS := ${.TARGETS:M*/*} +# so that -DNO_DIRDEPS works +DEP_RELDIR := ${DIRDEPS:R:[1]} +# disable DIRDEPS_CACHE as it does not like this trick +MK_DIRDEPS_CACHE = no +.endif + + # pickup customizations # as below you can use !target(_DIRDEP_USE) to protect things # which should only be done once. diff --git a/share/mk/local.gendirdeps.mk b/share/mk/local.gendirdeps.mk index 833ac80..a790cbc 100644 --- a/share/mk/local.gendirdeps.mk +++ b/share/mk/local.gendirdeps.mk @@ -6,6 +6,7 @@ GENDIRDEPS_HEADER= echo '\# ${FreeBSD:L:@v@$$$v$$ @:M*F*}'; # supress optional/auto dependecies # local.dirdeps.mk will put them in if necessary GENDIRDEPS_FILTER+= \ + Nbin/cat.host \ Ngnu/lib/libssp/libssp_nonshared \ Ncddl/usr.bin/ctf* \ Nlib/clang/include \ diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 4ec1a6b..6b6f847 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -19,13 +19,12 @@ MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm # Some options we need now __DEFAULT_NO_OPTIONS= \ - DIRDEPS_CACHE \ DIRDEPS_BUILD \ - META_MODE \ - + DIRDEPS_CACHE __DEFAULT_DEPENDENT_OPTIONS= \ AUTO_OBJ/DIRDEPS_BUILD \ + META_MODE/DIRDEPS_BUILD \ STAGING/DIRDEPS_BUILD \ SYSROOT/DIRDEPS_BUILD |