Fix the before/after-install ordering problem in a different way.

The old fix broke with multiple targets on the make command line.
This commit is contained in:
drochner 1997-10-27 19:41:05 +00:00
parent 34341c444a
commit 978c73b8c6
2 changed files with 9 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.55 1997/10/23 12:44:28 drochner Exp $
# $NetBSD: bsd.own.mk,v 1.56 1997/10/27 19:41:05 drochner Exp $
.if defined(MAKECONF) && exists(${MAKECONF})
.include "${MAKECONF}"
@ -86,19 +86,10 @@ TARGETS+= all clean cleandir depend includes install lint obj regress \
tags beforedepend afterdepend beforeinstall afterinstall \
realinstall
.if make(install)
.if target(beforeinstall)
beforeinstall: .NOTMAIN
.BEGIN: .MAKE
(cd ${.CURDIR} && ${MAKE} beforeinstall)
.endif
.if target(afterinstall)
afterinstall: .NOTMAIN
.END: .MAKE
(cd ${.CURDIR} && ${MAKE} afterinstall)
.endif
.if !target(install)
install: .NOTMAIN realinstall
realinstall: .NOTMAIN
install: .NOTMAIN beforeinstall subdir-install realinstall afterinstall
beforeinstall: .NOTMAIN
subdir-install: .NOTMAIN beforeinstall
realinstall: .NOTMAIN beforeinstall
afterinstall: .NOTMAIN subdir-install realinstall
.endif
.endif #make(install)

View File

@ -1,4 +1,4 @@
# $NetBSD: bsd.subdir.mk,v 1.28 1997/10/11 08:43:35 mycroft Exp $
# $NetBSD: bsd.subdir.mk,v 1.29 1997/10/27 19:41:08 drochner Exp $
# @(#)bsd.subdir.mk 8.1 (Berkeley) 6/8/93
.if !target(__initialized__)
@ -25,7 +25,8 @@ ${targ}-${dir}: .MAKE
@echo "===> ${_THISDIR_}${dir}"
@cd ${.CURDIR}/${dir}; \
${MAKE} "_THISDIR_=${_THISDIR_}${dir}/" ${targ}
${targ}: ${targ}-${dir}
subdir-${targ}: ${targ}-${dir}
${targ}: subdir-${targ}
.endfor
# Backward-compatibility with the old rules. If this went away,