pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/tools Rewrite so that we avoid needing to check the...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1ec28ef46e0b
branches:  trunk
changeset: 493668:1ec28ef46e0b
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed May 11 20:09:44 2005 +0000

description:
Rewrite so that we avoid needing to check the value of TOOLS_REAL_CMD.*
within make.  This allows us to use EVAL_PREFIX to locate the installation
prefix for autoconf and automake, which is more pkgviews-friendly.  In any
case, this implementation is a lot simpler anyway.

diffstat:

 mk/tools/autoconf.mk |  111 +++++++++++++++++++++++++-------------------------
 mk/tools/automake.mk |   80 +++++++++++++++++-------------------
 2 files changed, 93 insertions(+), 98 deletions(-)

diffs (288 lines):

diff -r 83274cf8aaf0 -r 1ec28ef46e0b mk/tools/autoconf.mk
--- a/mk/tools/autoconf.mk      Wed May 11 19:42:17 2005 +0000
+++ b/mk/tools/autoconf.mk      Wed May 11 20:09:44 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: autoconf.mk,v 1.5 2005/05/10 19:34:02 jlam Exp $
+# $NetBSD: autoconf.mk,v 1.6 2005/05/11 20:09:44 jlam Exp $
 #
 # This Makefile fragment handles packages that use GNU autoconf.
 #
@@ -37,18 +37,18 @@
 # This is an exhaustive list of all of the scripts supplied by GNU
 # autoconf.
 #
-_TOOLS_AUTOCONF=               autoconf autoheader autom4te autoreconf \
-                               autoscan autoupdate ifnames
+_TOOLS_AC_NAMES=       autoconf        autoconf-2.13
+_TOOLS_AC_NAMES+=      autoheader      autoheader-2.13 
+_TOOLS_AC_NAMES+=      autom4te
+_TOOLS_AC_NAMES+=      autoreconf      autoreconf-2.13
+_TOOLS_AC_NAMES+=      autoscan        autoscan-2.13
+_TOOLS_AC_NAMES+=      autoupdate      autoupdate-2.13
+_TOOLS_AC_NAMES+=      ifnames         ifnames-2.13
 
-_TOOLS_AUTOCONF.autoconf=      autoconf        autoconf-2.13
-_TOOLS_AUTOCONF.autoheader=    autoheader      autoheader-2.13 
-_TOOLS_AUTOCONF.autom4te=      autom4te
-_TOOLS_AUTOCONF.autoreconf=    autoreconf      autoreconf-2.13
-_TOOLS_AUTOCONF.autoscan=      autoscan        autoscan-2.13
-_TOOLS_AUTOCONF.autoupdate=    autoupdate      autoupdate-2.13
-_TOOLS_AUTOCONF.ifnames=       ifnames         ifnames-2.13
-
-_TOOLS_AUTOCONF_LINKS= # empty
+.for _t_ in ${_TOOLS_AC_NAMES}
+_TOOLS_AC_TYPE.${_t_}?=        TOOLS_GNU_MISSING
+.endfor _t_
+.undef _t_
 
 .if !defined(TOOLS_IGNORE.autoconf) && !empty(USE_TOOLS:Mautoconf)
 .  if !empty(PKGPATH:Mdevel/autoconf)
@@ -61,27 +61,28 @@
 .    if empty(${TOOLS_DEPMETHOD.autoconf}:M${TOOLS_DEPENDS.autoconf})
 ${TOOLS_DEPMETHOD.autoconf}+=  ${TOOLS_DEPENDS.autoconf}
 .    endif
+EVAL_PREFIX+=                  _TOOLS_AC_PREFIX=autoconf
 
-_TOOLS_AUTOCONF_LINKS+=                autoconf
-TOOLS_REAL_CMD.autoconf=       ${LOCALBASE}/bin/autoconf
+_TOOLS_AC_TYPE.autoconf=       TOOLS_CREATE
+TOOLS_REAL_CMD.autoconf=       ${_TOOLS_AC_PREFIX}/bin/autoconf
 
-_TOOLS_AUTOCONF_LINKS+=                autoheader
-TOOLS_REAL_CMD.autoheader=     ${LOCALBASE}/bin/autoheader
+_TOOLS_AC_TYPE.autoheader=     TOOLS_CREATE
+TOOLS_REAL_CMD.autoheader=     ${_TOOLS_AC_PREFIX}/bin/autoheader
 
-_TOOLS_AUTOCONF_LINKS+=                autom4te
-TOOLS_REAL_CMD.autom4te=       ${LOCALBASE}/bin/autom4te
+_TOOLS_AC_TYPE.autom4te=       TOOLS_CREATE
+TOOLS_REAL_CMD.autom4te=       ${_TOOLS_AC_PREFIX}/bin/autom4te
 
