pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Teach the tools framework how to supply a pkgsrc ve...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/289d0c5105c8
branches:  trunk
changeset: 509203:289d0c5105c8
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Mon Mar 06 05:25:45 2006 +0000

description:
Teach the tools framework how to supply a pkgsrc version of install-info
if a native one isn't available.  We ensure that the "install-info"
tool in the tools directory is a no-op since the real info file
registration is handled by the INSTALL/DEINSTALL script in
pkgsrc/mk/pkginstall/install-info.

diffstat:

 mk/texinfo.mk               |  22 ++--------------------
 mk/tools/defaults.mk        |   3 ++-
 mk/tools/replace.mk         |  18 +++++++++++++++++-
 mk/tools/texinfo.mk         |  12 +++---------
 mk/tools/tools.Darwin.mk    |   5 ++++-
 mk/tools/tools.DragonFly.mk |   5 ++++-
 mk/tools/tools.FreeBSD.mk   |   5 ++++-
 mk/tools/tools.Interix.mk   |   5 ++++-
 mk/tools/tools.Linux.mk     |   9 ++++++++-
 mk/tools/tools.NetBSD.mk    |   5 ++++-
 mk/tools/tools.OpenBSD.mk   |   5 ++++-
 11 files changed, 56 insertions(+), 38 deletions(-)

diffs (254 lines):

diff -r 02028761f26a -r 289d0c5105c8 mk/texinfo.mk
--- a/mk/texinfo.mk     Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/texinfo.mk     Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: texinfo.mk,v 1.32 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: texinfo.mk,v 1.33 2006/03/06 05:25:45 jlam Exp $
 
 #
 # This Makefile fragment is included by bsd.pkg.mk when INFO_FILES is
@@ -17,25 +17,7 @@
 # files and the Info dir file.
 INFO_DIR?=     info
 
-# Does the system have the install-info command?
-# Any version will fit (really?).
-_INSTALL_INFO=
-.  for _i_ in /usr/bin/install-info /sbin/install-info
-.    if exists(${_i_}) && (${LOCALBASE} != ${_i_:C|/[^/]+/install-info$||})
-_INSTALL_INFO=                 ${_i_}
-.    endif
-.  endfor
-
-# If no install-info was found provide one with the pkg_install-info package.
-# And set INSTALL_INFO to the install-info command it provides.
-.  if empty(_INSTALL_INFO)
-_PKG_INSTALL_INFO_PREFIX_DEFAULT=      ${LOCALBASE}
-DEPENDS+=      pkg_install-info-[0-9]*:../../pkgtools/pkg_install-info
-EVAL_PREFIX+=  _PKG_INSTALL_INFO_PREFIX=pkg_install-info
-INSTALL_INFO=  ${_PKG_INSTALL_INFO_PREFIX}/bin/pkg_install-info
-.  else
-INSTALL_INFO=  ${_INSTALL_INFO}
-.  endif
+USE_TOOLS+=    install-info:run
 
 # Generate INSTALL/DEINSTALL scripts code for handling install-info.
 INSTALL_EXTRA_TMPL+=   ${.CURDIR}/../../mk/install/install-info
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/defaults.mk
--- a/mk/tools/defaults.mk      Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/defaults.mk      Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.45 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: defaults.mk,v 1.46 2006/03/06 05:25:45 jlam Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -92,6 +92,7 @@
 _TOOLS_VARNAME.id=             ID
 _TOOLS_VARNAME.imake=          IMAKE
 _TOOLS_VARNAME.install=                INSTALL
+_TOOLS_VARNAME.install-info=   INSTALL_INFO
 _TOOLS_VARNAME.lex=            LEX
 _TOOLS_VARNAME.lha=            LHA
 _TOOLS_VARNAME.ln=             LN
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/replace.mk
--- a/mk/tools/replace.mk       Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/replace.mk       Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.160 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: replace.mk,v 1.161 2006/03/06 05:25:45 jlam Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -426,6 +426,22 @@
 .  endif
 .endif
 
