Home | History | Annotate | Line # | Download | only in mk
bsd.subdir.mk revision 1.28
      1  1.28   mycroft #	$NetBSD: bsd.subdir.mk,v 1.28 1997/10/11 08:43:35 mycroft 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.25   mycroft 	@echo "===> ${_THISDIR_}${dir}"
     26  1.25   mycroft 	@cd ${.CURDIR}/${dir}; \
     27  1.25   mycroft 	${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
     28  1.25   mycroft ${targ}: ${targ}-${dir}
     29  1.17   mycroft .endfor
     30  1.12       cgd 
     31  1.12       cgd # Backward-compatibility with the old rules.  If this went away,
     32  1.12       cgd # 'xlint' could become 'lint', 'xinstall' could become 'install', etc.
     33  1.12       cgd ${dir}: all-${dir}
     34  1.12       cgd .endfor
     35  1.21  christos 
     36  1.26   mycroft # Make sure all of the standard targets are defined, even if they do nothing.
     37  1.26   mycroft ${TARGETS}:
     38