NetBSD/share/mk/bsd.subdir.mk

35 lines
789 B
Makefile
Raw Normal View History

# $NetBSD: bsd.subdir.mk,v 1.26 1997/10/11 07:26:54 mycroft 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
.include <bsd.own.mk>
.if !target(.MAIN)
1993-03-21 12:45:37 +03:00
.MAIN: all
.endif
1993-03-21 12:45:37 +03:00
.for dir in ${SUBDIR}
.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}
${targ}-${dir}: .MAKE
@echo "===> ${_THISDIR_}${dir}"
@cd ${.CURDIR}/${dir}; \
${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
${targ}: ${targ}-${dir}
1997-05-07 00:54:31 +04:00
.endfor
# Backward-compatibility with the old rules. If this went away,
# 'xlint' could become 'lint', 'xinstall' could become 'install', etc.
${dir}: all-${dir}
.endfor
1993-03-21 12:45:37 +03:00
# Make sure all of the standard targets are defined, even if they do nothing.
${TARGETS}: