summaryrefslogtreecommitdiff
path: root/mk/bsd.prefs.mk
diff options
context:
space:
mode:
authorjlam <jlam>2004-01-21 18:13:27 +0000
committerjlam <jlam>2004-01-21 18:13:27 +0000
commit73f383a881b15103018de6d2cde1532262048412 (patch)
treee7bdd4ea3b92cff63b3e9fd1ef346b615228f2cc /mk/bsd.prefs.mk
parent3b615d38132f668a1b6f098d7f848fb0d52e5ae8 (diff)
downloadpkgsrc-73f383a881b15103018de6d2cde1532262048412.tar.gz
Introduce concept of the "phase" that we're in as we progress through
fetching, extracting, configuring, building, etc. of a package. We can check what phase we're in by examining the value of ${PKG_PHASE} and comparing against PHASES_AFTER_<phase>, which list phases that are "greater than or equal to" <phase>. One useful example of how to use PKG_PHASE is: .if !empty(PHASES_AFTER_EXTRACT:${PKG_PHASE}) # # Some variable settings or targets here that rely on dependencies to # already be installed, or ${WRKDIR} to be created, etc., as these are # things that should have happened by the time "make extract" is # completed. # .endif
Diffstat (limited to 'mk/bsd.prefs.mk')
-rw-r--r--mk/bsd.prefs.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index d4e85a054b6..262e41f673d 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.139 2003/12/28 11:23:28 agc Exp $
+# $NetBSD: bsd.prefs.mk,v 1.140 2004/01/21 18:13:27 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -238,6 +238,20 @@ SHAREMODE?= ${DOCMODE}
. include "${.CURDIR}/mk/defs.NetBSD.mk"
.endif
+PKG_PHASE?= none
+#
+# The PHASES_AFTER_<phase> variables list every phase "greater than or
+# equal to" <phase>.
+#
+PHASES_AFTER_EXTRACT= extract ${PHASES_AFTER_PATCH}
+PHASES_AFTER_PATCH= patch ${PHASES_AFTER_TOOLS}
+PHASES_AFTER_TOOLS= tools ${PHASES_AFTER_BUILDLINK}
+PHASES_AFTER_BUILDLINK= buildlink ${PHASES_AFTER_CONFIGURE}
+PHASES_AFTER_CONFIGURE= configure ${PHASES_AFTER_BUILD}
+PHASES_AFTER_BUILD= build ${PHASES_AFTER_INSTALL}
+PHASES_AFTER_INSTALL= install ${PHASES_AFTER_PACKAGE}
+PHASES_AFTER_PACKAGE= package
+
# if the system is IPv6-ready, compile with IPv6 support turned on.
.if defined(USE_INET6)
. if empty(USE_INET6:M[Yy][Ee][Ss]) || defined(USE_SOCKS)