summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2002-05-15 16:19:54 +0000
committerru <ru@FreeBSD.org>2002-05-15 16:19:54 +0000
commitf5faaf6181d75212545b164cf70a61760c9edb2b (patch)
tree8c9c5bf6688094025cac7301793b5c86d4489a73
parent569719713eadbdada0fa74d6fd8992042c7a317b (diff)
downloadFreeBSD-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.
-rw-r--r--Makefile.inc14
-rw-r--r--include/Makefile4
-rw-r--r--share/mk/bsd.incs.mk22
-rw-r--r--share/mk/bsd.lib.mk4
-rw-r--r--share/mk/bsd.prog.mk4
-rw-r--r--share/mk/bsd.subdir.mk13
6 files changed, 28 insertions, 23 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index 35275fc..2ec25d0 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -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 \
diff --git a/include/Makefile b/include/Makefile
index 3dc44de..234cbd8 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -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}
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:
OpenPOWER on IntegriCloud