From 7fd04c2d697a38cf4109746e272bd0be03a1e3d5 Mon Sep 17 00:00:00 2001 From: jlam Date: Mon, 10 Jul 2006 22:59:26 +0000 Subject: Completely nuke the concept of PKG_PHASE from pkgsrc except for the purposes of caching MAKEVARS within bsd.pkg.mk and bsd.makevars.mk. --- cad/mex-wcalc/Makefile | 29 +++++++++++++++++++++++++---- cad/qcad/Makefile | 4 ++-- mail/mailfront/Makefile | 16 +++++++++------- mail/qgreylist/Makefile | 18 ++++++++++-------- mail/qmail-run/Makefile | 16 +++++++++------- math/octave-current/octave.mk | 16 +++++++--------- math/octave/octave.mk | 16 +++++++--------- mk/bsd.makevars.mk | 13 +++++-------- mk/bsd.pkg.mk | 5 ++--- mk/bsd.prefs.mk | 17 +---------------- net/djbdns-run/Makefile | 16 +++++++++------- regress/buildlink-transform/Makefile | 4 +--- 12 files changed, 87 insertions(+), 83 deletions(-) diff --git a/cad/mex-wcalc/Makefile b/cad/mex-wcalc/Makefile index fc96f37a1d9..816d777f57f 100644 --- a/cad/mex-wcalc/Makefile +++ b/cad/mex-wcalc/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2006/02/05 23:08:22 joerg Exp $ +# $NetBSD: Makefile,v 1.6 2006/07/10 22:59:26 jlam Exp $ # .include "../../cad/wcalc/Makefile.common" @@ -67,13 +67,34 @@ MATLAB_MEX?= ${DEF_MATLAB_MEX} PLIST_SUBST+= MEX_SUFX=${MEX_SUFX:Q} -.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE}) -MATLAB_DIR!= ${MATLAB_MEX} -v 2>/dev/null | ${AWK} '/[ \t]MATLAB[ \t]/ {print $$NF}' +.if !defined(MATLAB_DIR) +MATLAB_DIR!= \ + case ${MATLAB_MEX:Q}"" in \ + /*) matlab_mex=${MATLAB_MEX:Q} ;; \ + *) SAVEIFS="$$IFS"; IFS=:; \ + for p in $$PATH; do \ + ${TEST} ! -x $$p/${MATLAB_MEX} || \ + matlab_mex=$$p/${MATLAB_MEX}; \ + done; \ + IFS="$$SAVEIFS"; \ + ;; \ + esac; \ + if ${TEST} -z "$$matlab_mex"; then \ + ${ECHO} "MATLAB_DIR_not_set"; \ + else \ + $$matlab_mex -v 2>/dev/null | \ + ${AWK} 'BEGIN { s = "MATLAB_DIR_not_set" } \ + /[ \t]MATLAB[ \t]/ { s = $$NF } \ + END { print s }'; \ + fi +. if empty(MATLAB_DIR:M*not_set) +MAKEVARS+= MATLAB_DIR +. endif +.endif BUILDLINK_PASSTHRU_DIRS+= ${MATLAB_DIR}/extern/include BUILDLINK_PASSTHRU_DIRS+= ${MATLAB_DIR}/simulink/include BUILDLINK_PASSTHRU_DIRS+= ${MATLAB_DIR}/bin/${MATLAB_ARCH} -.endif .include "../../cad/libwcalc/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/cad/qcad/Makefile b/cad/qcad/Makefile index a84819a42b8..3b2aff735e9 100644 --- a/cad/qcad/Makefile +++ b/cad/qcad/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.39 2006/06/15 08:26:58 chap Exp $ +# $NetBSD: Makefile,v 1.40 2006/07/10 22:59:26 jlam Exp $ # DISTNAME= qcad-2.0.5.0-1-community.src @@ -27,7 +27,7 @@ MAKE_ENV+= QMAKESPEC=${QTDIR}/mkspecs/default PREPEND_PATH+= ${QTDIR}/bin # I really want this to be post-*patch* where it makes sense, but QTDIR isn't -# available until PHASES_AFTER_WRAPPER because it depends on +# available until after the wrapper phase because it depends on # BUILDLINK_PREFIX.qt3-libs, which buildlink3 sets. Nothing is easy. :) The # patches have replaced old hardcoded paths with fixed cookies @PREFIX@ and # @QTDIR@. The SUBST framework will replace the cookies with the proper diff --git a/mail/mailfront/Makefile b/mail/mailfront/Makefile index 86542ee55d4..2704702ad84 100644 --- a/mail/mailfront/Makefile +++ b/mail/mailfront/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.5 2005/12/29 06:21:50 jlam Exp $ +# $NetBSD: Makefile,v 1.6 2006/07/10 22:59:26 jlam Exp $ # DISTNAME= mailfront-0.98 @@ -23,12 +23,14 @@ RCD_SCRIPTS= smtpfront # Detect the PKG_SYSCONFDIR of the installed qmail, so we can create # config files there and refer to them from rc.d scripts. -.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE}) -INSTALLED_QMAIL!= ${PKG_BEST_EXISTS} ${DEPENDS_QMAIL:C/:.*$//:Q:S/\ / /g} -. if empty(INSTALLED_QMAIL:M*_not_found_) -. if !defined(PKG_SYSCONFDIR.mailfront) -PKG_SYSCONFDIR.mailfront!= ${PKG_INFO} -Q PKG_SYSCONFDIR ${INSTALLED_QMAIL} -. endif +# +.if !defined(PKG_SYSCONFDIR.mailfront) +PKG_SYSCONFDIR.mailfront!= \ + ${PKG_INFO} -Q PKG_SYSCONFDIR \ + ${DEPENDS_QMAIL:C/:.*$//:Q} 2>/dev/null || \ + ${ECHO} "PKG_SYSCONFDIR.mailfront_not_set" +. if empty(PKG_SYSCONFDIR.mailfront:M*not_set) +MAKEVARS+= PKG_SYSCONFDIR.mailfront . endif .endif diff --git a/mail/qgreylist/Makefile b/mail/qgreylist/Makefile index 2588258a867..e201001ada4 100644 --- a/mail/qgreylist/Makefile +++ b/mail/qgreylist/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.6 2005/12/29 06:21:53 jlam Exp $ +# $NetBSD: Makefile,v 1.7 2006/07/10 22:59:26 jlam Exp $ # DISTNAME= qgreylist-0.3 @@ -24,13 +24,15 @@ REPLACE_PERL= greylist .include "../../mk/bsd.prefs.mk" # Detect the PKG_SYSCONFDIR of the installed qmail, so we can create -# config files there. -.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE}) -INSTALLED_QMAIL!= ${PKG_BEST_EXISTS} ${DEPENDS_QMAIL:C/:.*$//:Q:S/\ / /g} -. if empty(INSTALLED_QMAIL:M*_not_found_) -. if !defined(PKG_SYSCONFDIR.qgreylist) -PKG_SYSCONFDIR.qgreylist!= ${PKG_INFO} -Q PKG_SYSCONFDIR ${INSTALLED_QMAIL} -. endif +# config files there and refer to them from rc.d scripts. +# +.if !defined(PKG_SYSCONFDIR.qgreylist) +PKG_SYSCONFDIR.qgreylist!= \ + ${PKG_INFO} -Q PKG_SYSCONFDIR \ + ${DEPENDS_QMAIL:C/:.*$//:Q} 2>/dev/null || \ + ${ECHO} "PKG_SYSCONFDIR.qgreylist_not_set" +. if empty(PKG_SYSCONFDIR.qgreylist:M*not_set) +MAKEVARS+= PKG_SYSCONFDIR.qgreylist . endif .endif diff --git a/mail/qmail-run/Makefile b/mail/qmail-run/Makefile index f0547ef7189..dbe799a4acc 100644 --- a/mail/qmail-run/Makefile +++ b/mail/qmail-run/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.18 2006/06/04 15:23:25 schmonz Exp $ +# $NetBSD: Makefile,v 1.19 2006/07/10 22:59:26 jlam Exp $ # DISTNAME= qmail-run-20060604 @@ -30,12 +30,14 @@ INSTALLATION_DIRS= bin share/doc/qmail-run share/examples/qmail-run # Detect the PKG_SYSCONFDIR of the installed qmail, so we can create # config files there and refer to them from rc.d scripts. -.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE}) -INSTALLED_QMAIL!= ${PKG_BEST_EXISTS} ${DEPENDS_QMAIL:C/:.*$//:Q:S/\ / /g} -. if empty(INSTALLED_QMAIL:M*_not_found_) -. if !defined(PKG_SYSCONFDIR.qmail-run) -PKG_SYSCONFDIR.qmail-run!= ${PKG_INFO} -Q PKG_SYSCONFDIR ${INSTALLED_QMAIL} -. endif +# +.if !defined(PKG_SYSCONFDIR.qmail-run) +PKG_SYSCONFDIR.qmail-run!= \ + ${PKG_INFO} -Q PKG_SYSCONFDIR \ + ${DEPENDS_QMAIL:C/:.*$//:Q} 2>/dev/null || \ + ${ECHO} "PKG_SYSCONFDIR.qmail-run_not_set" +. if empty(PKG_SYSCONFDIR.qmail-run:M*not_set) +MAKEVARS+= PKG_SYSCONFDIR.qmail-run . endif .endif diff --git a/math/octave-current/octave.mk b/math/octave-current/octave.mk index 449af13f75c..3dc36f38b0d 100644 --- a/math/octave-current/octave.mk +++ b/math/octave-current/octave.mk @@ -1,4 +1,4 @@ -# $NetBSD: octave.mk,v 1.5 2006/01/06 22:41:48 adam Exp $ +# $NetBSD: octave.mk,v 1.6 2006/07/10 22:59:26 jlam Exp $ .include "../../mk/bsd.prefs.mk" @@ -9,12 +9,10 @@ OCTAVE_CONFIG= ${LOCALBASE}/bin/octave-config OCTAVE_VARS?= LOCALVERFCNFILEDIR LOCALVEROCTFILEDIR LOCALVERARCHLIBDIR VERSION # Set OCT_ to the value of as returned by octave-config. -.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE}) -. if exists(${OCTAVE_CONFIG}) -. for var in ${OCTAVE_VARS} -. if !defined(OCT_${var}) -OCT_${var}!= ${OCTAVE_CONFIG} -p ${var} -. endif -. endfor -. endif +.if exists(${OCTAVE_CONFIG}) +. for var in ${OCTAVE_VARS} +. if !defined(OCT_${var}) +OCT_${var}!= ${OCTAVE_CONFIG} -p ${var} +. endif +. endfor .endif diff --git a/math/octave/octave.mk b/math/octave/octave.mk index 8bf35e3874a..7ffcdaaac46 100644 --- a/math/octave/octave.mk +++ b/math/octave/octave.mk @@ -1,4 +1,4 @@ -# $NetBSD: octave.mk,v 1.4 2005/12/05 20:50:36 rillig Exp $ +# $NetBSD: octave.mk,v 1.5 2006/07/10 22:59:26 jlam Exp $ .include "../../mk/bsd.prefs.mk" @@ -9,12 +9,10 @@ OCTAVE_CONFIG= ${LOCALBASE}/bin/octave-config OCTAVE_VARS?= LOCALVERFCNFILEDIR LOCALVEROCTFILEDIR LOCALVERARCHLIBDIR VERSION # Set OCT_ to the value of as returned by octave-config. -.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE}) -. if exists(${OCTAVE_CONFIG}) -. for _var_ in ${OCTAVE_VARS} -. if !defined(OCT_${_var_}) -OCT_${_var_}!= ${OCTAVE_CONFIG} -p ${_var_} -. endif -. endfor -. endif +.if exists(${OCTAVE_CONFIG}) +. for _var_ in ${OCTAVE_VARS} +. if !defined(OCT_${_var_}) +OCT_${_var_}!= ${OCTAVE_CONFIG} -p ${_var_} +. endif +. endfor .endif diff --git a/mk/bsd.makevars.mk b/mk/bsd.makevars.mk index 4d92635bdb3..fbbebcc6177 100644 --- a/mk/bsd.makevars.mk +++ b/mk/bsd.makevars.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.makevars.mk,v 1.3 2005/06/05 04:35:45 rillig Exp $ +# $NetBSD: bsd.makevars.mk,v 1.4 2006/07/10 22:59:27 jlam Exp $ # # This Makefile fragment is included by bsd.prefs.mk to set all of # the variables saved through MAKEVARS. Typical usage is: @@ -19,13 +19,10 @@ # and we only include the latest cache file that was created. # -.if !defined(_REV_ALL_PHASES) -_REV_ALL_PHASES= # empty -. for _phase_ in ${ALL_PHASES} -_REV_ALL_PHASES:= ${_phase_} ${_REV_ALL_PHASES} -. endfor -.endif -MAKEVARS+= _REV_ALL_PHASES +_ALL_PHASES= fetch tools extract patch \ + wrapper configure build install package +_REV_ALL_PHASES= package install build configure wrapper \ + patch extract tools fetch # Try including the *.makevars.mk files in reverse order so that the # latest file is included and no more. We check for _MAKEVARS_MK since diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index c7a3a3e23ea..234c91e3e15 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1867 2006/07/08 02:16:33 jlam Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1868 2006/07/10 22:59:27 jlam Exp $ # # This file is in the public domain. # @@ -1146,7 +1146,7 @@ PKG_ERROR_HANDLER.${_class_}?= { \ # file. These variables are effectively passed to sub-make processes # that are invoked on the same Makefile. # -.for _phase_ in ${ALL_PHASES} +.for _phase_ in ${_ALL_PHASES} ${_MAKEVARS_MK.${_phase_}}: ${WRKDIR} ${_PKG_SILENT}${_PKG_DEBUG}${RM} -f ${.TARGET}.tmp . for _var_ in ${MAKEVARS:O:u} @@ -1168,7 +1168,6 @@ ${_MAKEVARS_MK.${_phase_}}: ${WRKDIR} fi ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${.TARGET} .endfor -.undef _phase_ # show-tools emits a /bin/sh shell script that defines all known tools # to the values they have in the pkgsrc infrastructure. diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk index a23c3ca05fb..ca2fb382cf6 100644 --- a/mk/bsd.prefs.mk +++ b/mk/bsd.prefs.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.prefs.mk,v 1.227 2006/07/10 22:17:58 jlam Exp $ +# $NetBSD: bsd.prefs.mk,v 1.228 2006/07/10 22:59:27 jlam Exp $ # # Make file, included to get the site preferences, if any. Should # only be included by package Makefiles before any .if defined() @@ -325,21 +325,6 @@ PKG_FAIL_REASON+= "missing mk/platform/${OPSYS}.mk" .endif PKGDIRMODE?= 755 -PKG_PHASE?= none -# -# The PHASES_AFTER_ variables list every phase "greater than or -# equal to" . -# -ALL_PHASES= ${PHASES_AFTER_FETCH} -PHASES_AFTER_FETCH= fetch ${PHASES_AFTER_TOOLS} -PHASES_AFTER_TOOLS= tools ${PHASES_AFTER_EXTRACT} -PHASES_AFTER_EXTRACT= extract ${PHASES_AFTER_PATCH} -PHASES_AFTER_PATCH= patch ${PHASES_AFTER_WRAPPER} -PHASES_AFTER_WRAPPER= wrapper ${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 PKG_INSTALLATION_TYPES?= overwrite # This is a whitespace-separated list of installation types supported diff --git a/net/djbdns-run/Makefile b/net/djbdns-run/Makefile index 173bc169e23..86d028fce13 100644 --- a/net/djbdns-run/Makefile +++ b/net/djbdns-run/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.16 2006/04/27 22:46:10 jlam Exp $ +# $NetBSD: Makefile,v 1.17 2006/07/10 22:59:26 jlam Exp $ # DISTNAME= djbdns-run-20050415 @@ -40,12 +40,14 @@ INSTALLATION_DIRS= bin share/doc/djbdns-run # Detect the PKG_SYSCONFDIR of the installed djbdns, so we can create # config files there and refer to them from rc.d scripts. -.if !empty(PHASES_AFTER_EXTRACT:M${PKG_PHASE}) -INSTALLED_DJBDNS!= ${PKG_BEST_EXISTS} ${DEPENDS_DJBDNS:C/:.*$//:Q:S/\ / /g} -. if empty(INSTALLED_DJBDNS:M*_not_found_) -. if !defined(PKG_SYSCONFDIR.djbdns-run) -PKG_SYSCONFDIR.djbdns-run!= ${PKG_INFO} -Q PKG_SYSCONFDIR ${INSTALLED_DJBDNS} -. endif +# +.if !defined(PKG_SYSCONFDIR.djbdns-run) +PKG_SYSCONFDIR.djbdns-run!= \ + ${PKG_INFO} -Q PKG_SYSCONFDIR \ + ${DEPENDS_DJBDNS:C/:.*$//:Q} 2>/dev/null || \ + ${ECHO} "PKG_SYSCONFDIR.djbdns-run_not_set" +. if empty(PKG_SYSCONFDIR.djbdns-run:M*not_set) +MAKEVARS+= PKG_SYSCONFDIR.djbdns-run . endif .endif diff --git a/regress/buildlink-transform/Makefile b/regress/buildlink-transform/Makefile index b3e5345f1b3..a3a956a6fe6 100644 --- a/regress/buildlink-transform/Makefile +++ b/regress/buildlink-transform/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.17 2005/12/17 05:20:23 jlam Exp $ +# $NetBSD: Makefile,v 1.18 2006/07/10 22:59:27 jlam Exp $ # # Run many buildlink transform tests in a single regression test to avoid # having to keep creating the wrapper scripts over and over again. @@ -30,9 +30,7 @@ BUILDLINK_TRANSFORM+= rmdir:/opt/schily BUILDLINK_TRANSFORM+= l:readline:edit:termcap:m REGRESS_ENV= PATH=${PATH} -.if defined(PHASES_AFTER_WRAPPER) REGRESS_ENV+= WRAPPER_DEBUG=yes -.endif # Create a "regress" script in the wrapper directory that just echoes its # arguments. -- cgit v1.2.3