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