summaryrefslogtreecommitdiffstats
path: root/include/Makefile
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2012-08-22 19:25:57 +0000
committermarcel <marcel@FreeBSD.org>2012-08-22 19:25:57 +0000
commit9dd41e3647df728006e0749ac139cfeb773c3873 (patch)
treecd79e2918968cd4506cfed6dbf7f1829c11aa985 /include/Makefile
parentcf2de346b025671794fb9ccead67d707250e0584 (diff)
downloadFreeBSD-src-9dd41e3647df728006e0749ac139cfeb773c3873.zip
FreeBSD-src-9dd41e3647df728006e0749ac139cfeb773c3873.tar.gz
Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
Diffstat (limited to 'include/Makefile')
-rw-r--r--include/Makefile34
1 files changed, 32 insertions, 2 deletions
diff --git a/include/Makefile b/include/Makefile
index d2f6d7f..c4ca316 100644
--- a/include/Makefile
+++ b/include/Makefile
@@ -126,8 +126,38 @@ _MARCHS= ${MACHINE_CPUARCH}
_MARCHS+= x86
.endif
+.if ${MK_STAGING} != "no"
+# tell bsd.incs.mk that we have it covered
+stage_includes:
+.endif
+
.include <bsd.prog.mk>
+.if ${MK_STAGING} != "no" && !defined(_SKIP_BUILD)
+.if make(all)
+DESTDIR= ${STAGE_OBJTOP}
+# we want to keep this separate from the folk who
+# do staging "normally"
+INCLUDEDIR= /include
+
+all: stage_includes
+installincludes: buildincludes
+buildincludes: stage_prep
+
+stage_prep:
+ @mkdir -p ${DESTDIR}${INCLUDEDIR}
+ @touch $@
+
+stage_includes: .dirdep installincludes
+ @find ${DESTDIR}${INCLUDEDIR} -type d | while read d; do \
+ rm -f $$d/.dirdep; \
+ { ln .dirdep $$d/.dirdep 2> /dev/null || \
+ cp -p .dirdep $$d/.dirdep; }; \
+ done
+ @touch $@
+.endif
+.endif
+
installincludes: ${SHARED}
${SHARED}: compat
@@ -140,11 +170,11 @@ compat:
.endfor
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
-f ${.CURDIR}/../etc/mtree/BSD.include.dist \
- -p ${DESTDIR}${INCLUDEDIR}
+ -p ${DESTDIR}${INCLUDEDIR} > /dev/null
.if ${MK_BIND_LIBS} != "no"
mtree -deU ${MTREE_FOLLOWS_SYMLINKS} \
-f ${.CURDIR}/../etc/mtree/BIND.include.dist \
- -p ${DESTDIR}${INCLUDEDIR}
+ -p ${DESTDIR}${INCLUDEDIR} > /dev/null
.endif
copies:
OpenPOWER on IntegriCloud