diff options
author | ru <ru@FreeBSD.org> | 2002-04-23 09:03:56 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-04-23 09:03:56 +0000 |
commit | 1a085bedc04ce216032d93ffecd05d19b8bd8809 (patch) | |
tree | fa2a90269f4179b941a6484b35b48413f6a30c7f /share/mk/bsd.subdir.mk | |
parent | e42e586ab2472f8243ec162166258ea136f30ce7 (diff) | |
download | FreeBSD-src-1a085bedc04ce216032d93ffecd05d19b8bd8809.zip FreeBSD-src-1a085bedc04ce216032d93ffecd05d19b8bd8809.tar.gz |
Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.
Ensure all standard targets honor SUBDIR. Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents). Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk. Nothing depended on the wrong
order anyway.
Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.
De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)
Diffstat (limited to 'share/mk/bsd.subdir.mk')
-rw-r--r-- | share/mk/bsd.subdir.mk | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 9f2b890..cea0779 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -25,15 +25,16 @@ # put the stuff into the right "distribution". # # afterdistribute, afterinstall, all, all-man, beforeinstall, checkdpadd, -# clean, cleandepend, cleandir, depend, install, lint, maninstall, +# clean, cleandepend, cleandir, depend, install, lint, # obj, objlink, realinstall, regress, tags # .include <bsd.init.mk> -_SUBDIRUSE: .USE +_SUBDIR: .USE +.if defined(SUBDIR) && !empty(SUBDIR) @for entry in ${SUBDIR}; do \ - (if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ + if test -d ${.CURDIR}/$${entry}.${MACHINE_ARCH}; then \ ${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE_ARCH}"; \ edir=$${entry}.${MACHINE_ARCH}; \ cd ${.CURDIR}/$${edir}; \ @@ -43,8 +44,9 @@ _SUBDIRUSE: .USE cd ${.CURDIR}/$${edir}; \ fi; \ ${MAKE} ${.TARGET:realinstall=install} \ - DIRPRFX=${DIRPRFX}$$edir/); \ + DIRPRFX=${DIRPRFX}$$edir/; \ done +.endif ${SUBDIR}:: @if test -d ${.TARGET}.${MACHINE_ARCH}; then \ @@ -56,11 +58,9 @@ ${SUBDIR}:: .for __target in all all-man checkdpadd clean cleandepend cleandir depend lint \ - maninstall obj objlink regress tags \ + obj objlink realinstall regress tags \ install.debug reinstall.debug -.if !target(${__target}) -${__target}: _SUBDIRUSE -.endif +${__target}: _SUBDIR .endfor .if !target(install) @@ -72,7 +72,7 @@ afterinstall: .endif install: afterinstall afterinstall: realinstall -realinstall: beforeinstall _SUBDIRUSE +realinstall: beforeinstall .endif DISTRIBUTION?= bin @@ -80,7 +80,7 @@ DISTRIBUTION?= bin afterdistribute: .endif .if !target(distribute) -distribute: _SUBDIRUSE +distribute: _SUBDIR .for dist in ${DISTRIBUTION} cd ${.CURDIR} ; ${MAKE} afterdistribute DESTDIR=${DISTDIR}/${dist} .endfor |