summaryrefslogtreecommitdiff
path: root/mk/texinfo.mk
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2003-07-31 13:50:11 +0000
committerseb <seb@pkgsrc.org>2003-07-31 13:50:11 +0000
commit16437cbe4ceb476b6cc7b2573019d549797408a1 (patch)
tree9640ecbce9b4a6144936336ee4ed63e9ebea8431 /mk/texinfo.mk
parent30c404c8a02c5f0a6b22fa955898946e347d416a (diff)
downloadpkgsrc-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/texinfo.mk')
-rw-r--r--mk/texinfo.mk27
1 files changed, 13 insertions, 14 deletions
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