pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk There is still one small but important distinction ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4f8a25b31318
branches:  trunk
changeset: 496936:4f8a25b31318
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Sat Jul 16 22:33:18 2005 +0000

description:
There is still one small but important distinction between some of the
tools listed in USE_TOOLS -- some of them are required by the pkgsrc
infrastructure in variable assignment statements that look like:

    VARIABLE!=  ${AWK} ...

These tools are actually *required* by pkgsrc to be installed on the
system before it can even work (bootstrap situation).  For these tools,
only override the "TOOL" name representing the tool if we're really
using the pkgsrc version of the tool.

We accomplish this by adding a new :pkgsrc modifier that is appended
to these tools listed in USE_TOOLS.  We also list these tools in
bsd.prefs.mk so that all packages pick them up fairly early on.

diffstat:

 mk/bsd.prefs.mk     |   5 ++++-
 mk/tools/replace.mk |  18 +++++++++++-------
 2 files changed, 15 insertions(+), 8 deletions(-)

diffs (58 lines):

diff -r eb0aea83eee6 -r 4f8a25b31318 mk/bsd.prefs.mk
--- a/mk/bsd.prefs.mk   Sat Jul 16 20:27:10 2005 +0000
+++ b/mk/bsd.prefs.mk   Sat Jul 16 22:33:18 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.196 2005/07/15 18:27:55 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.197 2005/07/16 22:33:18 jlam Exp $
 #
 # Make file, included to get the site preferences, if any.  Should
 # only be included by package Makefiles before any .if defined()
@@ -567,4 +567,7 @@
 # Make variable definitions cache
 .include "${PKGSRCDIR}/mk/bsd.makevars.mk"
 
+_PKGSRC_USE_TOOLS=     awk cut echo pwd sed tr uname
+USE_TOOLS+=            ${_PKGSRC_USE_TOOLS:S/$/:pkgsrc/}
+
 .endif # BSD_PKG_MK
diff -r eb0aea83eee6 -r 4f8a25b31318 mk/tools/replace.mk
--- a/mk/tools/replace.mk       Sat Jul 16 20:27:10 2005 +0000
+++ b/mk/tools/replace.mk       Sat Jul 16 22:33:18 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.111 2005/07/16 05:34:59 jlam Exp $
+# $NetBSD: replace.mk,v 1.112 2005/07/16 22:33:18 jlam Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -114,9 +114,13 @@
 
 ######################################################################
 
-# Set the type of dependency requested for the tool.
+# Set the type of dependency requested for the tool.  The type of
+# dependency is determined by the modifier specified for each tool:
 #
-.for _t_ in ${USE_TOOLS:N*\:*} ${USE_TOOLS:M*\:build}
+#    BUILD_DEPENDS:    :build (default), :pkgsrc
+#    DEPENDS:          :run
+#
+.for _t_ in ${USE_TOOLS:N*\:*} ${USE_TOOLS:M*\:build} ${USE_TOOLS:M*\:pkgsrc}
 _TOOLS_DEPMETHOD.${_t_:C/:.*//}=       BUILD_DEPENDS
 .endfor
 .for _t_ in ${USE_TOOLS:M*\:run}
@@ -1226,11 +1230,11 @@
 
 ######################################################################
 
-# For each tool, make sure that the "TOOL" name points to the real
-# command, e.g., AWK, SED, etc., provided that "TOOL" has been
-# associated with <tool>.
+# For each tool that pkgsrc requires, make sure that the "TOOL" name
+# points to the real command, e.g., AWK, SED, etc., provided that
+# "TOOL" has been associated with <tool>.
 #
-.for _t_ in ${_USE_TOOLS}
+.for _t_ in ${USE_TOOLS:M*\:pkgsrc:C/:.*//:O:u}
 _TOOLS_USE_PKGSRC.${_t_}?=     no
 .  if defined(_TOOLS_VARNAME.${_t_})
 .    if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])



Home | Main Index | Thread Index | Old Index