Add a NOSUBDIR variable for bsd.subdir.mk. If NOSUBDIR is defined

then SUBDIR is ignored.
This commit is contained in:
apb 2008-10-25 14:58:00 +00:00
parent ea8f5a99d5
commit b45673f53b
2 changed files with 23 additions and 11 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.README,v 1.232 2008/10/19 19:44:47 apb Exp $
# $NetBSD: bsd.README,v 1.233 2008/10/25 14:58:00 apb Exp $
# @(#)bsd.README 8.2 (Berkeley) 4/2/94
This is the README file for the make "include" files for the NetBSD
@ -1262,16 +1262,24 @@ SHLINKDIR Path to use for shared linker when building a program.
The include file <bsd.subdir.mk> contains the default targets for building
subdirectories. It has the same eight targets as <bsd.prog.mk>: all,
clean, cleandir, depend, includes, install, lint, and tags. For all of
the directories listed in ${SUBDIR}, the specified directory will be
visited and the target made. There is also a default target which allows
the command "make subdir" where subdir is any directory listed in ${SUBDIR}.
clean, cleandir, depend, includes, install, lint, and tags. It uses the
following variables:
As a special case, the use of a token .WAIT as an entry in SUBDIR acts
as a synchronization barrier when multiple make jobs are run; subdirs
before the .WAIT must complete before any subdirs after .WAIT are
started. See make(1) for some caveats on use of .WAIT and other
special sources.
NOSUBDIR If this variable is defined, then the SUBDIR variable
will be ignored and subdirectories will not be processed.
SUBDIR For all of the directories listed in ${SUBDIR}, the
specified directory will be visited and the target made.
There is also a default target which allows the command
"make subdir" where subdir is any directory listed in
${SUBDIR}.
As a special case, the use of a token .WAIT as an
entry in SUBDIR acts as a synchronization barrier
when multiple make jobs are run; subdirs before the
.WAIT must complete before any subdirs after .WAIT are
started. See make(1) for some caveats on use of .WAIT
and other special sources.
=-=-=-=-= bsd.sys.mk =-=-=-=-=

View File

@ -1,8 +1,10 @@
# $NetBSD: bsd.subdir.mk,v 1.48 2004/04/13 12:25:03 lukem Exp $
# $NetBSD: bsd.subdir.mk,v 1.49 2008/10/25 14:58:00 apb Exp $
# @(#)bsd.subdir.mk 8.1 (Berkeley) 6/8/93
.include <bsd.init.mk>
.if !defined(NOSUBDIR) # {
.for dir in ${SUBDIR}
.if exists(${dir}.${MACHINE})
__REALSUBDIR+=${dir}.${MACHINE}
@ -39,4 +41,6 @@ ${targ}: subdir-${targ}
.endif
.endfor
.endif # ! NOSUBDIR # }
${TARGETS}: # ensure existence