diff options
| author | Marcel Moolenaar <marcel@FreeBSD.org> | 2012-08-22 19:25:57 +0000 |
|---|---|---|
| committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2012-08-22 19:25:57 +0000 |
| commit | 7750ad47a9a7dbc83f87158464170c8640723293 (patch) | |
| tree | cd79e2918968cd4506cfed6dbf7f1829c11aa985 /include/Makefile | |
| parent | e43b47e8f430b87d4bb6a2c798216568483ab8c2 (diff) | |
Notes
Diffstat (limited to 'include/Makefile')
| -rw-r--r-- | include/Makefile | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/include/Makefile b/include/Makefile index d2f6d7f08853..c4ca316457d7 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: |
