xref: /csrg-svn/share/mk/bsd.subdir.mk (revision 50805)
1*50805Skarels#	@(#)bsd.subdir.mk	5.10 (Berkeley) 08/07/91
241563Sbostic
340508Sbostic.MAIN: all
440508Sbostic
543473SbosticSTRIP?=	-s
643473Sbostic
743473SbosticBINGRP?=	bin
843473SbosticBINOWN?=	bin
943473SbosticBINMODE?=	555
1043473Sbostic
1141557Sbostic_SUBDIRUSE: .USE
1240508Sbostic	@for entry in ${SUBDIR}; do \
1341461Sbostic		(if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
1441461Sbostic			echo "===> $${entry}.${MACHINE}"; \
1540518Sbostic			cd ${.CURDIR}/$${entry}.${MACHINE}; \
1640508Sbostic		else \
1741461Sbostic			echo "===> $$entry"; \
1840518Sbostic			cd ${.CURDIR}/$${entry}; \
1940508Sbostic		fi; \
2046193Sbostic		${MAKE} ${.TARGET:realinstall=install}); \
2140508Sbostic	done
2240508Sbostic
2343473Sbostic${SUBDIR}::
2441461Sbostic	@if test -d ${.TARGET}.${MACHINE}; then \
2541461Sbostic		cd ${.CURDIR}/${.TARGET}.${MACHINE}; \
2641461Sbostic	else \
2741461Sbostic		cd ${.CURDIR}/${.TARGET}; \
2841461Sbostic	fi; \
2941461Sbostic	${MAKE} all
3041461Sbostic
3141461Sbostic.if !target(all)
3241557Sbosticall: _SUBDIRUSE
3341461Sbostic.endif
3441461Sbostic
3541461Sbostic.if !target(clean)
3641557Sbosticclean: _SUBDIRUSE
3741461Sbostic.endif
3841461Sbostic
3941461Sbostic.if !target(cleandir)
4041557Sbosticcleandir: _SUBDIRUSE
4141461Sbostic.endif
4241461Sbostic
4341461Sbostic.if !target(depend)
4441557Sbosticdepend: _SUBDIRUSE
4541461Sbostic.endif
4641461Sbostic
47*50805Skarels.if !target(manpages)
48*50805Skarelsmanpages: _SUBDIRUSE
49*50805Skarels.endif
50*50805Skarels
5141575Sbostic.if !target(install)
5241575Sbostic.if !target(beforeinstall)
5341575Sbosticbeforeinstall:
5441575Sbostic.endif
5541575Sbostic.if !target(afterinstall)
5641575Sbosticafterinstall:
5741575Sbostic.endif
5841575Sbosticinstall: afterinstall
5941575Sbosticafterinstall: realinstall
6041575Sbosticrealinstall: beforeinstall _SUBDIRUSE
6141575Sbostic.endif
62*50805Skarels.if !target(maninstall)
63*50805Skarelsmaninstall: _SUBDIRUSE
64*50805Skarels.endif
6541575Sbostic
6641461Sbostic.if !target(lint)
6741557Sbosticlint: _SUBDIRUSE
6841461Sbostic.endif
6941461Sbostic
7043473Sbostic.if !target(obj)
7143473Sbosticobj: _SUBDIRUSE
7243473Sbostic.endif
7343473Sbostic
74*50805Skarels.if !target(objdir)
75*50805Skarelsobjdir: _SUBDIRUSE
76*50805Skarels.endif
77*50805Skarels
7841461Sbostic.if !target(tags)
7941557Sbostictags: _SUBDIRUSE
8041461Sbostic.endif
81