bsd.subdir.mk revision 1638
1#	@(#)bsd.subdir.mk	8.1 (Berkeley) 6/8/93
2
3.MAIN: all
4
5STRIP?=	-s
6
7BINGRP?=	bin
8BINOWN?=	bin
9BINMODE?=	555
10
11_SUBDIRUSE: .USE
12	@for entry in ${SUBDIR}; do \
13		(if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \
14			echo "===> $${entry}.${MACHINE}"; \
15			cd ${.CURDIR}/$${entry}.${MACHINE}; \
16		else \
17			echo "===> $$entry"; \
18			cd ${.CURDIR}/$${entry}; \
19		fi; \
20		${MAKE} ${.TARGET:realinstall=install}); \
21	done
22
23${SUBDIR}::
24	@if test -d ${.TARGET}.${MACHINE}; then \
25		cd ${.CURDIR}/${.TARGET}.${MACHINE}; \
26	else \
27		cd ${.CURDIR}/${.TARGET}; \
28	fi; \
29	${MAKE} all
30
31.if !target(all)
32all: _SUBDIRUSE
33.endif
34
35.if !target(clean)
36clean: _SUBDIRUSE
37.endif
38
39.if !target(cleandir)
40cleandir: _SUBDIRUSE
41.endif
42
43.if !target(depend)
44depend: _SUBDIRUSE
45.endif
46
47.if !target(manpages)
48manpages: _SUBDIRUSE
49.endif
50
51.if !target(install)
52.if !target(beforeinstall)
53beforeinstall:
54.endif
55.if !target(afterinstall)
56afterinstall:
57.endif
58install: afterinstall
59afterinstall: realinstall
60realinstall: beforeinstall _SUBDIRUSE
61.endif
62.if !target(maninstall)
63maninstall: _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(objdir)
75objdir: _SUBDIRUSE
76.endif
77
78.if !target(tags)
79tags: _SUBDIRUSE
80.endif
81