-_TOOLS_AUTOCONF_LINKS+=                autoreconf
-TOOLS_REAL_CMD.autoreconf=     ${LOCALBASE}/bin/autoreconf
+_TOOLS_AC_TYPE.autoreconf=     TOOLS_CREATE
+TOOLS_REAL_CMD.autoreconf=     ${_TOOLS_AC_PREFIX}/bin/autoreconf
 
-_TOOLS_AUTOCONF_LINKS+=                autoscan
-TOOLS_REAL_CMD.autoscan=       ${LOCALBASE}/bin/autoscan
+_TOOLS_AC_TYPE.autoscan=       TOOLS_CREATE
+TOOLS_REAL_CMD.autoscan=       ${_TOOLS_AC_PREFIX}/bin/autoscan
 
-_TOOLS_AUTOCONF_LINKS+=                autoupdate
-TOOLS_REAL_CMD.autoupdate=     ${LOCALBASE}/bin/autoupdate
+_TOOLS_AC_TYPE.autoupdate=     TOOLS_CREATE
+TOOLS_REAL_CMD.autoupdate=     ${_TOOLS_AC_PREFIX}/bin/autoupdate
 
-_TOOLS_AUTOCONF_LINKS+=                ifnames
-TOOLS_REAL_CMD.ifnames=                ${LOCALBASE}/bin/ifnames
+_TOOLS_AC_TYPE.ifnames=                TOOLS_CREATE
+TOOLS_REAL_CMD.ifnames=                ${_TOOLS_AC_PREFIX}/bin/ifnames
 
 # Continue to define the following variables until packages have been
 # taught to just use "autoconf", "autoheader", and "autoreconf" instead.
@@ -103,24 +104,37 @@
 .    if empty(${TOOLS_DEPMETHOD.autoconf213}:M${TOOLS_DEPENDS.autoconf213})
 ${TOOLS_DEPMETHOD.autoconf213}+=       ${TOOLS_DEPENDS.autoconf213}
 .    endif
+EVAL_PREFIX+=                  _TOOLS_AC_PREFIX=autoconf213
 
-_TOOLS_AUTOCONF_LINKS+=                autoconf
-TOOLS_REAL_CMD.autoconf=       ${LOCALBASE}/bin/autoconf-2.13
+_TOOLS_AC_TYPE.autoconf-2.13=  TOOLS_CREATE
+_TOOLS_AC_TYPE.autoconf=       # empty
+TOOLS_REAL_CMD.autoconf-2.13=  ${_TOOLS_AC_PREFIX}/bin/autoconf-2.13
+TOOLS_ALIASES.autoconf-2.13=   autoconf
 
-_TOOLS_AUTOCONF_LINKS+=                autoheader
-TOOLS_REAL_CMD.autoheader=     ${LOCALBASE}/bin/autoheader-2.13
+_TOOLS_AC_TYPE.autoheader-2.13=        TOOLS_CREATE
+_TOOLS_AC_TYPE.autoheader=     # empty
+TOOLS_REAL_CMD.autoheader-2.13=        ${_TOOLS_AC_PREFIX}/bin/autoheader-2.13
+TOOLS_ALIASES.autoheader-2.13= autoheader
 
-_TOOLS_AUTOCONF_LINKS+=                autoreconf
-TOOLS_REAL_CMD.autoreconf=     ${LOCALBASE}/bin/autoreconf-2.13
+_TOOLS_AC_TYPE.autoreconf-2.13=        TOOLS_CREATE
+_TOOLS_AC_TYPE.autoreconf=     # empty
+TOOLS_REAL_CMD.autoreconf-2.13=        ${_TOOLS_AC_PREFIX}/bin/autoreconf-2.13
+TOOLS_ALIASES.autoreconf-2.13= autoreconf
 
-_TOOLS_AUTOCONF_LINKS+=                autoscan
-TOOLS_REAL_CMD.autoscan=       ${LOCALBASE}/bin/autoscan-2.13
+_TOOLS_AC_TYPE.autoscan-2.13=  TOOLS_CREATE
+_TOOLS_AC_TYPE.autoscan=       # empty
+TOOLS_REAL_CMD.autoscan-2.13=  ${_TOOLS_AC_PREFIX}/bin/autoscan-2.13
+TOOLS_ALIASES.autoscan-2.13=   autoscan
 
