From 339c6c53934769c0df1a7f699a8aa5e1b5f9118a Mon Sep 17 00:00:00 2001 From: jlam Date: Wed, 5 Jul 2006 22:21:02 +0000 Subject: Flatten out recursive makes into a single re-invocation of make by introducing the concept of a "barrier". We separate the user-invokable targets into ones that must happen before the barrier, and ones that must happen after the barrier. The ones that happen after the barrier are run in a sub-make process. In this case, the targets that must be run after the barrier are from the "wrapper" step and beyond. We rewrite the various "flow" targets, e.g. wrapper, configure, build, etc., so that they of the right form to use the barrier target. This now completely removes the concept of PKG_PHASE from pkgsrc. It is replaced with the concept of "before" and "after" the barrier, and this state can be checked by testing for the existence of the barrier cookie file. Because we've removed most of the recursive makes, there is now nowhere to hook the PKG_ERROR_HANDLER.* commands, so remove them for now. As part of this commit, put back the logic that conditionalized the sources for the various cookie files. Because the sources are all "phony" targets, they were always run, regardless of whether or not the cookie file already existed. Now, if a cookie file exists, then that entire phase associated with that cookie file is skipped. Lastly, fix a thinko in configure/bsd.configure.mk where setting NO_CONFIGURE in a package Makefile would manage to skip the "wrapper" step altogether. Fix this by correctly noting "wrapper" and not "patch" as the preceding step to "configure". --- mk/pkginstall/bsd.pkginstall.mk | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'mk/pkginstall') diff --git a/mk/pkginstall/bsd.pkginstall.mk b/mk/pkginstall/bsd.pkginstall.mk index 41aea55a31a..daefaf4f74c 100644 --- a/mk/pkginstall/bsd.pkginstall.mk +++ b/mk/pkginstall/bsd.pkginstall.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkginstall.mk,v 1.12 2006/07/05 06:09:15 jlam Exp $ +# $NetBSD: bsd.pkginstall.mk,v 1.13 2006/07/05 22:21:03 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk and implements the # common INSTALL/DEINSTALL scripts framework. To use the pkginstall @@ -964,14 +964,10 @@ install-rcd-${_script_}: ${RCD_SCRIPT_WRK.${_script_}} . endif .endfor -_PKGINSTALL_COOKIE= ${WRKDIR}/.pkginstall_done - _PKGINSTALL_TARGETS+= acquire-pkginstall-lock -_PKGINSTALL_TARGETS+= ${_PKGINSTALL_COOKIE} +_PKGINSTALL_TARGETS+= real-pkginstall _PKGINSTALL_TARGETS+= release-pkginstall-lock -.ORDER: ${_PKGINSTALL_TARGETS} - .PHONY: pkginstall install-script-data pkginstall: ${_PKGINSTALL_TARGETS} @@ -981,7 +977,3 @@ release-pkginstall-lock: release-lock .PHONY: real-pkginstall real-pkginstall: generate-rcd-scripts generate-install-scripts - ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${_PKGINSTALL_COOKIE} - -${_PKGINSTALL_COOKIE}: - ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-pkginstall PKG_PHASE=build -- cgit v1.2.3