bsd.subdir.mk revision 2352
1#	from: @(#)bsd.subdir.mk	5.9 (Berkeley) 2/1/91
2#	$Id: bsd.subdir.mk,v 1.2 1994/08/04 21:09:26 wollman Exp $
3
4.MAIN: all
5
6STRIP?=	-s
7
8BINGRP?=	bin
9BINOWN?=	bin
10BINMODE?=	555
11
12_SUBDIRUSE: .USE
13	@for entry in ${SUBDIR}; do \
14		(if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
15			${ECHODIR} "===> ${DIRPRFX}$${entry}.${MACHINE}"; \
16			edir=$${entry}.${MACHINE}; \
17			cd ${.CURDIR}/$${edir}; \
18		else \
19			${ECHODIR} "===> ${DIRPRFX}$$entry"; \
20			edir=$${entry}; \
21			cd ${.CURDIR}/$${edir}; \
22		fi; \
23		${MAKE} ${.TARGET:realinstall=install} DIRPRFX=${DIRPRFX}$$edir/); \
24	done
25
26${SUBDIR}::
27	@if test -d ${.TARGET}.${MACHINE}; then \
28		cd ${.CURDIR}/${.TARGET}.${MACHINE}; \
29	else \
30		cd ${.CURDIR}/${.TARGET}; \
31	fi; \
32	${MAKE} all
33
34.if !target(all)
35all: _SUBDIRUSE
36.endif
37
38.if !target(clean)
39clean: _SUBDIRUSE
40.endif
41
42.if !target(cleandir)
43cleandir: _SUBDIRUSE
44.endif
45
46.if !target(depend)
47depend: _SUBDIRUSE
48.endif
49
50.if !target (maninstall)
51maninstall: _SUBDIRUSE
52.endif
53
54.if !target(install)
55.if !target(beforeinstall)
56beforeinstall:
57.endif
58.if !target(afterinstall)
59afterinstall:
60.endif
61install: afterinstall
62afterinstall: realinstall
63realinstall: beforeinstall _SUBDIRUSE
64.endif
65
66.if !target(lint)
67lint: _SUBDIRUSE
68.endif
69
70.if !target(obj)
71obj: _SUBDIRUSE
72.endif
73
74.if !target(tags)
75tags: _SUBDIRUSE
76.endif
77