-_TOOLS_AUTOCONF_LINKS+=                autoupdate
-TOOLS_REAL_CMD.autoupdate=     ${LOCALBASE}/bin/autoupdate-2.13
+_TOOLS_AC_TYPE.autoupdate-2.13=        TOOLS_CREATE
+_TOOLS_AC_TYPE.autoupdate=     # empty
+TOOLS_REAL_CMD.autoupdate-2.13=        ${_TOOLS_AC_PREFIX}/bin/autoupdate-2.13
+TOOLS_ALIASES.autoupdate-2.13= autoupdate
 
-_TOOLS_AUTOCONF_LINKS+=                ifnames
-TOOLS_REAL_CMD.ifnames=                ${LOCALBASE}/bin/ifnames-2.13
+_TOOLS_AC_TYPE.ifnames-2.13=   TOOLS_CREATE
+_TOOLS_AC_TYPE.ifnames=                # empty
+TOOLS_REAL_CMD.ifnames-2.13=   ${_TOOLS_AC_PREFIX}/bin/ifnames-2.13
+TOOLS_ALIASES.ifnames-2.13=    ifnames
 
 # Continue to define the following variables until packages have been
 # taught to just use "autoconf", "autoheader", and "autoreconf" instead.
@@ -135,27 +149,14 @@
 .  endif
 .endif
 
-# For every script that hasn't already been symlinked, we mark it as
-# "GNU missing".
-#
+# If the package wants to override the GNU auto* tools, then do it.
 AUTOMAKE_OVERRIDE?=    yes
 .if !empty(AUTOMAKE_OVERRIDE:M[yY][eE][sS])
-TOOLS_CREATE+=         ${_TOOLS_AUTOCONF_LINKS}
-.  for _t_ in ${_TOOLS_AUTOCONF_LINKS}
-.    for _s_ in ${_TOOLS_AUTOCONF.${_t_}}
-.      if empty(TOOLS_REAL_CMD.${_t_}:M*/${_s_})
-TOOLS_GNU_MISSING+=    ${_s_}
-.      endif
-.    endfor
-.  endfor
-.  for _t_ in ${_TOOLS_AUTOCONF}
-.    if empty(_TOOLS_AUTOCONF_LINKS:M${_t_})
-.      for _s_ in ${_TOOLS_AUTOCONF.${_t_}}
-TOOLS_GNU_MISSING+=    ${_s_}
-.      endfor
+.  for _t_ in ${_TOOLS_AC_NAMES}
+.    if !empty(_TOOLS_AC_TYPE.${_t_})
+${_TOOLS_AC_TYPE.${_t_}}+=     ${_t_}
 .    endif
 .  endfor
-.  undef _s_
 .  undef _t_
 .endif
 
diff -r 83274cf8aaf0 -r 1ec28ef46e0b mk/tools/automake.mk
--- a/mk/tools/automake.mk      Wed May 11 19:42:17 2005 +0000
+++ b/mk/tools/automake.mk      Wed May 11 20:09:44 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: automake.mk,v 1.5 2005/05/10 19:34:02 jlam Exp $
+# $NetBSD: automake.mk,v 1.6 2005/05/11 20:09:44 jlam Exp $
 #
 # This Makefile fragment handles packages that use GNU automake.
 #
@@ -50,22 +50,23 @@
 # This is an exhaustive list of all of the scripts supplied by GNU
 # automake.
 #
-_TOOLS_AUTOMAKE=               aclocal automake
+_TOOLS_AM_NAMES=       aclocal         aclocal-1.4                     \
+                                       aclocal-1.5                     \
+                                       aclocal-1.6                     \
+                                       aclocal-1.7                     \
+                                       aclocal-1.8                     \
+                                       aclocal-1.9
+_TOOLS_AM_NAMES+=      automake        automake-1.4                    \
+                                       automake-1.5                    \
+                                       automake-1.6                    \
+                                       automake-1.7                    \
+                                       automake-1.8                    \
+                                       automake-1.9
 
-_TOOLS_AUTOMAKE.aclocal=       aclocal         aclocal-1.4             \
-                                               aclocal-1.5             \
-                                               aclocal-1.6             \
-                                               aclocal-1.7             \
-                                               aclocal-1.8             \
-                                               aclocal-1.9
-_TOOLS_AUTOMAKE.automake=      automake        automake-1.4            \
-                                               automake-1.5            \
-                                               automake-1.6            \
-                                               automake-1.7            \
-                                               automake-1.8            \
-                                               automake-1.9
-
-_TOOLS_AUTOMAKE_LINKS= # empty
+.for _t_ in ${_TOOLS_AM_NAMES}
+_TOOLS_AM_TYPE.${_t_}?=        TOOLS_GNU_MISSING
+.endfor
+.undef _t_
 
 .if !defined(TOOLS_IGNORE.automake) && !empty(USE_TOOLS:Mautomake)
 .  if !empty(PKGPATH:Mdevel/automake)
