Home | History | Annotate | Line # | Download | only in mk
bsd.subdir.mk revision 1.27
      1  1.27   mycroft #	$NetBSD: bsd.subdir.mk,v 1.27 1997/10/11 08:16:29 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 .include <bsd.obj.mk>
     11  1.27   mycroft .MAIN:		all
     12   1.3   mycroft .endif
     13   1.1       cgd 
     14  1.25   mycroft .for dir in ${SUBDIR}
     15  1.25   mycroft .if exists(${dir}.${MACHINE})
     16  1.25   mycroft __REALSUBDIR+=${dir}.${MACHINE}
     17  1.25   mycroft .else
     18  1.25   mycroft __REALSUBDIR+=${dir}
     19  1.25   mycroft .endif
     20  1.25   mycroft .endfor
     21   1.1       cgd 
     22  1.25   mycroft .for dir in ${__REALSUBDIR}
     23  1.17   mycroft .for targ in ${TARGETS}
     24  1.17   mycroft .PHONY: ${targ}-${dir}
     25  1.25   mycroft ${targ}-${dir}: .MAKE
     26  1.25   mycroft 	@echo "===> ${_THISDIR_}${dir}"
     27  1.25   mycroft 	@cd ${.CURDIR}/${dir}; \
     28  1.25   mycroft 	${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
     29  1.25   mycroft ${targ}: ${targ}-${dir}
     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