xref: /freebsd/targets/pseudo/stage/Makefile (revision d0b2dbfa)
1
2# this makefile gets hooked into everyone's dependencies so that
3# distrib-dirs can be done in STAGE_OBJTOP
4all:
5
6.if ${.MAKE.OS} == "FreeBSD"
7# mtree makes a lot of noise if we are not root,
8# we don't need to see it.
9stage-distrib-dirs: .META ${META_DEPS}
10	mkdir -p ${STAGE_OBJTOP}
11	INSTALL="sh ${SRCTOP}/tools/install.sh" ${.MAKE} -C ${SRCTOP}/etc \
12	    distrib-dirs -DNO_FSCHG -DWITH_TESTS DESTDIR=${STAGE_OBJTOP}
13
14.else
15std_dirs= \
16	/bin \
17	/etc \
18	/sbin \
19	/usr/bin \
20	/usr/include/sys \
21	/usr/lib \
22	/usr/sbin \
23
24stage-distrib-dirs: .META
25	mkdir -p ${std_dirs:@d@${STAGE_OBJTOP}$d@}
26
27.endif
28
29.include <bsd.prog.mk>
30
31.if ${.MAKE.LEVEL} > 0 && ${MK_STAGING} == "yes"
32all: stage-distrib-dirs
33.endif
34