@@ -78,12 +79,13 @@
 .    if empty(${TOOLS_DEPMETHOD.automake}:M${TOOLS_DEPENDS.automake})
 ${TOOLS_DEPMETHOD.automake}+=  ${TOOLS_DEPENDS.automake}
 .    endif
+EVAL_PREFIX+=                  _TOOLS_AM_PREFIX=automake
 
-_TOOLS_AUTOMAKE_LINKS+=                aclocal
-TOOLS_REAL_CMD.aclocal=                ${LOCALBASE}/bin/aclocal
+_TOOLS_AM_TYPE.aclocal=                TOOLS_CREATE
+TOOLS_REAL_CMD.aclocal=                ${_TOOLS_AM_PREFIX}/bin/aclocal
 
-_TOOLS_AUTOMAKE_LINKS+=                automake
-TOOLS_REAL_CMD.automake=       ${LOCALBASE}/bin/automake
+_TOOLS_AM_TYPE.automake=       TOOLS_CREATE
+TOOLS_REAL_CMD.automake=       ${_TOOLS_AM_PREFIX}/bin/automake
 
 # Continue to define the following variables until packages have been
 # taught to just use "aclocal" and "automake" instead.
@@ -104,42 +106,34 @@
 .    if empty(${TOOLS_DEPMETHOD.automake14}:M${TOOLS_DEPENDS.automake14})
 ${TOOLS_DEPMETHOD.automake14}+=        ${TOOLS_DEPENDS.automake14}
 .    endif
+EVAL_PREFIX+=                  _TOOLS_AM_PREFIX=automake14
 
-_TOOLS_AUTOMAKE_LINKS+=                aclocal
-TOOLS_REAL_CMD.aclocal=                ${LOCALBASE}/bin/aclocal-1.4
+_TOOLS_AM_TYPE.aclocal-1.4=    TOOLS_CREATE
+_TOOLS_AM_TYPE.aclocal=                # empty
+TOOLS_REAL_CMD.aclocal-1.4=    ${_TOOLS_AM_PREFIX}/bin/aclocal-1.4
+TOOLS_ALIASES.aclocal-1.4=     aclocal
 
-_TOOLS_AUTOMAKE_LINKS+=                automake
-TOOLS_REAL_CMD.automake=       ${LOCALBASE}/bin/automake-1.4
+_TOOLS_AM_TYPE.automake-1.4=   TOOLS_CREATE
+_TOOLS_AM_TYPE.automake=       # empty
+TOOLS_REAL_CMD.automake-1.4=   ${_TOOLS_AM_PREFIX}/bin/automake-1.4
+TOOLS_ALIASES.automake-1.4=    automake
 
 # Continue to define the following variables until packages have been
 # taught to just use "aclocal" and "automake" instead.
 #
-ACLOCAL=       ${TOOLS_CMD.aclocal}
-AUTOMAKE=      ${TOOLS_CMD.automake}
+ACLOCAL=       ${TOOLS_CMD.aclocal-1.4}
+AUTOMAKE=      ${TOOLS_CMD.automake-1.4}
 .  endif
 .endif
 
-# For every script that hasn't already been symlinked, we mark it as
-# "GNU missing".
-#
+# If the package wants to override the GNU auto* tools, then do it.
 AUTOMAKE_OVERRIDE?=    yes
 .if !empty(AUTOMAKE_OVERRIDE:M[yY][eE][sS])
-TOOLS_CREATE+=         ${_TOOLS_AUTOMAKE_LINKS}
-.  for _t_ in ${_TOOLS_AUTOMAKE_LINKS}
-.    for _s_ in ${_TOOLS_AUTOMAKE.${_t_}}
-.      if empty(TOOLS_REAL_CMD.${_t_}:M*/${_s_})
-TOOLS_GNU_MISSING+=    ${_s_}
-.      endif
-.    endfor
-.  endfor
-.  for _t_ in ${_TOOLS_AUTOMAKE}
-.    if empty(_TOOLS_AUTOMAKE_LINKS:M${_t_})
-.      for _s_ in ${_TOOLS_AUTOMAKE.${_t_}}
-TOOLS_GNU_MISSING+=    ${_s_}
-.      endfor
+.  for _t_ in ${_TOOLS_AM_NAMES}
+.    if !empty(_TOOLS_AM_TYPE.${_t_})
+${_TOOLS_AM_TYPE.${_t_}}+=     ${_t_}
 .    endif
 .  endfor
-.  undef _s_
 .  undef _t_
 .endif
 



Home | Main Index | Thread Index | Old Index