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