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