+.if !defined(TOOLS_IGNORE.install-info) && !empty(_USE_TOOLS:Minstall-info)
+.  if !empty(PKGPATH:Mpkgtools/pkg_install-info)
+MAKEFLAGS+=                    TOOLS_IGNORE.install-info=
+.  elif !empty(_TOOLS_USE_PKGSRC.install-info:M[yY][eE][sS])
+TOOLS_DEPENDS.install-info?=   pkg_install-info-[0-9]*:../../pkgtools/pkg_install-info
+TOOLS_CREATE+=                 install-info
+TOOLS_FIND_PREFIX+=            TOOLS_PREFIX.install-info=pkg_install-info
+TOOLS_PATH.install-info=       ${TOOLS_PREFIX.install-info}/bin/pkg_install-info
+.  endif
+.endif
+#
+# Always create an install-info tool that is a "no operation" command, as
+# registration of info files is handled by the INSTALL script.
+#
+TOOLS_SCRIPT.install-info=     exit 0
+
 .if !defined(TOOLS_IGNORE.ksh) && !empty(_USE_TOOLS:Mksh)
 .  if !empty(PKGPATH:Mshells/pdksh)
 MAKEFLAGS+=                    TOOLS_IGNORE.ksh=
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/texinfo.mk
--- a/mk/tools/texinfo.mk       Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/texinfo.mk       Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: texinfo.mk,v 1.9 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: texinfo.mk,v 1.10 2006/03/06 05:25:45 jlam Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -35,14 +35,6 @@
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-#
-# Create an install-info script that is a "no operation" command, as
-# registration of info files is handled by the INSTALL script.
-#
-TOOLS_NOOP+=           install-info
-CONFIGURE_ENV+=                INSTALL_INFO=${TOOLS_CMD.install-info:Q}
-MAKE_ENV+=             INSTALL_INFO=${TOOLS_CMD.install-info:Q}
-
 TEXINFO_REQD?=         3.12
 
 # If the package doesn't explicitly request makeinfo as a tool, then
@@ -76,5 +68,7 @@
 MAKEVARS+=     _TOOLS_USE_PKGSRC.makeinfo
 .endif
 
+CONFIGURE_ENV+=                INSTALL_INFO=${TOOLS_CMD.install-info:Q}
+MAKE_ENV+=             INSTALL_INFO=${TOOLS_CMD.install-info:Q}
 CONFIGURE_ENV+=                MAKEINFO=${TOOLS_CMD.makeinfo:Q}
 MAKE_ENV+=             MAKEINFO=${TOOLS_CMD.makeinfo:Q}
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/tools.Darwin.mk
--- a/mk/tools/tools.Darwin.mk  Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/tools.Darwin.mk  Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.Darwin.mk,v 1.23 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: tools.Darwin.mk,v 1.24 2006/03/06 05:25:45 jlam Exp $
 #
 # System-supplied tools for the Darwin (Mac OS X) operating system.
 
@@ -40,6 +40,9 @@
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
 TOOLS_PLATFORM.install?=       /usr/bin/install
+.if exists(/usr/bin/install-info)
+TOOLS_PLATFORM.install-info?=  /usr/bin/install-info
+.endif
 .if exists(/bin/ksh)
 TOOLS_PLATFORM.ksh?=           /bin/ksh
 .endif
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/tools.DragonFly.mk
--- a/mk/tools/tools.DragonFly.mk       Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/tools.DragonFly.mk       Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.DragonFly.mk,v 1.23 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: tools.DragonFly.mk,v 1.24 2006/03/06 05:25:45 jlam Exp $
 #
 # System-supplied tools for the DragonFly operating system.
 
@@ -36,6 +36,9 @@
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
 TOOLS_PLATFORM.install?=       /usr/bin/install
+.if exists(/usr/bin/install-info)
+TOOLS_PLATFORM.install-info?=  /usr/bin/install-info
+.endif
 TOOLS_PLATFORM.ldconfig?=      /sbin/ldconfig
 TOOLS_PLATFORM.lex?=           /usr/bin/lex
 TOOLS_PLATFORM.ln?=            /bin/ln
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/tools.FreeBSD.mk
--- a/mk/tools/tools.FreeBSD.mk Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/tools.FreeBSD.mk Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.FreeBSD.mk,v 1.24 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: tools.FreeBSD.mk,v 1.25 2006/03/06 05:25:45 jlam Exp $
 #
 # System-supplied tools for the FreeBSD operating system.
 
