diff options
author | jlam <jlam@pkgsrc.org> | 2005-05-19 05:27:25 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-05-19 05:27:25 +0000 |
commit | 10b0f8d012bbc31e4635677ddc5a9584264d2d61 (patch) | |
tree | cc90594f46243e9811e037d9278317aac8320429 | |
parent | 5e50c57ea0d2843b930b20bd718b5bc08e95c95a (diff) | |
download | pkgsrc-10b0f8d012bbc31e4635677ddc5a9584264d2d61.tar.gz |
Merge most of imake.mk into replace.mk and leave imake.mk to contain
the extra bits required by packages that use imake/xmkmf. This
consolidates most of the replacement tools handling into replace.mk.
-rw-r--r-- | mk/tools/bsd.tools.mk | 3 | ||||
-rw-r--r-- | mk/tools/imake.mk | 92 | ||||
-rw-r--r-- | mk/tools/replace.mk | 53 |
3 files changed, 75 insertions, 73 deletions
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk index 31130a7f6ad..8dab1e89152 100644 --- a/mk/tools/bsd.tools.mk +++ b/mk/tools/bsd.tools.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.tools.mk,v 1.25 2005/05/19 03:52:23 jlam Exp $ +# $NetBSD: bsd.tools.mk,v 1.26 2005/05/19 05:27:25 jlam Exp $ # # This Makefile fragment creates tools under ${TOOLS_DIR} that are # found before similarly-named tools in the system path. @@ -78,6 +78,7 @@ USE_TOOLS?= # empty .include "../../mk/tools/ldconfig.mk" .include "../../mk/tools/rpcgen.mk" .include "../../mk/tools/strip.mk" +.include "../../mk/tools/imake.mk" .include "../../mk/tools/replace.mk" .include "../../mk/tools/perl.mk" .include "../../mk/tools/make.mk" diff --git a/mk/tools/imake.mk b/mk/tools/imake.mk index af6c3b9b3ef..408120d1a28 100644 --- a/mk/tools/imake.mk +++ b/mk/tools/imake.mk @@ -1,91 +1,45 @@ -# $NetBSD: imake.mk,v 1.9 2005/05/16 18:01:13 jlam Exp $ +# $NetBSD: imake.mk,v 1.10 2005/05/19 05:27:25 jlam Exp $ # -# This Makefile fragment handles packages that need imake and xmkmf -# to build X11-related packages. The correct imake and xmkmf tools -# are placed under ${TOOLS_DIR}/bin, so that they may be invoked by -# their bare names. The tools are chosen based on which type of X11 -# distribution pkgsrc will be using, e.g. X11_TYPE. +# This Makefile fragment defines additional variables that are used +# by packages that need imake and xmkmf. # # Variables defined by this file are: # -# IMAKE path to imake tool + any imake-specific args -# XMKMF_CMD path to xmkmf tool + any xmkmf-specific args -# XMKMF command to create all Makefiles from Imakefiles, -# usually "xmkmf -a". -# -# TOOLS_IMAKE, TOOLS_XMKMF_CMD and TOOLS_XMKMF are set to the same -# corresponding values. +# XMKMF, TOOLS_XMKMF +# command to create all Makefiles from Imakefiles, +# usually "xmkmf -a". # # Optional variables that may be defined by the package are: # # IMAKEOPTS Options to pass to imake # XMKMF_FLAGS Options to pass to xmkmf # -# If they are non-empty, then a wrapper script will be created instead -# of a symlink for the corresponding tool. -# # A platform/${OPSYS}.mk file may note that additional tools are # required when using imake by setting _IMAKE_TOOLS to the appropriate # value, e.g. _IMAKE_TOOLS+=gmake to use GNU make to build packages # that use imake. # -# This file is included by mk/tools/replace.mk and follows the same -# rules as for other replacement tools. +# This file needs to be included before replace.mk as it modifies the +# PKGSRC_USE_TOOLS and USE_TOOLS variables that are used by replace.mk. # .if defined(USE_IMAKE) -USE_TOOLS+= imake +USE_TOOLS+= imake xmkmf .endif -# Skip the processing at the end of replace.mk. If we need to use -# imake, then we always want the clause below to trigger. -# -_TOOLS_USE_PKGSRC.imake= yes +# imake and xmkmf imply each other +.if !empty(PKGSRC_USE_TOOLS:Mimake) || !empty(PKGSRC_USE_TOOLS:Mxmkmf) +PKGSRC_USE_TOOLS+= imake xmkmf +.endif +.if !empty(USE_TOOLS:Mimake) || !empty(USE_TOOLS:Mxmkmf) +USE_TOOLS+= imake xmkmf +.endif -.if !defined(TOOLS_IGNORE.imake) && !empty(USE_TOOLS:Mimake) -. if !empty(PKGPATH:Mx11/imake) || !empty(PKGPATH:Mx11/xorg-imake) -MAKEFLAGS+= TOOLS_IGNORE.imake= -. else -# -# Depending on which X11_TYPE we're using, depend on the correct package -# to pull in imake and xmkmf. -# -. if defined(X11_TYPE) && (${X11_TYPE} == "XFree86") -TOOLS_DEPENDS.imake?= imake>=4.4.0:../../x11/imake -TOOLS_REAL_CMD.imake?= ${X11PREFIX}/${X11ROOT_PREFIX}/bin/imake -TOOLS_REAL_CMD.xmkmf?= ${X11PREFIX}/${X11ROOT_PREFIX}/bin/xmkmf -. elif defined(X11_TYPE) && (${X11_TYPE} == "xorg") -TOOLS_DEPENDS.imake?= xorg-imake>=6.8:../../x11/xorg-imake -TOOLS_REAL_CMD.imake?= ${X11PREFIX}/${X11ROOT_PREFIX}/bin/imake -TOOLS_REAL_CMD.xmkmf?= ${X11PREFIX}/${X11ROOT_PREFIX}/bin/xmkmf -. else # ${X11_TYPE} == "native" -TOOLS_REAL_CMD.imake?= ${X11BASE}/bin/imake -TOOLS_REAL_CMD.xmkmf?= ${X11BASE}/bin/xmkmf -. endif -TOOLS_REAL_ARGS.imake?= ${IMAKEOPTS} -TOOLS_REAL_ARGS.xmkmf?= ${XMKMF_FLAGS} -# -# If we're using xpkgwedge, then we need to invoke the special xmkmf -# script that will find imake config files in both ${PREFIX} and in -# ${X11BASE}. -# -. if !empty(USE_XPKGWEDGE:M[yY][eE][sS]) -TOOLS_REAL_CMD.xmkmf= ${X11PREFIX}/bin/pkgxmkmf -. endif -# # Add any extra tools that may be required when using imake, e.g. gmake. -# -USE_TOOLS+= ${_IMAKE_TOOLS:Nimake} -# -# Define IMAKE and XMKMF_CMD and create wrappers/symlinks corresponding -# to imake and xmkmf. -# -TOOLS_CREATE+= imake xmkmf -TOOLS_${_TOOLS_VARNAME.imake}= ${TOOLS_REAL_CMD.imake} ${TOOLS_REAL_ARGS.imake} -TOOLS_${_TOOLS_VARNAME.xmkmf}= ${TOOLS_REAL_CMD.xmkmf} ${TOOLS_REAL_ARGS.xmkmf} -TOOLS_XMKMF= ${${_TOOLS_VARNAME.xmkmf}} -a -${_TOOLS_VARNAME.imake}= ${TOOLS_${_TOOLS_VARNAME.imake}} -${_TOOLS_VARNAME.xmkmf}= ${TOOLS_${_TOOLS_VARNAME.xmkmf}} -XMKMF?= ${TOOLS_XMKMF} -. endif -.endif +USE_TOOLS+= ${_IMAKE_TOOLS:Nimake} + +TOOLS_REAL_ARGS.imake?= ${IMAKEOPTS} +TOOLS_REAL_ARGS.xmkmf?= ${XMKMF_FLAGS} + +TOOLS_XMKMF= ${${_TOOLS_VARNAME.xmkmf}} -a +XMKMF= ${${_TOOLS_VARNAME.xmkmf}} -a diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index b065a7d2b95..5518b22f2b9 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.85 2005/05/19 03:52:23 jlam Exp $ +# $NetBSD: replace.mk,v 1.86 2005/05/19 05:27:25 jlam Exp $ # # This Makefile fragment handles "replacements" of system-supplied # tools with pkgsrc versions. @@ -64,8 +64,6 @@ TOOLS_DEPMETHOD.perl?= DEPENDS USE_TOOLS+= bison-yacc .endif -.include "../../mk/tools/imake.mk" - ###################################################################### # Create _USE_TOOLS, a sanitized version of PKGSRC_USE_TOOLS and @@ -549,6 +547,26 @@ TOOLS_${_TOOLS_VARNAME.id}= ${TOOLS_REAL_CMD.id} . endif .endif +.if !defined(TOOLS_IGNORE.imake) && !empty(_USE_TOOLS:Mimake) +. if !empty(PKGPATH:Mx11/imake) || !empty(PKGPATH:Mx11/xorg-imake) +MAKEFLAGS+= TOOLS_IGNORE.imake= +. elif !empty(_TOOLS_USE_PKGSRC.imake:M[yY][eE][sS]) +TOOLS_CREATE+= imake +. if defined(X11_TYPE) && !empty(X11_TYPE:MXFree86) +TOOLS_DEPENDS.imake?= imake>=4.4.0:../../x11/imake +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.imake=imake +TOOLS_REAL_CMD.imake= ${TOOLS_PREFIX.imake}/${X11ROOT_PREFIX}/bin/imake +. elif defined(X11_TYPE) && !empty(X11_TYPE:Mxorg) +TOOLS_DEPENDS.imake?= xorg-imake>=6.8:../../x11/xorg-imake +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.imake=xorg-imake +TOOLS_REAL_CMD.imake= ${TOOLS_PREFIX.imake}/${X11ROOT_PREFIX}/bin/imake +. else # !empty(X11_TYPE:Mnative) +TOOLS_REAL_CMD.imake= ${X11BASE}/bin/imake +. endif +TOOLS_${_TOOLS_VARNAME.imake}= ${TOOLS_REAL_CMD.imake} ${TOOLS_REAL_ARGS.imake} +. endif +.endif + .if !defined(TOOLS_IGNORE.install) && !empty(_USE_TOOLS:Minstall) . if !empty(PKGPATH:Msysutils/coreutils) MAKEFLAGS+= TOOLS_IGNORE.install= @@ -991,6 +1009,35 @@ TOOLS_${_TOOLS_VARNAME.xargs}= ${TOOLS_REAL_CMD.xargs} ${TOOLS_REAL_ARGS.xargs} . endif .endif +.if !defined(TOOLS_IGNORE.xmkmf) && !empty(_USE_TOOLS:Mxmkmf) +. if !empty(PKGPATH:Mx11/imake) || !empty(PKGPATH:Mx11/xorg-imake) +MAKEFLAGS+= TOOLS_IGNORE.xmkmf= +. elif !empty(_TOOLS_USE_PKGSRC.xmkmf:M[yY][eE][sS]) +TOOLS_CREATE+= xmkmf +. if defined(X11_TYPE) && !empty(X11_TYPE:MXFree86) +TOOLS_DEPENDS.xmkmf?= imake>=4.4.0:../../x11/imake +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xmkmf=imake +TOOLS_REAL_CMD.xmkmf= ${TOOLS_PREFIX.xmkmf}/${X11ROOT_PREFIX}/bin/xmkmf +. elif defined(X11_TYPE) && !empty(X11_TYPE:Mxorg) +TOOLS_DEPENDS.xmkmf?= xorg-imake>=6.8:../../x11/xorg-imake +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xmkmf=xorg-imake +TOOLS_REAL_CMD.xmkmf= ${TOOLS_PREFIX.xmkmf}/${X11ROOT_PREFIX}/bin/xmkmf +. else # !empty(X11_TYPE:Mnative) +TOOLS_REAL_CMD.xmkmf= ${X11BASE}/bin/xmkmf +. endif +# +# If we're using xpkgwedge, then we need to invoke the special xmkmf +# script that will find imake config files in both ${PREFIX} and in +# ${X11BASE}. +# +. if !empty(USE_XPKGWEDGE:M[yY][eE][sS]) +TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xpkgwedge=xpkgwedge +TOOLS_REAL_CMD.xmkmf= ${TOOLS_PREFIX.xpkgwedge}/bin/pkgxmkmf +. endif +TOOLS_${_TOOLS_VARNAME.xmkmf}= ${TOOLS_REAL_CMD.xmkmf} ${TOOLS_REAL_ARGS.xmkmf} +. endif +.endif + .if !defined(TOOLS_IGNORE.yacc) && !empty(_USE_TOOLS:Myacc) . if !empty(PKGPATH:Mdevel/bison) MAKEFLAGS+= TOOLS_IGNORE.yacc= |