Improve DIRDEP filtering.

Allow DEP_SKIP_DIR and DEP_DIRDEPS_FILTER to vary by DEP_MACHINE.
This commit is contained in:
Simon J. Gerraty 2013-03-17 01:51:23 +00:00
parent c3a4fd2f26
commit 6c5406e48c
2 changed files with 13 additions and 12 deletions

View File

@ -246,17 +246,17 @@ _DEP_RELDIR := ${DEP_RELDIR}
SKIP_HOSTDIR ?=
NSkipHostDir = ${SKIP_HOSTDIR:N*.host:S,$,.host,:N.host:${M_ListToSkip}}
NSkipHostDep = ${SKIP_HOSTDIR:R:@d@*/$d*.host@:${M_ListToSkip}}
# things we always skip
# SKIP_DIRDEPS allows for adding entries on command line.
SKIP_DIR += .host *.WAIT ${SKIP_DIRDEPS}
SKIP_DIR.host += ${SKIP_HOSTDIR}
.ifdef HOSTPROG
SKIP_DIR += ${SKIP_HOSTDIR}
.endif
DEP_SKIP_DIR = ${SKIP_DIR} \
${SKIP_DIR.${DEP_MACHINE}:U} \
${SKIP_DIRDEPS.${DEP_MACHINE}:U}
NSkipDir = ${SKIP_DIR:${M_ListToSkip}}
NSkipDir = ${DEP_SKIP_DIR:${M_ListToSkip}}
.if defined(NO_DIRDEPS) || defined(NODIRDEPS)
# confine ourselves to the original dir
@ -374,9 +374,15 @@ _build_dirs += ${_machines:N${DEP_TARGET_SPEC}:@m@${_CURDIR}.$m@}
.endif
.if !empty(DIRDEPS)
# these we reset each time through as they can depend on DEP_MACHINE
DEP_DIRDEPS_FILTER = ${DIRDEPS_FILTER.${DEP_MACHINE}:U} ${DIRDEPS_FILTER:U}
.if empty(DEP_DIRDEPS_FILTER)
# something harmless
DEP_DIRDEPS_FILTER = U
.endif
# this is what we start with
__depdirs := ${DIRDEPS:${NSkipDir}:${DIRDEPS_FILTER:ts:}:O:u:@d@${SRCTOP}/$d@}
__depdirs := ${DIRDEPS:${NSkipDir}:${DEP_DIRDEPS_FILTER:ts:}:O:u:@d@${SRCTOP}/$d@}
# some entries may be qualified with .<machine>
# the :M*/*/*.* just tries to limit the dirs we check to likely ones.

View File

@ -10,7 +10,7 @@ DIRDEPS += pkgs/pseudo/stage
.endif
# we want to supress these dependencies for host tools
DEP_DIRDEPS_FILTER.host = \
DIRDEPS_FILTER.host = \
Ninclude* \
Nlib/lib* \
Nlib/csu* \
@ -18,8 +18,3 @@ DEP_DIRDEPS_FILTER.host = \
Ngnu/lib/csu* \
Ngnu/lib/lib[a-r]* \
.if !empty(DIRDEPS) && !empty(DEP_DIRDEPS_FILTER.${DEP_MACHINE})
DIRDEPS := ${DIRDEPS:${DEP_DIRDEPS_FILTER.${DEP_MACHINE}:ts:}}
.endif