@@ -37,6 +37,9 @@
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
 TOOLS_PLATFORM.install?=       /usr/bin/install
+.if exists(/usr/bin/install-info)
+TOOLS_PLATFORM.install-info?=  /usr/bin/install-info
+.endif
 TOOLS_PLATFORM.ldconfig?=      /sbin/ldconfig
 TOOLS_PLATFORM.lex?=           /usr/bin/lex
 TOOLS_PLATFORM.ln?=            /bin/ln
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/tools.Interix.mk
--- a/mk/tools/tools.Interix.mk Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/tools.Interix.mk Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.Interix.mk,v 1.19 2006/03/05 18:12:52 jlam Exp $
+# $NetBSD: tools.Interix.mk,v 1.20 2006/03/06 05:25:45 jlam Exp $
 #
 # System-supplied tools for the Interix operating system.
 
@@ -31,6 +31,9 @@
 TOOLS_PLATFORM.head?=          /bin/head
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /bin/id
+.if exists(/bin/install-info)
+TOOLS_PLATFORM.install-info?=  /bin/install-info
+.endif
 TOOLS_PLATFORM.ln?=            /bin/ln
 TOOLS_PLATFORM.ls?=            /bin/ls
 TOOLS_PLATFORM.m4?=            /bin/m4
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/tools.Linux.mk
--- a/mk/tools/tools.Linux.mk   Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/tools.Linux.mk   Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.Linux.mk,v 1.29 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: tools.Linux.mk,v 1.30 2006/03/06 05:25:45 jlam Exp $
 #
 # System-supplied tools for the Linux operating system.
 
@@ -100,6 +100,13 @@
 TOOLS_PLATFORM.id?=            /usr/bin/id
 .endif
 TOOLS_PLATFORM.install?=       /usr/bin/install
+.if exists(/sbin/install-info)
+TOOLS_PLATFORM.install-info?=  /sbin/install-info
+.elif exists(/usr/sbin/install-info)
+TOOLS_PLATFORM.install-info?=  /usr/sbin/install-info
+.elif exists(/usr/bin/install-info)
+TOOLS_PLATFORM.install-info?=  /usr/bin/install-info
+.endif
 TOOLS_PLATFORM.ldconfig?=      /sbin/ldconfig
 TOOLS_PLATFORM.ln?=            /bin/ln
 TOOLS_PLATFORM.ls?=            /bin/ls
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/tools.NetBSD.mk
--- a/mk/tools/tools.NetBSD.mk  Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/tools.NetBSD.mk  Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.NetBSD.mk,v 1.25 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: tools.NetBSD.mk,v 1.26 2006/03/06 05:25:45 jlam Exp $
 #
 # System-supplied tools for the NetBSD operating system.
 
@@ -42,6 +42,9 @@
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
 TOOLS_PLATFORM.install?=       /usr/bin/install
+.if exists(/usr/bin/install-info)
+TOOLS_PLATFORM.install-info?=  /usr/bin/install-info
+.endif
 .if exists(/sbin/ldconfig)
 TOOLS_PLATFORM.ldconfig?=      /sbin/ldconfig
 .endif
diff -r 02028761f26a -r 289d0c5105c8 mk/tools/tools.OpenBSD.mk
--- a/mk/tools/tools.OpenBSD.mk Mon Mar 06 00:18:10 2006 +0000
+++ b/mk/tools/tools.OpenBSD.mk Mon Mar 06 05:25:45 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: tools.OpenBSD.mk,v 1.23 2006/03/05 16:27:29 jlam Exp $
+# $NetBSD: tools.OpenBSD.mk,v 1.24 2006/03/06 05:25:45 jlam Exp $
 #
 # System-supplied tools for the OpenBSD operating system.
 
@@ -42,6 +42,9 @@
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
 TOOLS_PLATFORM.install?=       /usr/bin/install
+.if exists(/usr/bin/install-info)
+TOOLS_PLATFORM.install-info?=  /usr/bin/install-info
+.endif
 TOOLS_PLATFORM.ldconfig?=      /sbin/ldconfig
 TOOLS_PLATFORM.ksh?=           /bin/ksh
 TOOLS_PLATFORM.lex?=           /usr/bin/lex



Home | Main Index | Thread Index | Old Index