140508Sbostic# A Makefile for handling subdirectories. 240508Sbostic# Machine dependent subdirectories take precedence. 340508Sbostic# 4*40518Sbostic# @(#)bsd.subdir.mk 5.3 (Berkeley) 03/17/90 540508Sbostic# 640508Sbostic 740508Sbostic# user defines: 840508Sbostic# SUBDIR -- the list of subdirectories to be processed 940508Sbostic 1040508Sbostic# the default target. 1140508Sbostic.MAIN: all 1240508Sbostic 1340508Sbostic# The standard targets change to the subdirectory and make the 1440508Sbostic# target. 1540508SbosticSTDALL STDDEPEND STDCLEAN STDCLEANDIR STDLINT STDINSTALL STDTAGS: .USE 1640508Sbostic @for entry in ${SUBDIR}; do \ 1740508Sbostic (echo "===> $$entry"; \ 18*40518Sbostic if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ 19*40518Sbostic cd ${.CURDIR}/$${entry}.${MACHINE}; \ 2040508Sbostic else \ 21*40518Sbostic cd ${.CURDIR}/$${entry}; \ 2240508Sbostic fi; \ 2340508Sbostic ${MAKE} ${.TARGET}) \ 2440508Sbostic done 2540508Sbostic 2640508Sbostic# If the user has not specified the target, use the standard version. 2740508Sbosticall: STDALL 2840508Sbosticclean: STDCLEAN 2940508Sbosticcleandir: STDCLEANDIR 3040511Sbosticdepend: STDDEPEND 3140508Sbosticlint: STDLINT 3240508Sbosticinstall: STDINSTALL 3340508Sbostictags: STDTAGS 3440508Sbostic 3540508Sbostic# If trying to make one of the subdirectories, change to it and make 3640508Sbostic# the default target. 3740508Sbostic${SUBDIR}: 3840508Sbostic @if test -d ${.TARGET}.${MACHINE}; then \ 39*40518Sbostic cd ${.CURDIR}/${.TARGET}.${MACHINE}; \ 4040508Sbostic else \ 41*40518Sbostic cd ${.CURDIR}/${.TARGET}; \ 4240508Sbostic fi; \ 4340508Sbostic ${MAKE} 44