summaryrefslogtreecommitdiff
path: root/mk/install/bsd.install.mk
diff options
context:
space:
mode:
authorjlam <jlam>2006-07-05 22:21:02 +0000
committerjlam <jlam>2006-07-05 22:21:02 +0000
commit967acf13fd8a4f1317da73c4c459576fdeb5ac16 (patch)
treea30da33e80fce02ecc002e9c7ee00e2f7d9cda05 /mk/install/bsd.install.mk
parent682d4fd414c3d48aa9ce0bf1ac70de0995f0f593 (diff)
downloadpkgsrc-967acf13fd8a4f1317da73c4c459576fdeb5ac16.tar.gz
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".
Diffstat (limited to 'mk/install/bsd.install.mk')
-rw-r--r--mk/install/bsd.install.mk13
1 files changed, 8 insertions, 5 deletions
diff --git a/mk/install/bsd.install.mk b/mk/install/bsd.install.mk
index 09a68bedb96..2f8383259d6 100644
--- a/mk/install/bsd.install.mk
+++ b/mk/install/bsd.install.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.install.mk,v 1.4 2006/07/05 09:08:35 jlam Exp $
+# $NetBSD: bsd.install.mk,v 1.5 2006/07/05 22:21:02 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and provides all
# variables and targets related to installing packages.
@@ -19,13 +19,16 @@ _INSTALL_COOKIE= ${WRKDIR}/.install_done
######################################################################
### install is a public target to install the package.
###
-.if defined(NO_INSTALL)
.PHONY: install
-. if !target(install)
+.if !defined(NO_INSTALL)
+. include "${PKGSRCDIR}/mk/install/install.mk"
+.elif !target(install)
+. if exists(${_INSTALL_COOKIE})
+install:
+ @${DO_NADA}
+. else
install: ${_PKGSRC_BUILD_TARGETS} install-cookie
. endif
-.else
-. include "${PKGSRCDIR}/mk/install/install.mk"
.endif
.include "${PKGSRCDIR}/mk/install/deinstall.mk"