summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authorjlam <jlam>2006-07-05 22:21:02 +0000
committerjlam <jlam>2006-07-05 22:21:02 +0000
commit339c6c53934769c0df1a7f699a8aa5e1b5f9118a (patch)
treea30da33e80fce02ecc002e9c7ee00e2f7d9cda05 /mk/tools
parentb0eaf284aab0ecdf90d23be57092a4dd77333bf9 (diff)
downloadpkgsrc-339c6c53934769c0df1a7f699a8aa5e1b5f9118a.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/tools')
-rw-r--r--mk/tools/bsd.tools.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk
index 594d4194b9a..e0d72d958fe 100644
--- a/mk/tools/bsd.tools.mk
+++ b/mk/tools/bsd.tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.39 2006/07/05 09:08:35 jlam Exp $
+# $NetBSD: bsd.tools.mk,v 1.40 2006/07/05 22:21:03 jlam Exp $
#
# Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -68,11 +68,11 @@ _TOOLS_TARGETS+= release-tools-lock
.PHONY: tools
.if !target(tools)
-. if !exists(${_TOOLS_COOKIE})
-tools: ${_TOOLS_TARGETS}
-. else
+. if exists(${_TOOLS_COOKIE})
tools:
@${DO_NADA}
+. else
+tools: ${_TOOLS_TARGETS}
. endif
.endif
@@ -80,7 +80,12 @@ tools:
acquire-tools-lock: acquire-lock
release-tools-lock: release-lock
+.if exists(${_TOOLS_COOKIE})
+${_TOOLS_COOKIE}:
+ @${DO_NADA}
+.else
${_TOOLS_COOKIE}: real-tools
+.endif
######################################################################
### real-tools (PRIVATE)