summaryrefslogtreecommitdiff
path: root/mk/buildlink2
diff options
context:
space:
mode:
authorseb <seb@pkgsrc.org>2003-06-19 21:41:13 +0000
committerseb <seb@pkgsrc.org>2003-06-19 21:41:13 +0000
commit5ab8be8066273669ac731b3a0f60adee2c6fa7d9 (patch)
treea2fb7483e3a18fa8f83edeb1496c00f88dff6039 /mk/buildlink2
parent4c7c717eed7b924103792374e8c81cc3608d302c (diff)
downloadpkgsrc-5ab8be8066273669ac731b3a0f60adee2c6fa7d9.tar.gz
Introduce a new framework to handle info files, install-info and
makeinfo commands. The goal of the new framework is twofold: - reduce the number of '@exec' and '@unexec' in PLIST by using INSTALL/DEINSTALL scripts to handle entries addition/removal Info directory file. - achieve lighter dependencies by avoiding unnecessary run-time dependency on the gtexinfo package and if needed with the help of the standalone install-info command provided by the recently imported package pkgtools/pkg_install-info. A package must be sightly updated to use this new framework and must define the variable USE_NEW_TEXINFO. This variable will be removed from the pkgsrc tree when all package would have been updated. For details see section 10.24 of Packages.txt, comments in mk/{texinfo.mk,buildlink2/bsd.buildlink2.mk} and upcoming mail to <tech-pkg at netbsd dot org>.
Diffstat (limited to 'mk/buildlink2')
-rw-r--r--mk/buildlink2/bsd.buildlink2.mk53
1 files changed, 52 insertions, 1 deletions
diff --git a/mk/buildlink2/bsd.buildlink2.mk b/mk/buildlink2/bsd.buildlink2.mk
index 0add32dfc3d..516105ab99d 100644
--- a/mk/buildlink2/bsd.buildlink2.mk
+++ b/mk/buildlink2/bsd.buildlink2.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.85 2003/06/19 17:20:41 jschauma Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.86 2003/06/19 21:41:15 seb Exp $
#
# An example package buildlink2.mk file:
#
@@ -1019,3 +1019,54 @@ ${BUILDLINK_DIR}/${_prog_}: ${_GNU_MISSING}
${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
. endfor
.endfor
+
+.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"
+MAKE_ENV+= INSTALL_INFO="${BUILDLINK_DIR}/bin/install-info"
+
+do-buildlink: hide-install-info
+
+hide-install-info: ${BUILDLINK_DIR}/bin/install-info
+${BUILDLINK_DIR}/bin/install-info:
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO} "#!${BUILDLINK_SHELL}" > ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO} '${ECHO} "==> Noop install-info $$*" >> ${_BLNK_WRAP_LOG}' >> ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
+
+# Create a makeinfo script that will invoke the right makeinfo
+# command if USE_MAKEINFO is 'yes' or invoke the GNU missing script if not.
+CONFIGURE_ENV+= MAKEINFO="${BUILDLINK_DIR}/bin/makeinfo"
+MAKE_ENV+= MAKEINFO="${BUILDLINK_DIR}/bin/makeinfo"
+
+. if empty(USE_MAKEINFO:M[nN][oO])
+do-buildlink: makeinfo-wrapper
+makeinfo-wrapper: ${BUILDLINK_DIR}/bin/makeinfo
+${BUILDLINK_DIR}/bin/makeinfo:
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO} "#!${BUILDLINK_SHELL}" > ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO} 'echo "${MAKEINFO} $$*" >> ${_BLNK_WRAP_LOG}' >> ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO} 'exec ${MAKEINFO} $$*' >> ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
+. else # !USE_MAKEINFO
+do-buildlink: hide-makeinfo
+hide-makeinfo: ${BUILDLINK_DIR}/bin/makeinfo
+${BUILDLINK_DIR}/bin/makeinfo: ${_GNU_MISSING}
+ ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO} "#!${BUILDLINK_SHELL}" > ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ ${ECHO} 'exec ${_GNU_MISSING} makeinfo "$$*"' >> ${.TARGET}
+ ${_PKG_SILENT}${_PKG_DEBUG}${CHMOD} +x ${.TARGET}
+. endif # USE_MAKEINFO
+.endif # INFO_FILES
+.endif # USE_NEW_TEXINFO