Make dependall' play nicely with SUBDIR, using a hack similar to realinstall'

for both `depend' and `all'.
Also, remove the old hack that invokes an extra shell for .depend, now that
make(1) has been fixed.
This commit is contained in:
mycroft 2000-01-22 19:31:00 +00:00
parent 4e558e01fa
commit 3e13200b73
11 changed files with 34 additions and 29 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.dep.mk,v 1.29 1999/11/16 13:15:09 tron Exp $
# $NetBSD: bsd.dep.mk,v 1.30 2000/01/22 19:31:00 mycroft Exp $
.PHONY: cleandepend
cleandir distclean: cleandepend
@ -6,10 +6,9 @@ cleandir distclean: cleandepend
MKDEP?= mkdep
# some of the rules involve .h sources, so remove them from mkdep line
depend: beforedepend
realdepend: beforedepend
.if defined(SRCS)
depend: .depend
@true # hack to prevent "make depend" from using implicit rules
realdepend: .depend
.NOPATH: .depend
.depend: ${SRCS} ${DPSRCS}
@rm -f .depend
@ -47,7 +46,7 @@ cleandepend:
.else
cleandepend:
.endif
depend: afterdepend
realdepend: afterdepend
beforedepend:
afterdepend:

View File

@ -1,5 +1,5 @@
# $NetBSD: bsd.depall.mk,v 1.1 1999/09/14 01:31:11 perry Exp $
# $NetBSD: bsd.depall.mk,v 1.2 2000/01/22 19:31:01 mycroft Exp $
dependall: depend
dependall: realdepend
@cd ${.CURDIR}; \
${MAKE} all
${MAKE} realall

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.doc.mk,v 1.43 1999/09/04 21:48:33 fredb Exp $
# $NetBSD: bsd.doc.mk,v 1.44 2000/01/22 19:31:01 mycroft Exp $
# @(#)bsd.doc.mk 8.1 (Berkeley) 8/14/93
.if !target(__initialized__)
@ -29,9 +29,9 @@ TBL?= tbl
.if !target(all)
.if ${MKSHARE} != "no"
all: paper.ps
realall: paper.ps
.else
all:
realall:
.endif
.endif

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.hostprog.mk,v 1.4 1999/11/23 13:22:38 blymn Exp $
# $NetBSD: bsd.hostprog.mk,v 1.5 2000/01/22 19:31:01 mycroft Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.if !target(__initialized__)
@ -100,7 +100,7 @@ MAN= ${HOSTPROG}.1
.endif # !defined(MAN)
.endif # defined(HOSTPROG)
all: ${HOSTPROG}
realall: ${HOSTPROG}
cleanprog:
rm -f a.out [Ee]rrs mklog core *.core \

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.info.mk,v 1.9 1999/09/14 01:31:11 perry Exp $
# $NetBSD: bsd.info.mk,v 1.10 2000/01/22 19:31:01 mycroft Exp $
.if !target(__initialized__)
__initialized__:
@ -38,9 +38,9 @@ FILESMODE_${F}= ${INFOMODE}
FILESNAME_${F}= ${F:T}
.endfor
all: ${INFOFILES}
realall: ${INFOFILES}
.else
all:
realall:
.endif
.if ${MKINFO} != "no"

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.kmod.mk,v 1.35 1999/11/02 22:42:51 jdolecek Exp $
# $NetBSD: bsd.kmod.mk,v 1.36 2000/01/22 19:31:01 mycroft Exp $
.if !target(__initialized__)
__initialized__:
@ -40,7 +40,7 @@ ${PROG}: ${DPSRCS} ${OBJS} ${DPADD}
MAN= ${KMOD}.4
.endif
all: machine-links ${PROG}
realall: machine-links ${PROG}
.PHONY: machine-links
beforedepend: machine-links

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.lib.mk,v 1.161 2000/01/17 18:37:23 abs Exp $
# $NetBSD: bsd.lib.mk,v 1.162 2000/01/22 19:31:01 mycroft Exp $
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94
.if !target(__initialized__)
@ -255,7 +255,7 @@ LOBJS+=${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
ALLOBJS=${OBJS} ${POBJS} ${SOBJS} ${LOBJS}
all: ${SRCS} ${ALLOBJS:O} ${_LIBS}
realall: ${SRCS} ${ALLOBJS:O} ${_LIBS}
__archivebuild: .USE
@rm -f ${.TARGET}

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.man.mk,v 1.49 1999/09/14 01:31:11 perry Exp $
# $NetBSD: bsd.man.mk,v 1.50 2000/01/22 19:31:02 mycroft Exp $
# @(#)bsd.man.mk 8.1 (Berkeley) 6/8/93
.if !target(__initialized__)
@ -150,9 +150,9 @@ manlinks: manpages
.if defined(CATPAGES)
.if ${MKCATPAGES} != "no" && ${MKMAN} != "no"
all: ${CATPAGES}
realall: ${CATPAGES}
.else
all:
realall:
.endif
cleanman:

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.nls.mk,v 1.19 1999/09/04 21:48:33 fredb Exp $
# $NetBSD: bsd.nls.mk,v 1.20 2000/01/22 19:31:02 mycroft Exp $
.if !target(__initialized__)
__initialized__:
@ -34,7 +34,7 @@ NLSNAME=lib${LIB}
.if defined(NLSALL)
.if ${MKNLS} != "no"
all: ${NLSALL}
realall: ${NLSALL}
.endif
cleannls:

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.130 1999/11/30 16:16:43 sommerfeld Exp $
# $NetBSD: bsd.own.mk,v 1.131 2000/01/22 19:31:02 mycroft Exp $
.if !defined(_BSD_OWN_MK_)
_BSD_OWN_MK_=1
@ -147,7 +147,7 @@ TARGETS+= all clean cleandir depend dependall distclean includes \
install lint obj regress tags
.PHONY: all clean cleandir depend dependall distclean includes \
install lint obj regress tags beforedepend afterdepend \
beforeinstall afterinstall realinstall
beforeinstall afterinstall realinstall realdepend realall
# set NEED_OWN_INSTALL_TARGET, if it's not already set, to yes
# this is used by bsd.pkg.mk to stop "install" being defined
@ -162,6 +162,12 @@ realinstall: .NOTMAIN beforeinstall
afterinstall: .NOTMAIN subdir-install realinstall
.endif
.endif
all: .NOTMAIN realall subdir-all
subdir-all: .NOTMAIN
realall: .NOTMAIN
depend: .NOTMAIN realdepend subdir-depend
subdir-depend: .NOTMAIN
realdepend: .NOTMAIN
# Define MKxxx variables (which are either yes or no) for users
# to set in /etc/mk.conf and override on the make commandline.

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.prog.mk,v 1.106 2000/01/16 03:34:27 assar Exp $
# $NetBSD: bsd.prog.mk,v 1.107 2000/01/22 19:31:02 mycroft Exp $
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
.if !target(__initialized__)
@ -119,7 +119,7 @@ MAN= ${PROG}.1
.endif # !defined(MAN)
.endif # defined(PROG)
all: ${PROG} ${SCRIPTS}
realall: ${PROG} ${SCRIPTS}
cleanprog:
rm -f a.out [Ee]rrs mklog core *.core \