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.
This commit is contained in:
ru 2002-05-15 16:19:54 +00:00
parent 569719713e
commit f5faaf6181
6 changed files with 28 additions and 23 deletions

View File

@ -299,7 +299,7 @@ _includes:
@echo "--------------------------------------------------------------"
@echo ">>> stage 4: populating ${WORLDTMP}/usr/include"
@echo "--------------------------------------------------------------"
cd ${.CURDIR}; ${WMAKE} includes; ${WMAKE} SHARED=symlinks incsinstall
cd ${.CURDIR}; ${WMAKE} SHARED=symlinks par-includes
_libraries:
@echo
@echo "--------------------------------------------------------------"
@ -749,7 +749,7 @@ _startup_libs: ${_startup_libs:S/$/__L/}
_prebuild_libs: ${_prebuild_libs:S/$/__L/}
_generic_libs: ${_generic_libs:S/$/__L/}
.for __target in clean cleandepend cleandir depend obj
.for __target in clean cleandepend cleandir depend includes obj
.for entry in ${SUBDIR}
${entry}.${__target}__D: .PHONY
@if test -d ${.CURDIR}/${entry}.${MACHINE_ARCH}; then \

View File

@ -116,6 +116,6 @@ symlinks:
rm -rf ${DESTDIR}/usr/include/machine
ln -s ../../sys/${MACHINE_ARCH}/include ${DESTDIR}/usr/include/machine
_incsinstall: ${SHARED}
.include <bsd.prog.mk>
installincludes: ${SHARED}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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: