Home | History | Annotate | Line # | Download | only in mk
bsd.subdir.mk revision 1.27
      1 #	$NetBSD: bsd.subdir.mk,v 1.27 1997/10/11 08:16:29 mycroft Exp $
      2 #	@(#)bsd.subdir.mk	8.1 (Berkeley) 6/8/93
      3 
      4 .if !target(__initialized__)
      5 __initialized__:
      6 .if exists(${.CURDIR}/../Makefile.inc)
      7 .include "${.CURDIR}/../Makefile.inc"
      8 .endif
      9 .include <bsd.own.mk>
     10 .include <bsd.obj.mk>
     11 .MAIN:		all
     12 .endif
     13 
     14 .for dir in ${SUBDIR}
     15 .if exists(${dir}.${MACHINE})
     16 __REALSUBDIR+=${dir}.${MACHINE}
     17 .else
     18 __REALSUBDIR+=${dir}
     19 .endif
     20 .endfor
     21 
     22 .for dir in ${__REALSUBDIR}
     23 .for targ in ${TARGETS}
     24 .PHONY: ${targ}-${dir}
     25 ${targ}-${dir}: .MAKE
     26 	@echo "===> ${_THISDIR_}${dir}"
     27 	@cd ${.CURDIR}/${dir}; \
     28 	${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
     29 ${targ}: ${targ}-${dir}
     30 .endfor
     31 
     32 # Backward-compatibility with the old rules.  If this went away,
     33 # 'xlint' could become 'lint', 'xinstall' could become 'install', etc.
     34 ${dir}: all-${dir}
     35 .endfor
     36 
     37 # Make sure all of the standard targets are defined, even if they do nothing.
     38 ${TARGETS}:
     39