Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Mar 2013 01:51:23 +0000 (UTC)
From:      "Simon J. Gerraty" <sjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r248404 - projects/bmake/share/mk
Message-ID:  <201303170151.r2H1pNZE093733@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sjg
Date: Sun Mar 17 01:51:23 2013
New Revision: 248404
URL: http://svnweb.freebsd.org/changeset/base/248404

Log:
  Improve DIRDEP filtering.
  Allow DEP_SKIP_DIR and DEP_DIRDEPS_FILTER to vary by DEP_MACHINE.

Modified:
  projects/bmake/share/mk/dirdeps.mk
  projects/bmake/share/mk/local.dirdeps.mk

Modified: projects/bmake/share/mk/dirdeps.mk
==============================================================================
--- projects/bmake/share/mk/dirdeps.mk	Sun Mar 17 01:49:30 2013	(r248403)
+++ projects/bmake/share/mk/dirdeps.mk	Sun Mar 17 01:51:23 2013	(r248404)
@@ -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
 .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.

Modified: projects/bmake/share/mk/local.dirdeps.mk
==============================================================================
--- projects/bmake/share/mk/local.dirdeps.mk	Sun Mar 17 01:49:30 2013	(r248403)
+++ projects/bmake/share/mk/local.dirdeps.mk	Sun Mar 17 01:51:23 2013	(r248404)
@@ -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
-



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303170151.r2H1pNZE093733>