diff options
author | ru <ru@FreeBSD.org> | 2002-05-15 16:19:54 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2002-05-15 16:19:54 +0000 |
commit | f5faaf6181d75212545b164cf70a61760c9edb2b (patch) | |
tree | 8c9c5bf6688094025cac7301793b5c86d4489a73 /share | |
parent | 569719713eadbdada0fa74d6fd8992042c7a317b (diff) | |
download | FreeBSD-src-f5faaf6181d75212545b164cf70a61760c9edb2b.zip FreeBSD-src-f5faaf6181d75212545b164cf70a61760c9edb2b.tar.gz |
Rename `includes' to `buildincludes'.
Rename `incsinstall' to `installincludes'.
Make `includes' a -j safe shortcut for `buildincludes' + `installincludes'.
`buildincludes' and `installincludes' are SUBDIR friendly, if run directly.
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.incs.mk | 22 | ||||
-rw-r--r-- | share/mk/bsd.lib.mk | 4 | ||||
-rw-r--r-- | share/mk/bsd.prog.mk | 4 | ||||
-rw-r--r-- | share/mk/bsd.subdir.mk | 13 |
4 files changed, 24 insertions, 19 deletions
diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk index c619590..57a2886 100644 --- a/share/mk/bsd.incs.mk +++ b/share/mk/bsd.incs.mk @@ -6,23 +6,18 @@ INCSGROUPS?= INCS -.if !target(includes) +.if !target(buildincludes) .for group in ${INCSGROUPS} -includes: ${${group}} +buildincludes: ${${group}} .endfor .endif -_incsinstall: .USE - -.if !target(incsinstall) -incsinstall: _incsinstall -.endif +all: buildincludes +.if !target(installincludes) .for group in ${INCSGROUPS} .if defined(${group}) && !empty(${group}) -all: ${${group}} - ${group}OWN?= ${BINOWN} ${group}GRP?= ${BINGRP} ${group}MODE?= ${NOBINMODE} @@ -42,7 +37,7 @@ ${group}NAME_${header:T}?= ${${group}NAME} .else ${group}NAME_${header:T}?= ${header:T} .endif -_incsinstall: _${group}INS_${header:T} +installincludes: _${group}INS_${header:T} _${group}INS_${header:T}: ${header} ${INSTALL} -C -o ${${group}OWN_${.ALLSRC:T}} \ -g ${${group}GRP_${.ALLSRC:T}} -m ${${group}MODE_${.ALLSRC:T}} \ @@ -53,7 +48,7 @@ _${group}INCS+= ${header} .endif .endfor .if !empty(_${group}INCS) -_incsinstall: _${group}INS +installincludes: _${group}INS _${group}INS: ${_${group}INCS} .if defined(${group}NAME) ${INSTALL} -C -o ${${group}OWN} -g ${${group}GRP} -m ${${group}MODE} \ @@ -68,7 +63,7 @@ _${group}INS: ${_${group}INCS} .endfor .if defined(INCSLINKS) && !empty(INCSLINKS) -_incsinstall: +installincludes: @set ${INCSLINKS}; \ while test $$# -ge 2; do \ l=$$1; \ @@ -79,3 +74,6 @@ _incsinstall: ln -fs $$l $$t; \ done; true .endif +.endif !target(installincludes) + +realinstall: installincludes diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index b306916..c16f4b8 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -339,7 +339,7 @@ realinstall: done; true .endif -realinstall: _incsinstall +.include <bsd.incs.mk> .if !defined(NOMAN) realinstall: _maninstall @@ -352,8 +352,6 @@ lint: ${SRCS:M*.c} ${LINT} ${LINTOBJFLAGS} ${CFLAGS:M-[DIU]*} ${.ALLSRC} .endif -.include <bsd.incs.mk> - .if !defined(NOMAN) .include <bsd.man.mk> .endif diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 83f57a5..6ecbf50 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -196,7 +196,7 @@ _FILESINS_${file:T}: ${file} .endfor .endif -realinstall: _incsinstall +.include <bsd.incs.mk> .if !defined(NOMAN) realinstall: _maninstall @@ -225,8 +225,6 @@ tags: ${SRCS} .endif .endif -.include <bsd.incs.mk> - .if !defined(NOMAN) .include <bsd.man.mk> .endif diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index 9a6d466..20a38d7 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -58,11 +58,22 @@ ${SUBDIR}:: .for __target in all all-man checkdpadd clean cleandepend cleandir \ - depend distribute includes incsinstall lint maninstall \ + depend distribute lint maninstall \ obj objlink realinstall regress tags ${__target}: _SUBDIR .endfor +.for __target in includes +.for __stage in build install +${__stage}${__target}: +.if make(${__stage}${__target}) +${__stage}${__target}: _SUBDIR +.endif +.endfor +${__target}: + cd ${.CURDIR}; ${MAKE} build${__target}; ${MAKE} install${__target} +.endfor + .if !target(install) .if !target(beforeinstall) beforeinstall: |