Apply DEP_DIRDEPS_FILTER.${DEP_MACHINE} as needed.

Use DEP_DIRDEPS_FILTER.host to supress dependencies for host tools.
This commit is contained in:
Simon J. Gerraty 2013-03-12 17:21:03 +00:00
parent 7cf3a1c6b2
commit 00140433d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/bmake/; revision=248211
2 changed files with 16 additions and 10 deletions

View File

@ -1,13 +1,3 @@
.if !target(_DIRDEP_USE)
# first time read
.if ${MACHINE} == "host"
DIRDEPS_FILTER+= \
Ninclude* \
Nlib/* \
Ngnu/lib/* \
.endif
.endif
# this is how we can handle optional dependencies
.if ${MK_SSP:Uno} != "no" && defined(PROG)
@ -18,3 +8,15 @@ DIRDEPS += gnu/lib/libssp/libssp_nonshared
.if ${DEP_RELDIR:U${RELDIR}} != "pkgs/pseudo/stage"
DIRDEPS += pkgs/pseudo/stage
.endif
# we want to supress these dependencies for host tools
DEP_DIRDEPS_FILTER.host = \
Ninclude* \
Nlib/* \
Ngnu/lib/* \
.if !empty(DIRDEPS) && !empty(DEP_DIRDEPS_FILTER.${DEP_MACHINE})
DIRDEPS := ${DIRDEPS:${DEP_DIRDEPS_FILTER.${DEP_MACHINE}:ts:}}
.endif

View File

@ -83,6 +83,10 @@ HOST_OBJTOP ?= ${OBJROOT}${HOST_TARGET}
.if ${OBJTOP} == ${HOST_OBJTOP} || ${REQUESTED_MACHINE:U${MACHINE}} == "host"
MACHINE= host
.if ${TARGET_MACHINE:Uno} == ${HOST_TARGET}
# not what we want
TARGET_MACHINE= host
.endif
.endif
.if ${MACHINE} == "host"
OBJTOP := ${HOST_OBJTOP}