diff options
author | jlam <jlam@pkgsrc.org> | 2006-03-05 16:27:22 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2006-03-05 16:27:22 +0000 |
commit | 6e0c05032135f85018332563ebc1048e6b05b159 (patch) | |
tree | e3c6cf61f7cffff30eee10d4bef3729227d7edcb /mk | |
parent | d6bd870fec965dee7f70a4f3b12e39fa5abac05b (diff) | |
download | pkgsrc-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')
-rw-r--r-- | mk/bsd.pkg.use.mk | 7 | ||||
-rw-r--r-- | mk/texinfo.mk | 78 | ||||
-rw-r--r-- | mk/tools/defaults.mk | 3 | ||||
-rw-r--r-- | mk/tools/replace.mk | 13 | ||||
-rw-r--r-- | mk/tools/texinfo.mk | 43 | ||||
-rw-r--r-- | mk/tools/tools.Darwin.mk | 5 | ||||
-rw-r--r-- | mk/tools/tools.DragonFly.mk | 5 | ||||
-rw-r--r-- | mk/tools/tools.FreeBSD.mk | 5 | ||||
-rw-r--r-- | mk/tools/tools.Interix.mk | 5 | ||||
-rw-r--r-- | mk/tools/tools.Linux.mk | 5 | ||||
-rw-r--r-- | mk/tools/tools.NetBSD.mk | 5 | ||||
-rw-r--r-- | mk/tools/tools.OpenBSD.mk | 5 |
12 files changed, 79 insertions, 100 deletions
diff --git a/mk/bsd.pkg.use.mk b/mk/bsd.pkg.use.mk index ff1fd2f2335..5786956003e 100644 --- a/mk/bsd.pkg.use.mk +++ b/mk/bsd.pkg.use.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.use.mk,v 1.27 2006/01/12 19:05:06 joerg Exp $ +# $NetBSD: bsd.pkg.use.mk,v 1.28 2006/03/05 16:27:29 jlam Exp $ # # Turn USE_* macros into proper depedency logic. Included near the top of # bsd.pkg.mk, after bsd.prefs.mk. @@ -103,12 +103,11 @@ MAKE_ENV+= LIBTOOL="${LIBTOOL} ${LIBTOOL_FLAGS}" LIBTOOL_OVERRIDE?= libtool */libtool */*/libtool .endif -### USE_MAKEINFO, INFO_FILES +### INFO_FILES INFO_FILES?= # empty -USE_MAKEINFO?= no -.if !empty(INFO_FILES) || empty(USE_MAKEINFO:M[nN][oO]) +.if !empty(INFO_FILES) . include "../../mk/texinfo.mk" .endif diff --git a/mk/texinfo.mk b/mk/texinfo.mk index 289b9522547..518f111e955 100644 --- a/mk/texinfo.mk +++ b/mk/texinfo.mk @@ -1,8 +1,8 @@ -# $NetBSD: texinfo.mk,v 1.31 2006/01/10 00:01:16 seb Exp $ +# $NetBSD: texinfo.mk,v 1.32 2006/03/05 16:27:29 jlam Exp $ # # This Makefile fragment is included by bsd.pkg.mk when INFO_FILES is -# not empty or USE_MAKEINFO is not "no". +# not empty. # .if !defined(TEXINFO_MK) @@ -45,78 +45,4 @@ FILES_SUBST+= INSTALL_INFO=${INSTALL_INFO:Q} FILES_SUBST+= INFO_DIR=${INFO_DIR:Q} .endif # INFO_FILES -.if empty(USE_MAKEINFO:M[nN][oO]) -# -# Handle makeinfo. -# - -# Minimum required version for the GNU makeinfo command. -TEXINFO_REQD?= 3.12 -_TEXINFO_REQD_MAJOR= ${TEXINFO_REQD:C|\..*$||} -_TEXINFO_REQD_MINOR= ${TEXINFO_REQD:C|^[0-9]+\.||:C|\..*$||} - -# 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 - -# The minimum version of makeinfo for which the default info files size -# was bumped from 50000. -_MAKEINFO_SPLIT_SIZE_VERSION= 4.6 - -# Add OPSYS specific flags if any. -MAKEINFO_ARGS+= ${_OPSYS_MAKEINFO_ARGS} - -# Does the system has a makeinfo command? -_MAKEINFO= -. for _i_ in /usr/bin/makeinfo -. if exists(${_i_}) -_MAKEINFO= ${_i_} -. endif -. endfor - -# Record makeinfo's version. -# If makeinfo's version contains useful information outside the first -# two dot separated numbers the following would have to be changed as well -# as _{MAKEINFO,TEXINFO_REQD}_{MAJOR,MINOR} and their comparison below. -. if !empty(_MAKEINFO) && !defined(MAKEINFO_VERSION) -MAKEINFO_VERSION_OUTPUT!= ${_MAKEINFO} --version 2>/dev/null || ${ECHO} -MAKEINFO_VERSION= -. for _i_ in ${MAKEINFO_VERSION_OUTPUT:M[0-9]*.[0-9]*:C/[^0-9.]//} -. if empty(MAKEINFO_VERSION) -MAKEINFO_VERSION= ${_i_} -. endif -. endfor -MAKEFLAGS+= MAKEINFO_VERSION=${MAKEINFO_VERSION:Q} -. endif - -# Sort out if the version provided by devel/gtexinfo is needed. -# If it is add it as build time dependency and set MAKEINFO -# to the makeinfo it provides. -# Here it is assumed devel/gtexinfo's makeinfo version will be -# superior or equal to TEXINFO_REQD. -_NEED_TEXINFO= YES -. if defined(MAKEINFO_VERSION) -_MAKEINFO_VERSION_MAJOR= ${MAKEINFO_VERSION:C|\..*$||} -_MAKEINFO_VERSION_MINOR= ${MAKEINFO_VERSION:C|^[0-9]+\.||:C|\..*$||} -. if ${_MAKEINFO_VERSION_MAJOR} > ${_TEXINFO_REQD_MAJOR} -_NEED_TEXINFO= NO -. elif ${_MAKEINFO_VERSION_MAJOR} == ${_TEXINFO_REQD_MAJOR} && ${_MAKEINFO_VERSION_MINOR} >= ${_TEXINFO_REQD_MINOR} -_NEED_TEXINFO= NO -. endif -. endif -. if !empty(_NEED_TEXINFO:M[yY][eE][sS]) -BUILD_DEPENDS+= gtexinfo>=${TEXINFO_REQD}:../../devel/gtexinfo -_GTEXINFO_PREFIX_DEFAULT= ${LOCALBASE} -EVAL_PREFIX+= _GTEXINFO_PREFIX=gtexinfo -# assume devel/gtexinfo version is >= ${_MAKEINFO_SPLIT_SIZE_VERSION} -MAKEINFO_ARGS+= ${_MAKEINFO_SPLIT_SIZE_ARG} -MAKEINFO= ${_GTEXINFO_PREFIX}/bin/makeinfo ${MAKEINFO_ARGS} -. else -. if defined(MAKEINFO_VERSION) && ${MAKEINFO_VERSION} >= ${_MAKEINFO_SPLIT_SIZE_VERSION} -MAKEINFO_ARGS+= ${_MAKEINFO_SPLIT_SIZE_ARG} -. endif -MAKEINFO= ${_MAKEINFO} ${MAKEINFO_ARGS} -. endif -.endif # USE_MAKEINFO - .endif # TEXINFO_MK diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk index 98cd42c6e5a..ba244bd0703 100644 --- a/mk/tools/defaults.mk +++ b/mk/tools/defaults.mk @@ -1,4 +1,4 @@ -# $NetBSD: defaults.mk,v 1.44 2006/01/21 14:40:31 jlam Exp $ +# $NetBSD: defaults.mk,v 1.45 2006/03/05 16:27:29 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -98,6 +98,7 @@ _TOOLS_VARNAME.ln= LN _TOOLS_VARNAME.ls= LS _TOOLS_VARNAME.m4= M4 _TOOLS_VARNAME.mail= MAIL_CMD +_TOOLS_VARNAME.makeinfo= MAKEINFO _TOOLS_VARNAME.mkdir= MKDIR _TOOLS_VARNAME.mktemp= MKTEMP _TOOLS_VARNAME.mtree= MTREE diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index 93329d9826f..b1c8a4d0a46 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.159 2006/02/21 17:39:32 rillig Exp $ +# $NetBSD: replace.mk,v 1.160 2006/03/05 16:27:29 jlam Exp $ # # Copyright (c) 2005 The NetBSD Foundation, Inc. # All rights reserved. @@ -486,6 +486,17 @@ TOOLS_PATH.mail= ${TOOLS_PREFIX.mail}/bin/nail . endif .endif +.if !defined(TOOLS_IGNORE.makeinfo) && !empty(_USE_TOOLS:Mmakeinfo) +. if !empty(PKGPATH:Mdevel/gtexinfo) +MAKEFLAGS+= TOOLS_IGNORE.makeinfo= +. elif !empty(_TOOLS_USE_PKGSRC.makeinfo:M[yY][eE][sS]) +TOOLS_DEPENDS.makeinfo?= gtexinfo>=${TEXINFO_REQD}:../../devel/gtexinfo +TOOLS_CREATE+= makeinfo +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.makeinfo=gtexinfo +TOOLS_PATH.makeinfo= ${TOOLS_PREFIX.makeinfo}/bin/makeinfo +. endif +.endif + .if !defined(TOOLS_IGNORE.mktemp) && !empty(_USE_TOOLS:Mmktemp) . if !empty(PKGPATH:Msysutils/mktemp) MAKEFLAGS+= TOOLS_IGNORE.mktemp= 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} diff --git a/mk/tools/tools.Darwin.mk b/mk/tools/tools.Darwin.mk index 04b89db9ca3..694a92fd4d4 100644 --- a/mk/tools/tools.Darwin.mk +++ b/mk/tools/tools.Darwin.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.Darwin.mk,v 1.22 2006/01/16 21:50:46 tron Exp $ +# $NetBSD: tools.Darwin.mk,v 1.23 2006/03/05 16:27:29 jlam Exp $ # # System-supplied tools for the Darwin (Mac OS X) operating system. @@ -49,6 +49,9 @@ TOOLS_PLATFORM.ln?= /bin/ln TOOLS_PLATFORM.ls?= /bin/ls TOOLS_PLATFORM.m4?= /usr/bin/m4 TOOLS_PLATFORM.mail?= /usr/bin/mail +.if exists(/usr/bin/makeinfo) +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +.endif TOOLS_PLATFORM.mkdir?= /bin/mkdir -p TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp TOOLS_PLATFORM.mtree?= /usr/sbin/mtree diff --git a/mk/tools/tools.DragonFly.mk b/mk/tools/tools.DragonFly.mk index 289eeee559a..dbdfa0af15d 100644 --- a/mk/tools/tools.DragonFly.mk +++ b/mk/tools/tools.DragonFly.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.DragonFly.mk,v 1.22 2006/02/15 20:02:30 reed Exp $ +# $NetBSD: tools.DragonFly.mk,v 1.23 2006/03/05 16:27:29 jlam Exp $ # # System-supplied tools for the DragonFly operating system. @@ -42,6 +42,9 @@ TOOLS_PLATFORM.ln?= /bin/ln TOOLS_PLATFORM.ls?= /bin/ls TOOLS_PLATFORM.m4?= /usr/bin/m4 TOOLS_PLATFORM.mail?= /usr/bin/mail +.if exists(/usr/bin/makeinfo) +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +.endif TOOLS_PLATFORM.mkdir?= /bin/mkdir -p TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp TOOLS_PLATFORM.mtree?= /usr/sbin/mtree diff --git a/mk/tools/tools.FreeBSD.mk b/mk/tools/tools.FreeBSD.mk index 213a602f180..32ef797a273 100644 --- a/mk/tools/tools.FreeBSD.mk +++ b/mk/tools/tools.FreeBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.FreeBSD.mk,v 1.23 2005/11/08 03:36:13 tv Exp $ +# $NetBSD: tools.FreeBSD.mk,v 1.24 2006/03/05 16:27:29 jlam Exp $ # # System-supplied tools for the FreeBSD operating system. @@ -43,6 +43,9 @@ TOOLS_PLATFORM.ln?= /bin/ln TOOLS_PLATFORM.ls?= /bin/ls TOOLS_PLATFORM.m4?= /usr/bin/m4 TOOLS_PLATFORM.mail?= /usr/bin/mail +.if exists(/usr/bin/makeinfo) +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +.endif TOOLS_PLATFORM.mkdir?= /bin/mkdir -p TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp TOOLS_PLATFORM.mtree?= /usr/sbin/mtree diff --git a/mk/tools/tools.Interix.mk b/mk/tools/tools.Interix.mk index 809c119246b..2f4990f6001 100644 --- a/mk/tools/tools.Interix.mk +++ b/mk/tools/tools.Interix.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.Interix.mk,v 1.17 2005/11/04 20:02:01 jlam Exp $ +# $NetBSD: tools.Interix.mk,v 1.18 2006/03/05 16:27:29 jlam Exp $ # # System-supplied tools for the Interix operating system. @@ -35,6 +35,9 @@ TOOLS_PLATFORM.ln?= /bin/ln TOOLS_PLATFORM.ls?= /bin/ls TOOLS_PLATFORM.m4?= /bin/m4 TOOLS_PLATFORM.mail?= /bin/mail +.if exists(/usr/bin/makeinfo) +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +.endif TOOLS_PLATFORM.mkdir?= /bin/mkdir -p TOOLS_PLATFORM.mv?= /bin/mv TOOLS_PLATFORM.nice?= /bin/nice diff --git a/mk/tools/tools.Linux.mk b/mk/tools/tools.Linux.mk index ac9a54e55a5..dc0062cfda6 100644 --- a/mk/tools/tools.Linux.mk +++ b/mk/tools/tools.Linux.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.Linux.mk,v 1.28 2006/01/08 23:00:00 jlam Exp $ +# $NetBSD: tools.Linux.mk,v 1.29 2006/03/05 16:27:29 jlam Exp $ # # System-supplied tools for the Linux operating system. @@ -109,6 +109,9 @@ TOOLS_PLATFORM.mail?= /bin/mail # RH, Mandrake .elif exists(/usr/bin/mail) TOOLS_PLATFORM.mail?= /usr/bin/mail # Debian, Slackware, SuSE .endif +.if exists(/usr/bin/makeinfo) +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +.endif TOOLS_PLATFORM.mkdir?= /bin/mkdir -p .if exists(/usr/bin/mktemp) TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp diff --git a/mk/tools/tools.NetBSD.mk b/mk/tools/tools.NetBSD.mk index 00ab6da6efc..5d4dc17797d 100644 --- a/mk/tools/tools.NetBSD.mk +++ b/mk/tools/tools.NetBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.NetBSD.mk,v 1.24 2006/01/09 18:32:52 jlam Exp $ +# $NetBSD: tools.NetBSD.mk,v 1.25 2006/03/05 16:27:29 jlam Exp $ # # System-supplied tools for the NetBSD operating system. @@ -51,6 +51,9 @@ TOOLS_PLATFORM.ln?= /bin/ln TOOLS_PLATFORM.ls?= /bin/ls TOOLS_PLATFORM.m4?= /usr/bin/m4 TOOLS_PLATFORM.mail?= /usr/bin/mail +.if exists(/usr/bin/makeinfo) +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +.endif TOOLS_PLATFORM.mkdir?= /bin/mkdir -p TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp TOOLS_PLATFORM.mtree?= /usr/sbin/mtree diff --git a/mk/tools/tools.OpenBSD.mk b/mk/tools/tools.OpenBSD.mk index 3e2743cd464..40bbc1ffd61 100644 --- a/mk/tools/tools.OpenBSD.mk +++ b/mk/tools/tools.OpenBSD.mk @@ -1,4 +1,4 @@ -# $NetBSD: tools.OpenBSD.mk,v 1.22 2006/01/09 18:32:52 jlam Exp $ +# $NetBSD: tools.OpenBSD.mk,v 1.23 2006/03/05 16:27:29 jlam Exp $ # # System-supplied tools for the OpenBSD operating system. @@ -49,6 +49,9 @@ TOOLS_PLATFORM.ln?= /bin/ln TOOLS_PLATFORM.ls?= /bin/ls TOOLS_PLATFORM.m4?= /usr/bin/m4 TOOLS_PLATFORM.mail?= /usr/bin/mail +.if exists(/usr/bin/makeinfo) +TOOLS_PLATFORM.makeinfo?= /usr/bin/makeinfo +.endif TOOLS_PLATFORM.mkdir?= /bin/mkdir -p TOOLS_PLATFORM.mktemp?= /usr/bin/mktemp TOOLS_PLATFORM.mtree?= /usr/sbin/mtree |