Default MK_META_MODE from MK_DIRDEPS_BUILD

This allows most of the build to simply consider MK_META_MODE

Update to latest dirdeps.mk so we can do:

make -f dirdeps.mk bin/cat.i386

Reviewed by:	bdrewery
This commit is contained in:
Simon J. Gerraty 2015-11-16 22:50:23 +00:00
parent 6775148717
commit dba62d8dcf
3 changed files with 19 additions and 4 deletions

View File

@ -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.

View File

@ -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 \

View File

@ -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