1999-02-11 08:01:39 +03:00
|
|
|
# $NetBSD: bsd.subdir.mk,v 1.31 1999/02/11 05:01:39 tv Exp $
|
1997-03-29 11:02:45 +03:00
|
|
|
# @(#)bsd.subdir.mk 8.1 (Berkeley) 6/8/93
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1997-10-11 12:16:24 +04:00
|
|
|
.if !target(__initialized__)
|
|
|
|
__initialized__:
|
|
|
|
.if exists(${.CURDIR}/../Makefile.inc)
|
|
|
|
.include "${.CURDIR}/../Makefile.inc"
|
|
|
|
.endif
|
1997-03-25 00:54:12 +03:00
|
|
|
.include <bsd.own.mk>
|
1997-10-11 12:16:24 +04:00
|
|
|
.MAIN: all
|
1993-08-16 00:42:39 +04:00
|
|
|
.endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1997-03-21 03:53:02 +03:00
|
|
|
.for dir in ${SUBDIR}
|
1997-10-10 13:12:28 +04:00
|
|
|
.if exists(${dir}.${MACHINE})
|
|
|
|
__REALSUBDIR+=${dir}.${MACHINE}
|
|
|
|
.else
|
|
|
|
__REALSUBDIR+=${dir}
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for dir in ${__REALSUBDIR}
|
1997-05-07 00:54:31 +04:00
|
|
|
.for targ in ${TARGETS}
|
|
|
|
.PHONY: ${targ}-${dir}
|
1997-10-10 13:12:28 +04:00
|
|
|
${targ}-${dir}: .MAKE
|
1997-11-13 12:18:19 +03:00
|
|
|
@echo "${targ} ===> ${_THISDIR_}${dir}"
|
1997-10-10 13:12:28 +04:00
|
|
|
@cd ${.CURDIR}/${dir}; \
|
|
|
|
${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
|
1997-10-27 22:41:05 +03:00
|
|
|
subdir-${targ}: ${targ}-${dir}
|
|
|
|
${targ}: subdir-${targ}
|
1997-05-07 00:54:31 +04:00
|
|
|
.endfor
|
1997-03-21 03:53:02 +03:00
|
|
|
.endfor
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1997-10-11 11:26:53 +04:00
|
|
|
# Make sure all of the standard targets are defined, even if they do nothing.
|
|
|
|
${TARGETS}:
|