diff options
author | seb <seb> | 2003-06-19 21:41:13 +0000 |
---|---|---|
committer | seb <seb> | 2003-06-19 21:41:13 +0000 |
commit | ec43864321c397f506d4c87364c62d0faf0e9b03 (patch) | |
tree | a2fb7483e3a18fa8f83edeb1496c00f88dff6039 /mk/buildlink2 | |
parent | cae7c884543723229b126e5eec290473b9d438bb (diff) | |
download | pkgsrc-ec43864321c397f506d4c87364c62d0faf0e9b03.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.mk | 53 |
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 |