bsd.subdir.mk revision 1.25 1 # $NetBSD: bsd.subdir.mk,v 1.25 1997/10/10 09:12:28 mycroft Exp $
2 # @(#)bsd.subdir.mk 8.1 (Berkeley) 6/8/93
3
4 .include <bsd.own.mk>
5
6 .if !target(.MAIN)
7 .MAIN: all
8 .endif
9
10 .for dir in ${SUBDIR}
11 .if exists(${dir}.${MACHINE})
12 __REALSUBDIR+=${dir}.${MACHINE}
13 .else
14 __REALSUBDIR+=${dir}
15 .endif
16 .endfor
17
18 .for dir in ${__REALSUBDIR}
19 .for targ in ${TARGETS}
20 .PHONY: ${targ}-${dir}
21 ${targ}-${dir}: .MAKE
22 @echo "===> ${_THISDIR_}${dir}"
23 @cd ${.CURDIR}/${dir}; \
24 ${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
25 ${targ}: ${targ}-${dir}
26 .endfor
27
28 # Backward-compatibility with the old rules. If this went away,
29 # 'xlint' could become 'lint', 'xinstall' could become 'install', etc.
30 ${dir}: all-${dir}
31 .endfor
32
33 .include <bsd.own.mk>
34