pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/tools Define the "TOOL" names for the tools to be t...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/84665ee6a04d
branches:  trunk
changeset: 493645:84665ee6a04d
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed May 11 05:05:03 2005 +0000

description:
Define the "TOOL" names for the tools to be the same as the "TOOLS_TOOL"
names if the former are undefined.  This allows the "TOOL" names, e.g.
GMAKE, YACC, etc., to be used by package Makefiles for simplicity.

diffstat:

 mk/tools/replace.mk |  45 ++++++++++++++++++++++++++-------------------
 1 files changed, 26 insertions(+), 19 deletions(-)

diffs (74 lines):

diff -r 47d94d90a562 -r 84665ee6a04d mk/tools/replace.mk
--- a/mk/tools/replace.mk       Wed May 11 04:01:49 2005 +0000
+++ b/mk/tools/replace.mk       Wed May 11 05:05:03 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.65 2005/05/10 19:06:59 jlam Exp $
+# $NetBSD: replace.mk,v 1.66 2005/05/11 05:05:03 jlam Exp $
 #
 # This Makefile fragment handles "replacements" of system-supplied
 # tools with pkgsrc versions.
@@ -854,6 +854,26 @@
 
 ######################################################################
 
+# 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 ${PKGSRC_USE_TOOLS:O:u}
+_TOOLS_USE_PKGSRC.${_t_}?=     no
+.  if defined(_TOOLS_VARNAME.${_t_})
+.    if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])
+.      if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
+${_TOOLS_VARNAME.${_t_}}?=     ${TOOLS_PLATFORM.${_t_}}
+.      endif
+.    else
+${_TOOLS_VARNAME.${_t_}}?=     ${TOOLS_${TOOLS_PLATFORM.${_t_}}}
+.    endif
+.  endif
+.endfor
+.undef _t_
+
+######################################################################
+
 # If we are using the system-supplied tool, create symlinks or wrappers
 # for each of the tools requested.
 #
@@ -865,7 +885,9 @@
 #
 # Always set the "TOOLS_TOOL" name for each tool to point to the real
 # command, e.g., TOOLS_TBL, TOOLS_YACC, etc., provided that "TOOL" has
-# been associated with <tool>.
+# been associated with <tool>.  If the "TOOL" name is undefined, then
+# set it to the same value to provide a simple name for use by package
+# Makefiles.
 #
 .for _t_ in ${_USE_TOOLS}
 .  if !defined(TOOLS_IGNORE.${_t_}) && \
@@ -887,24 +909,9 @@
 .      endif
 .    endif
 .  endif
-.endfor
-.undef _t_
-
-######################################################################
-
-# 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 ${PKGSRC_USE_TOOLS:O:u}
-_TOOLS_USE_PKGSRC.${_t_}?=     no
 .  if defined(_TOOLS_VARNAME.${_t_})
-.    if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])
-.      if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
-${_TOOLS_VARNAME.${_t_}}?=     ${TOOLS_PLATFORM.${_t_}}
-.      endif
-.    else
-${_TOOLS_VARNAME.${_t_}}?=     ${TOOLS_${TOOLS_PLATFORM.${_t_}}}
+.    if defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
+${_TOOLS_VARNAME.${_t_}}?=     ${TOOLS_${_TOOLS_VARNAME.${_t_}}}
 .    endif
 .  endif
 .endfor



Home | Main Index | Thread Index | Old Index