summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2005-05-21 23:09:36 +0000
committerjlam <jlam@pkgsrc.org>2005-05-21 23:09:36 +0000
commit57927142699d015a82aba2bd24438bf84176df47 (patch)
tree2bcae73ecf732740551bf88230b645f2ffc1f0dd /mk
parent3945866014b4bd444493f63c7e18377412965bab (diff)
downloadpkgsrc-57927142699d015a82aba2bd24438bf84176df47.tar.gz
For packages that use GNU configure scripts, pass the real command
paths for the tools that the package uses through the shell environment. We do this since these paths may be hardcoded into package scripts, and if they're not pre-specified, then they'll be searched for in the PATH, which would find the ones in ${TOOLS_DIR}. The variable names that GNU configure scripts expect are named in _TOOLS_VARNAME_GNU.* for the various tools.
Diffstat (limited to 'mk')
-rw-r--r--mk/tools/defaults.mk33
-rw-r--r--mk/tools/replace.mk20
2 files changed, 51 insertions, 2 deletions
diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk
index 032f1e77c2d..93151e8e2d6 100644
--- a/mk/tools/defaults.mk
+++ b/mk/tools/defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.18 2005/05/21 04:53:17 jlam Exp $
+# $NetBSD: defaults.mk,v 1.19 2005/05/21 23:09:36 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -48,7 +48,10 @@ TOOLS_DEFAULTS_MK= defined
. include "${_PKGSRC_TOPDIR}/mk/tools/tools.${OPSYS}.mk"
.endif
+######################################################################
+
# "TOOL" variable names associated with each of the tools
+
_TOOLS_VARNAME.awk= AWK
_TOOLS_VARNAME.basename= BASENAME
_TOOLS_VARNAME.bison-yacc= YACC
@@ -124,6 +127,34 @@ _TOOLS_VARNAME.yacc= YACC
######################################################################
+# "TOOL" variable names associated with each of the tools that are
+# expected by GNU configure script.
+
+_TOOLS_VARNAME_GNU.awk= AWK
+_TOOLS_VARNAME_GNU.bison-yacc= YACC
+_TOOLS_VARNAME_GNU.chmod= CHMOD
+_TOOLS_VARNAME_GNU.cmp= CMP
+_TOOLS_VARNAME_GNU.cp= CP
+_TOOLS_VARNAME_GNU.echo= ECHO
+_TOOLS_VARNAME_GNU.egrep= EGREP
+_TOOLS_VARNAME_GNU.gawk= AWK
+_TOOLS_VARNAME_GNU.gm4= M4
+_TOOLS_VARNAME_GNU.gsed= SED
+_TOOLS_VARNAME_GNU.gtar= TAR
+_TOOLS_VARNAME_GNU.hostname= HOSTNAME
+_TOOLS_VARNAME_GNU.install= INSTALL
+_TOOLS_VARNAME_GNU.lex= LEX
+_TOOLS_VARNAME_GNU.ln= LN
+_TOOLS_VARNAME_GNU.m4= M4
+_TOOLS_VARNAME_GNU.mv= MV
+_TOOLS_VARNAME_GNU.perl= PERL
+_TOOLS_VARNAME_GNU.rm= RM
+_TOOLS_VARNAME_GNU.sed= SED
+_TOOLS_VARNAME_GNU.tar= TAR
+_TOOLS_VARNAME_GNU.yacc= YACC
+
+######################################################################
+
# Set a default value for the TOOL names for each of the tools we claim
# we'll use in PKGSRC_USE_TOOLS to point to the platform command, e.g.,
# TBL, YACC, etc. These tools are used in the top-level make(1), not
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index 361db1d6538..0d8a25f766e 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.89 2005/05/21 04:53:17 jlam Exp $
+# $NetBSD: replace.mk,v 1.90 2005/05/21 23:09:36 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -1180,3 +1180,21 @@ ${_v_}?= ${TOOLS_${_TOOLS_VARNAME.${_t_}}}
. endif
.endfor
.undef _t_
+
+######################################################################
+
+# For packages that use GNU configure scripts, pass the real command
+# paths for the tools that the package uses through the shell environment.
+# We do this since these paths may be hardcoded into package scripts,
+# and if they're not pre-specified, then they'll be searched for in the
+# PATH, which would find the ones in ${TOOLS_DIR}.
+#
+.if defined(GNU_CONFIGURE)
+. for _t_ in ${_USE_TOOLS}
+. if defined(_TOOLS_VARNAME_GNU.${_t_}) && \
+ defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
+CONFIGURE_ENV+= \
+ ${_TOOLS_VARNAME_GNU.${_t_}}=${TOOLS_${_TOOLS_VARNAME.${_t_}}:Q}
+. endif
+. endfor
+.endif