summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2004-08-09 10:54:05 +0000
committerharti <harti@FreeBSD.org>2004-08-09 10:54:05 +0000
commit273eef07a6984e917a1b9593d09fbfd80eed5cfb (patch)
tree831c251f3cf038954a315b162eeb8ecb41c2668e /share
parent3495bef6881cf6244303e52e413eb4f366b65cdc (diff)
downloadFreeBSD-src-273eef07a6984e917a1b9593d09fbfd80eed5cfb.zip
FreeBSD-src-273eef07a6984e917a1b9593d09fbfd80eed5cfb.tar.gz
Use the '+' flag to make make recurse into sub-directories even when
given -n. For POLA reasons this behaviour is switched on only when at least two -n flags are given to make. One -n flag keeps the old behaviour of showing the shell command that would recurse into the sub-directories. Discussed with: ru
Diffstat (limited to 'share')
-rw-r--r--share/mk/bsd.subdir.mk10
-rw-r--r--share/mk/sys.mk6
2 files changed, 11 insertions, 5 deletions
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk
index 7cfc446..793272d 100644
--- a/share/mk/bsd.subdir.mk
+++ b/share/mk/bsd.subdir.mk
@@ -35,14 +35,14 @@ DISTRIBUTION?= base
.if !target(distribute)
distribute:
.for dist in ${DISTRIBUTION}
- cd ${.CURDIR}; \
+ ${_+_}cd ${.CURDIR}; \
${MAKE} install -DNO_SUBDIR DESTDIR=${DISTDIR}/${dist} SHARED=copies
.endfor
.endif
_SUBDIR: .USE
.if defined(SUBDIR) && !empty(SUBDIR) && !defined(NO_SUBDIR)
- @for entry in ${SUBDIR}; do \
+ @${_+_}for entry in ${SUBDIR}; do \
if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \
${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH}"; \
edir=$${entry}.${MACHINE_ARCH}; \
@@ -58,12 +58,12 @@ _SUBDIR: .USE
.endif
${SUBDIR}::
- @if test -d ${.TARGET}.${MACHINE_ARCH}; then \
+ ${_+_}@if test -d ${.TARGET}.${MACHINE_ARCH}; then \
cd ${.CURDIR}/${.TARGET}.${MACHINE_ARCH}; \
else \
cd ${.CURDIR}/${.TARGET}; \
fi; \
- ${MAKE} all
+ ${_+_}${MAKE} all
.for __target in all all-man checkdpadd clean cleandepend cleandir \
@@ -80,7 +80,7 @@ ${__stage}${__target}: _SUBDIR
.endif
.endfor
${__target}:
- cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target}
+ ${_+_}cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target}
.endfor
.if !target(install)
diff --git a/share/mk/sys.mk b/share/mk/sys.mk
index 51ec2aa..e08f3e5 100644
--- a/share/mk/sys.mk
+++ b/share/mk/sys.mk
@@ -57,6 +57,12 @@ ECHODIR ?= true
.endif
.endif
+.if !empty(.MAKEFLAGS:M-n) && ${.MAKEFLAGS:M-n} == "-n"
+_+_ ?=
+.else
+_+_ ?= +
+.endif
+
.if defined(%POSIX)
FC ?= fort77
FFLAGS ?= -O 1
OpenPOWER on IntegriCloud