diff options
author | bde <bde@FreeBSD.org> | 1998-05-06 18:44:04 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1998-05-06 18:44:04 +0000 |
commit | 719d62b3b0b317b7bd93f23baf86382fc6c6969f (patch) | |
tree | 730be310fde8d3cb8a0103e0358509eef6e45bdc | |
parent | e10a5f74a6efe338dfa04bb9c20fe530a588a3ea (diff) | |
download | FreeBSD-src-719d62b3b0b317b7bd93f23baf86382fc6c6969f.zip FreeBSD-src-719d62b3b0b317b7bd93f23baf86382fc6c6969f.tar.gz |
Only include bsd.dep.mk in `mk'files that handle C sources. Abuse
bsd.obj.mk instead of bsd.dep.mk for defining the _SUBDIR target
and a default tags target. Abuse bsd.obj.mk for defining default
cleandepend and depend targets.
-rw-r--r-- | share/mk/bsd.dep.mk | 15 | ||||
-rw-r--r-- | share/mk/bsd.doc.mk | 7 | ||||
-rw-r--r-- | share/mk/bsd.info.mk | 8 | ||||
-rw-r--r-- | share/mk/bsd.obj.mk | 25 | ||||
-rw-r--r-- | share/mk/bsd.sgml.mk | 5 |
5 files changed, 29 insertions, 31 deletions
diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index d15a2b8..040f14b 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -1,4 +1,4 @@ -# $Id: bsd.dep.mk,v 1.18 1998/03/07 13:57:37 bde Exp $ +# $Id: bsd.dep.mk,v 1.19 1998/03/23 14:58:26 eivind Exp $ # # The include file <bsd.dep.mk> handles Makefile dependencies. # @@ -95,16 +95,3 @@ cleandepend: _SUBDIR .endif .endif .endif - -_SUBDIR: .USE -.if defined(SUBDIR) && !empty(SUBDIR) - @for entry in ${SUBDIR}; do \ - (${ECHODIR} "===> ${DIRPRFX}$$entry"; \ - if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ - cd ${.CURDIR}/$${entry}.${MACHINE}; \ - else \ - cd ${.CURDIR}/$${entry}; \ - fi; \ - ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \ - done -.endif diff --git a/share/mk/bsd.doc.mk b/share/mk/bsd.doc.mk index 96fa37f..22383e0 100644 --- a/share/mk/bsd.doc.mk +++ b/share/mk/bsd.doc.mk @@ -1,5 +1,5 @@ # from: @(#)bsd.doc.mk 5.3 (Berkeley) 1/2/91 -# $Id: bsd.doc.mk,v 1.42 1998/02/25 01:35:16 bde Exp $ +# $Id: bsd.doc.mk,v 1.43 1998/03/12 20:02:07 eivind Exp $ # # The include file <bsd.doc.mk> handles installing BSD troff documents. # @@ -166,10 +166,6 @@ ${DFILE}: ${DOC}.${PRINTERDEVICE} .endif .endif -.if !target(depend) -depend: -.endif - .if !target(maninstall) maninstall: .endif @@ -178,5 +174,4 @@ maninstall: regress: .endif -.include <bsd.dep.mk> .include <bsd.obj.mk> diff --git a/share/mk/bsd.info.mk b/share/mk/bsd.info.mk index f5426d5..29f9da6 100644 --- a/share/mk/bsd.info.mk +++ b/share/mk/bsd.info.mk @@ -1,4 +1,4 @@ -# $Id: bsd.info.mk,v 1.48 1997/12/26 00:19:23 jkh Exp $ +# $Id: bsd.info.mk,v 1.49 1998/03/12 20:02:09 eivind Exp $ # # The include file <bsd.info.mk> handles installing GNU (tech)info files. # Texinfo is a documentation system that uses a single source @@ -63,9 +63,6 @@ # # +++ targets +++ # -# depend: -# Dummy target, do nothing. -# # distribute: # This is a variant of install, which will # put the stuff into the right "distribution". @@ -181,8 +178,6 @@ ${INFO}.texi: ${SRCS} cat ${.ALLSRC} > ${.TARGET} .endif -depend: _SUBDIR - # tex garbage .if ${FORMATS:Mps} || ${FORMATS:Mdvi} || ${FORMATS:Mlatin1} .for _f in aux cp fn ky log out pg toc tp vr dvi @@ -217,5 +212,4 @@ maninstall: _SUBDIR regress: .endif -.include <bsd.dep.mk> .include <bsd.obj.mk> diff --git a/share/mk/bsd.obj.mk b/share/mk/bsd.obj.mk index d1cc96b..80b5f35 100644 --- a/share/mk/bsd.obj.mk +++ b/share/mk/bsd.obj.mk @@ -1,8 +1,12 @@ -# $Id: bsd.obj.mk,v 1.22 1998/02/25 02:48:28 bde Exp $ +# $Id: bsd.obj.mk,v 1.23 1998/03/14 14:08:29 bde Exp $ # # The include file <bsd.obj.mk> handles creating the 'obj' directory # and cleaning up object files, etc. # +# Under construction: it also contains the _SUBDIR target (which is used +# by most `mk' files to recurse into subdirectories) and defaults for the +# cleandepend, depend and tags targets. It may eventually be merged with +# with bsd.subdir.mk. # # +++ variables +++ # @@ -154,3 +158,22 @@ checkdpadd: .endif cleandir: cleanobj _SUBDIR + +.for __target in cleandepend depend tags +.if !target(${__target}) +${__target}: _SUBDIR +.endif +.endfor + +_SUBDIR: .USE +.if defined(SUBDIR) && !empty(SUBDIR) + @for entry in ${SUBDIR}; do \ + (${ECHODIR} "===> ${DIRPRFX}$$entry"; \ + if test -d ${.CURDIR}/$${entry}.${MACHINE}; then \ + cd ${.CURDIR}/$${entry}.${MACHINE}; \ + else \ + cd ${.CURDIR}/$${entry}; \ + fi; \ + ${MAKE} ${.TARGET:S/realinstall/install/:S/.depend/depend/} DIRPRFX=${DIRPRFX}$$entry/); \ + done +.endif diff --git a/share/mk/bsd.sgml.mk b/share/mk/bsd.sgml.mk index 3e0d3e7..5de42e0 100644 --- a/share/mk/bsd.sgml.mk +++ b/share/mk/bsd.sgml.mk @@ -1,7 +1,7 @@ # bsd.sgml.mk - 8 Sep 1995 John Fieber # This file is in the public domain. # -# $Id: bsd.sgml.mk,v 1.22 1997/11/09 15:03:15 wosch Exp $ +# $Id: bsd.sgml.mk,v 1.23 1998/01/23 20:09:21 jkh Exp $ # # The include file <bsd.sgml.mk> handles installing sgml documents. # @@ -195,11 +195,10 @@ CLEANFILES+= ${DOC}.${_XFORMAT} .endfor -.for __target in beforeinstall afterinstall maninstall depend _SUBDIR +.for __target in beforeinstall afterinstall maninstall _SUBDIR .if !target(${__target}) ${__target}: .endif .endfor -.include <bsd.dep.mk> .include <bsd.obj.mk> |