diff options
author | seb <seb@pkgsrc.org> | 2003-07-31 13:50:11 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2003-07-31 13:50:11 +0000 |
commit | 16437cbe4ceb476b6cc7b2573019d549797408a1 (patch) | |
tree | 9640ecbce9b4a6144936336ee4ed63e9ebea8431 /mk | |
parent | 30c404c8a02c5f0a6b22fa955898946e347d416a (diff) | |
download | pkgsrc-16437cbe4ceb476b6cc7b2573019d549797408a1.tar.gz |
Make it possible to have a package requiring makeinfo but not install-info.
INFO_FILES is now defined by default to the empty value.
If it is not empty it means that install-info -or a suitable
replacement like pkg_install-info- is required.
USE_MAKEINFO is now defined by default to the 'no' value.
If it has any other value it means that makeinfo is required.
Note that as before simply defining USE_MAKEINFO in a package
Makefile is enough to trigger the use of makeinfo. I.e. it is not
required to be '[yY][eE][sS]'.
As a side effect when using buildlink2 always create install-info and
makeinfo wrappers in ${BUILDLINK_DIR}/bin. This could help
package maintainer to catch spurious/hidden install-info and makeinfo
usage.
Note that for now this nice feature is not really enabled as the relevant
part of bsd.buildlink2.mk is still conditional upon USE_NEW_TEXINFO.
It will really be when USE_NEW_TEXINFO will be removed from pkgsrc.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/bsd.pkg.mk | 6 | ||||
-rw-r--r-- | mk/buildlink2/bsd.buildlink2.mk | 4 | ||||
-rw-r--r-- | mk/texinfo.mk | 27 |
3 files changed, 18 insertions, 19 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 6fd75f7e8c0..005f7d7569a 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.1226 2003/07/30 15:04:21 jmmv Exp $ +# $NetBSD: bsd.pkg.mk,v 1.1227 2003/07/31 13:50:11 seb Exp $ # # This file is in the public domain. # @@ -549,7 +549,9 @@ PLIST_SUBST+= PERL5_ARCHLIB=${PERL5_ARCHLIB:S/^${LOCALBASE}\///} .endif .if defined(USE_NEW_TEXINFO) -. if defined(INFO_FILES) +INFO_FILES?= +USE_MAKEINFO?= no # default to not using makeinfo +. if !empty(INFO_FILES) || empty(USE_MAKEINFO:M[nN][oO]) . include "../../mk/texinfo.mk" . endif .endif diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk index 38df83d09ec..78e22080f8c 100644 --- a/mk/buildlink2/bsd.buildlink2.mk +++ b/mk/buildlink2/bsd.buildlink2.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.buildlink2.mk,v 1.91 2003/07/22 01:10:32 seb Exp $ +# $NetBSD: bsd.buildlink2.mk,v 1.92 2003/07/31 13:50:13 seb Exp $ # # An example package buildlink2.mk file: # @@ -1028,7 +1028,6 @@ ${BUILDLINK_DIR}/${_prog_}: ${_GNU_MISSING} .if defined(USE_NEW_TEXINFO) # install-info and makeinfo handling. # -.if defined(INFO_FILES) # Create an install-info script that is a "no operation" command # as registration of info files is handled by the INSTALL script. CONFIGURE_ENV+= INSTALL_INFO="${BUILDLINK_DIR}/bin/install-info" @@ -1075,5 +1074,4 @@ ${BUILDLINK_DIR}/bin/makeinfo: ${_GNU_MISSING} ${ECHO} 'exit 1' >> ${.TARGET} ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET} . endif # USE_MAKEINFO -.endif # INFO_FILES .endif # USE_NEW_TEXINFO diff --git a/mk/texinfo.mk b/mk/texinfo.mk index d3b2f754195..e4339517f61 100644 --- a/mk/texinfo.mk +++ b/mk/texinfo.mk @@ -1,4 +1,4 @@ -# $NetBSD: texinfo.mk,v 1.15 2003/07/31 08:58:24 grant Exp $ +# $NetBSD: texinfo.mk,v 1.16 2003/07/31 13:50:13 seb Exp $ # # This Makefile fragment is included by bsd.pkg.mk when INFO_FILES and # USE_NEW_TEXINFO are defined. @@ -19,6 +19,8 @@ TEXINFO_MK= # defined # the new framework. # .if defined(USE_NEW_TEXINFO) + +.if !empty(INFO_FILES) # # Handle install-info. # @@ -34,22 +36,22 @@ 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_}) +. for _i_ in /usr/bin/install-info /sbin/install-info +. if exists(${_i_}) _INSTALL_INFO= ${_i_} -. endif -.endfor +. 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) +. 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 +. else INSTALL_INFO= ${_INSTALL_INFO} -.endif +. endif # Generate INSTALL/DEINSTALL scripts code for handling install-info. INSTALL_EXTRA_TMPL+= ${.CURDIR}/../../mk/install/install-info @@ -57,6 +59,7 @@ DEINSTALL_EXTRA_TMPL+= ${.CURDIR}/../../mk/install/install-info FILES_SUBST+= INFO_FILES=${INFO_FILES:Q} FILES_SUBST+= INSTALL_INFO=${INSTALL_INFO:Q} FILES_SUBST+= INFO_DIR=${INFO_DIR:Q} +.endif # INFO_FILES # When not using buildlink2 set INSTALL_INFO in environment to ${ECHO} # so the package build/install step does not register itself the info @@ -69,18 +72,14 @@ CONFIGURE_ENV+= INSTALL_INFO="${TRUE}" MAKE_ENV+= INSTALL_INFO="${TRUE}" .endif +.if empty(USE_MAKEINFO:M[nN][oO]) # -# Handle makeinfo if requested. +# Handle makeinfo. # # Minimum required version for the GNU makeinfo command. TEXINFO_REQD?= 3.12 -# By default makeinfo is not needed for building. -USE_MAKEINFO?= NO - -.if empty(USE_MAKEINFO:M[nN][oO]) - # Argument to specify maximum info files size for newer versions # of makeinfo. This argument is supported since makeinfo 4.1. _MAKEINFO_SPLIT_SIZE_ARG+= --split-size=50000 |