summaryrefslogtreecommitdiff
path: root/mk/buildlink3
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-07-05 22:21:02 +0000
committerjlam <jlam@pkgsrc.org>2006-07-05 22:21:02 +0000
commitb8d23232b8a809ac454e7b3cd51ecea739bfea3f (patch)
treea30da33e80fce02ecc002e9c7ee00e2f7d9cda05 /mk/buildlink3
parentf1e543002136be39ecf208cb90ccf6c25f65b2b0 (diff)
downloadpkgsrc-b8d23232b8a809ac454e7b3cd51ecea739bfea3f.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/buildlink3')
-rw-r--r--mk/buildlink3/bsd.buildlink3.mk27
1 files changed, 7 insertions, 20 deletions
diff --git a/mk/buildlink3/bsd.buildlink3.mk b/mk/buildlink3/bsd.buildlink3.mk
index fdf2c7e6e4c..ab2549e2a03 100644
--- a/mk/buildlink3/bsd.buildlink3.mk
+++ b/mk/buildlink3/bsd.buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink3.mk,v 1.179 2006/06/09 06:02:33 rillig Exp $
+# $NetBSD: bsd.buildlink3.mk,v 1.180 2006/07/05 22:21:02 jlam Exp $
#
# Copyright (c) 2004 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -163,19 +163,6 @@ _BLNK_DEPENDS+= ${_pkg_}
BUILDLINK_DEPMETHOD.${_pkg_}?= full
.endfor
-# We skip the dependency calculation for some phases since they never
-# use the dependency information.
-#
-_BLNK_PHASES_SKIP_DEPENDS= configure build test
-_BLNK_PHASES_RECURSIVE_DEPENDS= none
-.if !empty(_BLNK_PHASES_SKIP_DEPENDS:M${PKG_PHASE})
-_BLNK_DEPENDS_LIST= # empty
-.elif !empty(_BLNK_PHASES_RECURSIVE_DEPENDS:M${PKG_PHASE})
-_BLNK_DEPENDS_LIST= ${_BLNK_RECURSIVE_DEPENDS}
-.else
-_BLNK_DEPENDS_LIST= ${_BLNK_DEPENDS}
-.endif
-
# Add the proper dependency on each package pulled in by buildlink3.mk
# files. BUILDLINK_DEPMETHOD.<pkg> contains a list of either "full" or
# "build", and if any of that list is "full" then we use a full dependency
@@ -185,7 +172,7 @@ _BLNK_ADD_TO.DEPENDS= # empty
_BLNK_ADD_TO.BUILD_DEPENDS= # empty
_BLNK_ADD_TO.ABI_DEPENDS= # empty
_BLNK_ADD_TO.BUILD_ABI_DEPENDS= # empty
-.for _pkg_ in ${_BLNK_DEPENDS_LIST}
+.for _pkg_ in ${_BLNK_DEPENDS}
. if !empty(BUILDLINK_DEPMETHOD.${_pkg_}:Mfull)
_BLNK_DEPMETHOD.${_pkg_}= _BLNK_ADD_TO.DEPENDS
_BLNK_ABIMETHOD.${_pkg_}= _BLNK_ADD_TO.ABI_DEPENDS
@@ -214,12 +201,12 @@ ${_BLNK_ABIMETHOD.${_pkg_}}+= ${_abi_}:${BUILDLINK_PKGSRCDIR.${_pkg_}}
. if !empty(_BLNK_ADD_TO.${_depmethod_})
${_depmethod_}+= ${_BLNK_ADD_TO.${_depmethod_}}
. endif
-.endfor # _BLNK_DEPENDS_LIST
+.endfor # _BLNK_DEPENDS
###
-### BEGIN: after "wrapper" phase
+### BEGIN: after the barrier
###
-.if !empty(PHASES_AFTER_WRAPPER:M${PKG_PHASE})
+.if exists(${_BARRIER_COOKIE})
# Generate default values for:
#
@@ -1081,7 +1068,7 @@ do-buildlink:
@${DO_NADA}
.endif
-.endif # PHASES_AFTER_WRAPPER
+.endif
###
-### END: after "wrapper" phase
+### END: after the barrier
###