summaryrefslogtreecommitdiff
path: root/mk/tools/texinfo.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2006-03-05 16:27:22 +0000
committerjlam <jlam@pkgsrc.org>2006-03-05 16:27:22 +0000
commit6e0c05032135f85018332563ebc1048e6b05b159 (patch)
treee3c6cf61f7cffff30eee10d4bef3729227d7edcb /mk/tools/texinfo.mk
parentd6bd870fec965dee7f70a4f3b12e39fa5abac05b (diff)
downloadpkgsrc-6e0c05032135f85018332563ebc1048e6b05b159.tar.gz
* Teach the tools framework how to supply the pkgsrc version of
makeinfo if no native makeinfo executable exists. Honor TEXINFO_REQD when determining whether the native makeinfo can be used. * Remove USE_MAKEINFO and replace it with USE_TOOLS+=makeinfo. * Get rid of all the "split" argument deduction for makeinfo since the PLIST module already handles varying numbers of split info files correctly. NOTE: Platforms that have "makeinfo" in the base system should check that the makeinfo entries of pkgsrc/mk/tools.${OPSYS}.mk are correct.
Diffstat (limited to 'mk/tools/texinfo.mk')
-rw-r--r--mk/tools/texinfo.mk43
1 files changed, 32 insertions, 11 deletions
diff --git a/mk/tools/texinfo.mk b/mk/tools/texinfo.mk
index 06852b74d68..5f608e49a0a 100644
--- a/mk/tools/texinfo.mk
+++ b/mk/tools/texinfo.mk
@@ -1,4 +1,4 @@
-# $NetBSD: texinfo.mk,v 1.8 2005/07/17 21:36:24 jlam Exp $
+# $NetBSD: texinfo.mk,v 1.9 2006/03/05 16:27:29 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -43,17 +43,38 @@ TOOLS_NOOP+= install-info
CONFIGURE_ENV+= INSTALL_INFO=${TOOLS_CMD.install-info:Q}
MAKE_ENV+= INSTALL_INFO=${TOOLS_CMD.install-info:Q}
-# Create a makeinfo script that will invoke the right makeinfo command
-# if USE_MAKEINFO is "yes" or will exit on error if not. MAKEINFO is
-# defined by mk/texinfo.mk if USE_MAKEINFO is "yes".
-#
-USE_MAKEINFO?= no
-.if empty(USE_MAKEINFO:M[nN][oO])
-TOOLS_CREATE+= makeinfo
-TOOLS_PATH.makeinfo= ${MAKEINFO:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-TOOLS_ARGS.makeinfo= ${MAKEINFO:C/^/_asdf_/1:N_asdf_*}
-.else
+TEXINFO_REQD?= 3.12
+
+# If the package doesn't explicitly request makeinfo as a tool, then
+# create a "broken" makeinfo tool to prevent its use.
+#
+# If the package does explicitly request makeinfo as a tool, then
+# determine if the platform-provided makeinfo's version is at least
+# ${TEXINFO_REQD}. If it isn't, then tell the tools framework to use
+# the pkgsrc makeinfo.
+#
+.if empty(USE_TOOLS:C/:.*//:Mmakeinfo)
TOOLS_BROKEN+= makeinfo
+.elif defined(TOOLS_PLATFORM.makeinfo) && !empty(TOOLS_PLATFORM.makeinfo)
+. if !defined(_TOOLS_USE_PKGSRC.makeinfo)
+_TOOLS_VERSION.makeinfo!= \
+ ${TOOLS_PLATFORM.makeinfo} --version | \
+ ${AWK} '{ print $$4; exit; }'
+_TOOLS_PKG.makeinfo= gtexinfo-${_TOOLS_VERSION.makeinfo}
+_TOOLS_USE_PKGSRC.makeinfo= no
+. for _dep_ in gtexinfo>=${TEXINFO_REQD}
+. if !empty(_TOOLS_USE_PKGSRC.makeinfo:M[nN][oO])
+_TOOLS_USE_PKGSRC.makeinfo!= \
+ if ${PKG_ADMIN} pmatch ${_dep_:Q} ${_TOOLS_PKG.makeinfo:Q}; then \
+ ${ECHO} no; \
+ else \
+ ${ECHO} yes; \
+ fi
+. endif
+. endfor
+. endif
+MAKEVARS+= _TOOLS_USE_PKGSRC.makeinfo
.endif
+
CONFIGURE_ENV+= MAKEINFO=${TOOLS_CMD.makeinfo:Q}
MAKE_ENV+= MAKEINFO=${TOOLS_CMD.makeinfo:Q}