diff options
author | jlam <jlam@pkgsrc.org> | 2005-04-25 06:16:38 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2005-04-25 06:16:38 +0000 |
commit | 3a4b4fd6c2d63a3e41b0a128da3a7a77c42f7272 (patch) | |
tree | c9fddc08761bf50fa00a11a7ae5bfc7c94f4dff9 | |
parent | f800c3f05ad0c87161754b8c2ceaa3184614917f (diff) | |
download | pkgsrc-3a4b4fd6c2d63a3e41b0a128da3a7a77c42f7272.tar.gz |
If PLATFORM_TOOL.<tool> is defined for a particular tool, then use it
instead of the pkgsrc version of the tool. This is an alternative to
adding the appropriate platform to the _TOOLS_USE_PLATFORM.* tables.
-rw-r--r-- | mk/tools/replace.mk | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk index 63ddddf062e..0bfcfbe983d 100644 --- a/mk/tools/replace.mk +++ b/mk/tools/replace.mk @@ -1,4 +1,4 @@ -# $NetBSD: replace.mk,v 1.13 2005/04/24 23:32:09 jlam Exp $ +# $NetBSD: replace.mk,v 1.14 2005/04/25 06:16:38 jlam Exp $ # # This Makefile fragment handles "replacements" of system-supplied # tools with pkgsrc versions. The replacements are placed under @@ -116,15 +116,16 @@ _TOOLS_USE_PLATFORM.yacc= DragonFly-*-* FreeBSD-*-* NetBSD-*-* \ ###################################################################### -# _TOOLS_USE_PKGSRC.<prog> is "yes" or "no" depending on whether we're -# using a pkgsrc-supplied tool to replace the system-supplied one. -# -# This currently uses ${OPSYS}-based checking and ignores the scenario -# where your kernel and userland aren't in sync. This should be turned -# into a bunch of feature tests in the future. +# _TOOLS_USE_PKGSRC.<tool> is "yes" or "no" depending on whether we're +# using a pkgsrc-supplied tool to replace the system-supplied one. We +# use the system-supplied one if PLATFORM_TOOL.<tool> is non-empty, or +# otherwise if this is a particular ${MACHINE_PLATFORM} listed above. # .for _t_ in ${_TOOLS_REPLACE_LIST} . for _pattern_ in ${_TOOLS_USE_PLATFORM.${_t_}} +. if defined(PLATFORM_TOOL.${_t_}) && !empty(PLATFORM_TOOL.${_t_}) +_TOOLS_USE_PKGSRC.${_t_}?= no +. endif . if !empty(MACHINE_PLATFORM:M${_pattern_}) _TOOLS_USE_PKGSRC.${_t_}?= no . endif @@ -134,7 +135,7 @@ _TOOLS_USE_PKGSRC.${_t_}?= yes .endfor .undef _t_ -# TOOLS_DEPENDS.<prog> defaults to BUILD_DEPENDS. +# TOOLS_DEPENDS.<tool> defaults to BUILD_DEPENDS. .for _t_ in ${_TOOLS_REPLACE_LIST} TOOLS_DEPENDS.${_t_}?= BUILD_DEPENDS .endfor @@ -391,7 +392,13 @@ TOOLS_CMD.yacc= ${TOOLS_DIR}/bin/yacc .for _t_ in ${_TOOLS_REPLACE_LIST} . if !defined(TOOLS_IGNORE.${_t_}) && !empty(USE_TOOLS:M${_t_}) && \ !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO]) -. if defined(${_TOOLS_VARNAME.${_t_}}) +. if defined(PLATFORM_TOOL.${_t_}) && !empty(PLATFORM_TOOL.${_t_}) +TOOLS_REAL_CMD.${_t_}?= \ + ${PLATFORM_TOOL.${_t_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} +TOOLS_ARGS.${_t_}?= \ + ${PLATFORM_TOOL.${_t_}:C/^/_asdf_/1:N_asdf_*} +${_TOOLS_VARNAME.${_t_}}= ${PLATFORM_TOOL.${_t_}} +. elif defined(${_TOOLS_VARNAME.${_t_}}) TOOLS_REAL_CMD.${_t_}?= \ ${${_TOOLS_VARNAME.${_t_}}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//} TOOLS_ARGS.${_t_}?= \ |