pkgsrc/mk/tools/replace.mk

1282 lines
47 KiB
Makefile
Raw Normal View History

# $NetBSD: replace.mk,v 1.108 2005/07/15 18:27:55 jlam Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
#
# This code is derived from software contributed to The NetBSD Foundation
# by Johnny C. Lam.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by the NetBSD
# Foundation, Inc. and its contributors.
# 4. Neither the name of The NetBSD Foundation nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
#
# This Makefile fragment handles "replacements" of system-supplied
# tools with pkgsrc versions.
#
# The replacement tools are placed under ${TOOLS_DIR} so that they
# appear earlier in the search path when invoked using the bare name
# of the tool.
#
# "TOOLS_TOOL" variables, e.g. TOOLS_AWK, TOOLS_SED, etc. are set to
# the full command lines necessary to invoke the real tools on the
# filesystem, and represent the tools required by the package.
#
# "TOOL" variables, e.g. AWK, SED, etc. are set to the full command
# lines necessary to invoke the real tools on the filesystem, and
# represent the tools required by pkgsrc itself.
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
#
# The tools that could be replaced with pkgsrc counterparts (usually
# GNU versions of the tools) that are required by pkgsrc itself, i.e.
# in targets that are part of pkgsrc infrastructure or part of the
# package Makefile, or by the package itself, i.e. within the
# software's own build system, should be listed as:
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
#
# USE_TOOLS+= awk gmake lex sed
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
#
# If a package requires yacc to generate a parser, then the package
# Makefile should contain one of the following two lines:
#
# USE_TOOLS+= yacc # any yacc will do
# USE_TOOLS+= bison # requires bison-specific features
#
# Adding either "yacc" or "bison" to USE_TOOLS will cause a "yacc" tool
# to be generated that may be used as a yacc-replacement.
#
# By default, any dependencies on the pkgsrc tools are build dependencies,
# but this may be changed by explicitly setting TOOLS_DEPMETHOD.<tool>,
# e.g.:
#
# TOOLS_DEPMETHOD.tbl= DEPENDS
#
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
# Continue to allow USE_PERL5 until packages have been taught to use the
# new syntax.
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
#
.if defined(USE_PERL5)
USE_TOOLS+= perl
. if empty(USE_PERL5:Mbuild)
TOOLS_DEPMETHOD.perl?= DEPENDS
. endif
.endif
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
# XXX Keep this hack here until the day that msgfmt and msgfmt-plurals
# XXX is handled directly by the tools framework.
# XXX
.if defined(USE_MSGFMT_PLURALS) && !empty(USE_MSGFMT_PLURALS:M[yY][eE][sS])
USE_TOOLS+= perl
.endif
# bison implies "bison-yacc"
.if !empty(USE_TOOLS:Mbison)
USE_TOOLS+= bison-yacc
.endif
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
######################################################################
# Create _USE_TOOLS, a sanitized version of USE_TOOLS that removes the
# ones that are overridden by superseding ones.
#
.if !defined(_USE_TOOLS)
_USE_TOOLS:= ${USE_TOOLS:O:u}
. if !empty(USE_TOOLS:Mbison-yacc) # bison-yacc > yacc
_USE_TOOLS:= ${_USE_TOOLS:Nyacc}
. endif
. if !empty(USE_TOOLS:Mflex) # flex > lex
_USE_TOOLS:= ${_USE_TOOLS:Nlex}
. endif
. if !empty(USE_TOOLS:Mgawk) # gawk > awk
_USE_TOOLS:= ${_USE_TOOLS:Nawk}
. endif
. if !empty(USE_TOOLS:Mgm4) # gm4 > m4
_USE_TOOLS:= ${_USE_TOOLS:Nm4}
. endif
. if !empty(USE_TOOLS:Mgsed) # gsed > sed
_USE_TOOLS:= ${_USE_TOOLS:Nsed}
. endif
.endif
MAKEVARS+= _USE_TOOLS
######################################################################
# _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 TOOLS_PLATFORM.<tool> is non-empty, or
# otherwise if this is a particular ${MACHINE_PLATFORM} listed above.
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
#
.for _t_ in ${_USE_TOOLS}
. if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
_TOOLS_USE_PKGSRC.${_t_}?= no
. endif
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
_TOOLS_USE_PKGSRC.${_t_}?= yes
.endfor
# TOOLS_DEPMETHOD.<tool> defaults to BUILD_DEPENDS.
.for _t_ in ${_USE_TOOLS}
TOOLS_DEPMETHOD.${_t_}?= BUILD_DEPENDS
.endfor
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
######################################################################
# For each of the blocks below, we create either symlinks or wrappers
# for each of the tools requested. We need to be careful that we don't
# get into dependency loops; do this by setting and checking the value
# of TOOLS_IGNORE.<tool>. These blocks handle the case where we are
# using the pkgsrc-supplied tool.
#
# Always set the "TOOLS_TOOL" name for each tool to point to the real
# command, e.g., TOOLS_TBL, TOOLS_YACC, etc., provided that "TOOL" has
# been associated with <tool>.
#
.if !defined(TOOLS_IGNORE.[) && !empty(_USE_TOOLS:M\[)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.[=
. elif !empty(_TOOLS_USE_PKGSRC.[:M[yY][eE][sS])
TOOLS_DEPENDS.[?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= [
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.[=coreutils
TOOLS_REAL_CMD.[= ${TOOLS_PREFIX.[}/bin/${GNU_PROGRAM_PREFIX}[
. endif
.endif
.if !defined(TOOLS_IGNORE.awk) && !empty(_USE_TOOLS:Mawk)
. if !empty(PKGPATH:Mlang/nawk)
MAKEFLAGS+= TOOLS_IGNORE.awk=
. elif !empty(_TOOLS_USE_PKGSRC.awk:M[yY][eE][sS])
TOOLS_DEPENDS.awk?= nawk>=20040207:../../lang/nawk
TOOLS_CREATE+= awk
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.awk=nawk
TOOLS_REAL_CMD.awk= ${TOOLS_PREFIX.awk}/bin/nawk
TOOLS_${_TOOLS_VARNAME.awk}= ${TOOLS_REAL_CMD.awk}
. endif
.endif
.if !defined(TOOLS_IGNORE.basename) && !empty(_USE_TOOLS:Mbasename)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.basename=
. elif !empty(_TOOLS_USE_PKGSRC.basename:M[yY][eE][sS])
TOOLS_DEPENDS.basename?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= basename
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.basename=coreutils
TOOLS_REAL_CMD.basename= ${TOOLS_PREFIX.basename}/bin/${GNU_PROGRAM_PREFIX}basename
TOOLS_${_TOOLS_VARNAME.basename}= ${TOOLS_REAL_CMD.basename}
. endif
.endif
.if !defined(TOOLS_IGNORE.bash) && !empty(_USE_TOOLS:Mbash)
. if !empty(PKGPATH:Mshells/bash)
MAKEFLAGS+= TOOLS_IGNORE.bash=
. elif !empty(_TOOLS_USE_PKGSRC.bash:M[yY][eE][sS])
TOOLS_DEPENDS.bash?= bash-[0-9]*:../../shells/bash
TOOLS_CREATE+= bash
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bash=bash
TOOLS_REAL_CMD.bash= ${TOOLS_PREFIX.bash}/bin/bash
2005-06-24 23:17:01 +02:00
TOOLS_${_TOOLS_VARNAME.bash}= ${TOOLS_REAL_CMD.bash}
. endif
.endif
.if !defined(TOOLS_IGNORE.bdftopcf) && !empty(_USE_TOOLS:Mbdftopcf)
. if !empty(PKGPATH:Mx11/XFree86-clients) || !empty(PKGPATH:Mx11/xorg-clients)
MAKEFLAGS+= TOOLS_IGNORE.bdftopcf=
. elif !empty(_TOOLS_USE_PKGSRC.bdftopcf:M[yY][eE][sS])
TOOLS_CREATE+= bdftopcf
. if defined(X11_TYPE) && !empty(X11_TYPE:MXFree86)
TOOLS_DEPENDS.bdftopcf?= XFree86-clients>=4.4.0:../../x11/XFree86-clients
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bdftopcf=imake
TOOLS_REAL_CMD.bdftopcf= ${TOOLS_PREFIX.bdftopcf}/${X11ROOT_PREFIX}/bin/bdftopcf
. elif defined(X11_TYPE) && !empty(X11_TYPE:Mxorg)
TOOLS_DEPENDS.bdftopcf?= xorg-clients>=6.8:../../x11/xorg-clients
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bdftopcf=xorg-clients
TOOLS_REAL_CMD.bdftopcf= ${TOOLS_PREFIX.bdftopcf}/${X11ROOT_PREFIX}/bin/bdftopcf
. else # !empty(X11_TYPE:Mnative)
TOOLS_REAL_CMD.bdftopcf= ${X11BASE}/bin/bdftopcf
. endif
. endif
.endif
.if !defined(TOOLS_IGNORE.bison) && !empty(_USE_TOOLS:Mbison)
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. if !empty(PKGPATH:Mdevel/bison)
MAKEFLAGS+= TOOLS_IGNORE.bison=
. elif !empty(_TOOLS_USE_PKGSRC.bison:M[yY][eE][sS])
TOOLS_DEPENDS.bison?= bison>=1.0:../../devel/bison
TOOLS_CREATE+= bison
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bison=bison
TOOLS_REAL_CMD.bison= ${TOOLS_PREFIX.bison}/bin/bison
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. endif
.endif
.if !defined(TOOLS_IGNORE.bison-yacc) && !empty(_USE_TOOLS:Mbison-yacc)
. if !empty(PKGPATH:Mdevel/bison)
MAKEFLAGS+= TOOLS_IGNORE.bison-yacc=
. elif !empty(_TOOLS_USE_PKGSRC.bison-yacc:M[yY][eE][sS])
TOOLS_DEPENDS.bison-yacc?= bison>=1.0:../../devel/bison
TOOLS_CREATE+= bison-yacc
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bison-yacc=bison
TOOLS_REAL_CMD.bison-yacc= ${TOOLS_PREFIX.bison-yacc}/bin/bison
TOOLS_REAL_ARGS.bison-yacc= -y
TOOLS_${_TOOLS_VARNAME.bison-yacc}= \
${TOOLS_REAL_CMD.bison-yacc} ${TOOLS_REAL_ARGS.bison-yacc}
. endif
TOOLS_CMD.bison-yacc= ${TOOLS_DIR}/bin/yacc
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
.endif
.if !defined(TOOLS_IGNORE.bzcat) && !empty(_USE_TOOLS:Mbzcat)
. if !empty(PKGPATH:Marchivers/bzip2)
MAKEFLAGS+= TOOLS_IGNORE.bzcat=
. elif !empty(_TOOLS_USE_PKGSRC.bzcat:M[yY][eE][sS])
TOOLS_DEPENDS.bzcat?= bzip2>=0.9.0b:../../archivers/bzip2
TOOLS_CREATE+= bzcat
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.bzcat=bzip2
TOOLS_REAL_CMD.bzcat= ${TOOLS_PREFIX.bzcat}/bin/bzcat
TOOLS_${_TOOLS_VARNAME.bzcat}= ${TOOLS_REAL_CMD.bzcat}
. endif
.endif
.if !defined(TOOLS_IGNORE.cat) && !empty(_USE_TOOLS:Mcat)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.cat=
. elif !empty(_TOOLS_USE_PKGSRC.cat:M[yY][eE][sS])
TOOLS_DEPENDS.cat?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= cat
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cat=coreutils
TOOLS_REAL_CMD.cat= ${TOOLS_PREFIX.cat}/bin/${GNU_PROGRAM_PREFIX}cat
TOOLS_${_TOOLS_VARNAME.cat}= ${TOOLS_REAL_CMD.cat}
. endif
.endif
.if !defined(TOOLS_IGNORE.chgrp) && !empty(_USE_TOOLS:Mchgrp)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.chgrp=
. elif !empty(_TOOLS_USE_PKGSRC.chgrp:M[yY][eE][sS])
TOOLS_DEPENDS.chgrp?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= chgrp
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.chgrp=coreutils
TOOLS_REAL_CMD.chgrp= ${TOOLS_PREFIX.chgrp}/bin/${GNU_PROGRAM_PREFIX}chgrp
TOOLS_${_TOOLS_VARNAME.chgrp}= ${TOOLS_REAL_CMD.chgrp}
. endif
.endif
.if !defined(TOOLS_IGNORE.chmod) && !empty(_USE_TOOLS:Mchmod)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.chmod=
. elif !empty(_TOOLS_USE_PKGSRC.chmod:M[yY][eE][sS])
TOOLS_DEPENDS.chmod?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= chmod
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.chmod=coreutils
TOOLS_REAL_CMD.chmod= ${TOOLS_PREFIX.chmod}/bin/${GNU_PROGRAM_PREFIX}chmod
TOOLS_${_TOOLS_VARNAME.chmod}= ${TOOLS_REAL_CMD.chmod}
. endif
.endif
.if !defined(TOOLS_IGNORE.chown) && !empty(_USE_TOOLS:Mchown)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.chown=
. elif !empty(_TOOLS_USE_PKGSRC.chown:M[yY][eE][sS])
TOOLS_DEPENDS.chown?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= chown
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.chown=coreutils
TOOLS_REAL_CMD.chown= ${TOOLS_PREFIX.chown}/bin/${GNU_PROGRAM_PREFIX}chown
TOOLS_${_TOOLS_VARNAME.chown}= ${TOOLS_REAL_CMD.chown}
. endif
.endif
.if !defined(TOOLS_IGNORE.cmp) && !empty(_USE_TOOLS:Mcmp)
2005-04-27 01:20:35 +02:00
. if !empty(PKGPATH:Mdevel/diffutils)
MAKEFLAGS+= TOOLS_IGNORE.cmp=
. elif !empty(_TOOLS_USE_PKGSRC.cmp:M[yY][eE][sS])
TOOLS_DEPENDS.cmp?= diffutils>=2.8.1:../../devel/diffutils
TOOLS_CREATE+= cmp
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cmp=diffutils
TOOLS_REAL_CMD.cmp= ${TOOLS_PREFIX.cmp}/bin/${GNU_PROGRAM_PREFIX}cmp
TOOLS_${_TOOLS_VARNAME.cmp}= ${TOOLS_REAL_CMD.cmp}
2005-04-27 01:20:35 +02:00
. endif
.endif
.if !defined(TOOLS_IGNORE.cp) && !empty(_USE_TOOLS:Mcp)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.cp=
. elif !empty(_TOOLS_USE_PKGSRC.cp:M[yY][eE][sS])
TOOLS_DEPENDS.cp?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= cp
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cp=coreutils
TOOLS_REAL_CMD.cp= ${TOOLS_PREFIX.cp}/bin/${GNU_PROGRAM_PREFIX}cp
TOOLS_${_TOOLS_VARNAME.cp}= ${TOOLS_REAL_CMD.cp}
. endif
.endif
.if !defined(TOOLS_IGNORE.csh) && !empty(_USE_TOOLS:Mcsh)
. if !empty(PKGPATH:Mshells/tcsh)
MAKEFLAGS+= TOOLS_IGNORE.csh=
. elif !empty(_TOOLS_USE_PKGSRC.csh:M[yY][eE][sS])
TOOLS_DEPENDS.csh?= tcsh-[0-9]*:../../shells/tcsh
TOOLS_CREATE+= csh
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.csh=tcsh
TOOLS_REAL_CMD.csh= ${TOOLS_PREFIX.csh}/bin/tcsh
TOOLS_${_TOOLS_VARNAME.csh}= ${TOOLS_REAL_CMD.csh}
. endif
.endif
.if !defined(TOOLS_IGNORE.cut) && !empty(_USE_TOOLS:Mcut)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.cut=
. elif !empty(_TOOLS_USE_PKGSRC.cut:M[yY][eE][sS])
TOOLS_DEPENDS.cut?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= cut
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cut=coreutils
TOOLS_REAL_CMD.cut= ${TOOLS_PREFIX.cut}/bin/${GNU_PROGRAM_PREFIX}cut
TOOLS_${_TOOLS_VARNAME.cut}= ${TOOLS_REAL_CMD.cut}
. endif
.endif
.if !defined(TOOLS_IGNORE.date) && !empty(_USE_TOOLS:Mdate)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.date=
. elif !empty(_TOOLS_USE_PKGSRC.date:M[yY][eE][sS])
TOOLS_DEPENDS.date?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= date
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.date=coreutils
TOOLS_REAL_CMD.date= ${TOOLS_PREFIX.date}/bin/${GNU_PROGRAM_PREFIX}date
TOOLS_${_TOOLS_VARNAME.date}= ${TOOLS_REAL_CMD.date}
. endif
.endif
.if !defined(TOOLS_IGNORE.diff) && !empty(_USE_TOOLS:Mdiff)
. if !empty(PKGPATH:Mdevel/diffutils)
MAKEFLAGS+= TOOLS_IGNORE.diff=
. elif !empty(_TOOLS_USE_PKGSRC.diff:M[yY][eE][sS])
TOOLS_DEPENDS.diff?= diffutils>=2.8.1:../../devel/diffutils
TOOLS_CREATE+= diff
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.diff=diffutils
TOOLS_REAL_CMD.diff= ${TOOLS_PREFIX.diff}/bin/${GNU_PROGRAM_PREFIX}diff
TOOLS_${_TOOLS_VARNAME.diff}= ${TOOLS_REAL_CMD.diff}
. endif
.endif
.if !defined(TOOLS_IGNORE.dirname) && !empty(_USE_TOOLS:Mdirname)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.dirname=
. elif !empty(_TOOLS_USE_PKGSRC.dirname:M[yY][eE][sS])
TOOLS_DEPENDS.dirname?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= dirname
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.dirname=coreutils
TOOLS_REAL_CMD.dirname= ${TOOLS_PREFIX.dirname}/bin/${GNU_PROGRAM_PREFIX}dirname
TOOLS_${_TOOLS_VARNAME.dirname}= ${TOOLS_REAL_CMD.dirname}
. endif
.endif
.if !defined(TOOLS_IGNORE.echo) && !empty(_USE_TOOLS:Mecho)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.echo=
. elif !empty(_TOOLS_USE_PKGSRC.echo:M[yY][eE][sS])
TOOLS_DEPENDS.echo?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= echo
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.echo=coreutils
TOOLS_REAL_CMD.echo= ${TOOLS_PREFIX.echo}/bin/${GNU_PROGRAM_PREFIX}echo
TOOLS_${_TOOLS_VARNAME.echo}= ${TOOLS_REAL_CMD.echo}
. endif
.endif
.if !defined(TOOLS_IGNORE.egrep) && !empty(_USE_TOOLS:Megrep)
. if !empty(PKGPATH:Mtextproc/grep)
MAKEFLAGS+= TOOLS_IGNORE.egrep=
. elif !empty(_TOOLS_USE_PKGSRC.egrep:M[yY][eE][sS])
TOOLS_DEPENDS.egrep?= grep>=2.5.1:../../textproc/grep
TOOLS_CREATE+= egrep
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.egrep=grep
TOOLS_REAL_CMD.egrep= ${TOOLS_PREFIX.egrep}/bin/${GNU_PROGRAM_PREFIX}egrep
TOOLS_${_TOOLS_VARNAME.egrep}= ${TOOLS_REAL_CMD.egrep}
. endif
.endif
.if !defined(TOOLS_IGNORE.env) && !empty(_USE_TOOLS:Menv)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.env=
. elif !empty(_TOOLS_USE_PKGSRC.env:M[yY][eE][sS])
TOOLS_DEPENDS.env?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= env
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.env=coreutilsj
TOOLS_REAL_CMD.env= ${TOOLS_PREFIX.env}/bin/${GNU_PROGRAM_PREFIX}env
TOOLS_${_TOOLS_VARNAME.env}= ${TOOLS_REAL_CMD.env}
. endif
.endif
.if !defined(TOOLS_IGNORE.expr) && !empty(_USE_TOOLS:Mexpr)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.expr=
. elif !empty(_TOOLS_USE_PKGSRC.expr:M[yY][eE][sS])
TOOLS_DEPENDS.expr?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= expr
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.expr=coreutils
TOOLS_REAL_CMD.expr= ${TOOLS_PREFIX.expr}/bin/${GNU_PROGRAM_PREFIX}expr
TOOLS_${_TOOLS_VARNAME.expr}= ${TOOLS_REAL_CMD.expr}
. endif
.endif
.if !defined(TOOLS_IGNORE.false) && !empty(_USE_TOOLS:Mfalse)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.false=
. elif !empty(_TOOLS_USE_PKGSRC.false:M[yY][eE][sS])
TOOLS_DEPENDS.false?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= false
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.false=coreutils
TOOLS_REAL_CMD.false= ${TOOLS_PREFIX.false}/bin/${GNU_PROGRAM_PREFIX}false
TOOLS_${_TOOLS_VARNAME.false}= ${TOOLS_REAL_CMD.false}
. endif
.endif
.if !defined(TOOLS_IGNORE.fgrep) && !empty(_USE_TOOLS:Mfgrep)
. if !empty(PKGPATH:Mtextproc/grep)
MAKEFLAGS+= TOOLS_IGNORE.fgrep=
. elif !empty(_TOOLS_USE_PKGSRC.fgrep:M[yY][eE][sS])
TOOLS_DEPENDS.fgrep?= grep>=2.5.1:../../textproc/grep
TOOLS_CREATE+= fgrep
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.fgrep=grep
TOOLS_REAL_CMD.fgrep= ${TOOLS_PREFIX.fgrep}/bin/${GNU_PROGRAM_PREFIX}fgrep
TOOLS_${_TOOLS_VARNAME.fgrep}= ${TOOLS_REAL_CMD.fgrep}
. endif
.endif
.if !defined(TOOLS_IGNORE.file) && !empty(_USE_TOOLS:Mfile)
. if !empty(PKGPATH:Msysutils/file)
MAKEFLAGS+= TOOLS_IGNORE.file=
. elif !empty(_TOOLS_USE_PKGSRC.file:M[yY][eE][sS])
TOOLS_DEPENDS.file?= file>=4.13:../../sysutils/file
TOOLS_CREATE+= file
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.file=file
TOOLS_REAL_CMD.file= ${TOOLS_PREFIX.file}/bin/file
TOOLS_${_TOOLS_VARNAME.file}= ${TOOLS_REAL_CMD.file}
. endif
.endif
.if !defined(TOOLS_IGNORE.find) && !empty(_USE_TOOLS:Mfind)
. if !empty(PKGPATH:Msysutils/findutils)
MAKEFLAGS+= TOOLS_IGNORE.find=
. elif !empty(_TOOLS_USE_PKGSRC.find:M[yY][eE][sS])
TOOLS_DEPENDS.find?= findutils>=4.1:../../sysutils/findutils
TOOLS_CREATE+= find
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.find=findutils
TOOLS_REAL_CMD.find= ${TOOLS_PREFIX.find}/bin/${GNU_PROGRAM_PREFIX}find
TOOLS_${_TOOLS_VARNAME.find}= ${TOOLS_REAL_CMD.find}
. endif
.endif
.if !defined(TOOLS_IGNORE.flex) && !empty(_USE_TOOLS:Mflex)
. if !empty(PKGPATH:Mdevel/flex)
MAKEFLAGS+= TOOLS_IGNORE.flex=
. elif !empty(_TOOLS_USE_PKGSRC.flex:M[yY][eE][sS])
. include "../../devel/flex/buildlink3.mk"
_TOOLS_DEPENDS.flex= # empty
. for _dep_ in ${BUILDLINK_DEPENDS.flex}
_TOOLS_DEPENDS.flex+= ${_dep_}:${BUILDLINK_PKGSRCDIR.flex}
. endfor
TOOLS_DEPENDS.flex?= ${_TOOLS_DEPENDS.flex}
TOOLS_CREATE+= flex
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.flex=flex
TOOLS_REAL_CMD.flex= ${TOOLS_PREFIX.flex}/bin/flex
TOOLS_${_TOOLS_VARNAME.flex}= ${TOOLS_REAL_CMD.flex}
. endif
TOOLS_ALIASES.flex= lex
.endif
.if !defined(TOOLS_IGNORE.gawk) && !empty(_USE_TOOLS:Mgawk)
. if !empty(PKGPATH:Mlang/gawk)
MAKEFLAGS+= TOOLS_IGNORE.gawk=
. elif !empty(_TOOLS_USE_PKGSRC.gawk:M[yY][eE][sS])
TOOLS_DEPENDS.gawk?= gawk>=3.1.1:../../lang/gawk
TOOLS_CREATE+= gawk
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gawk=gawk
TOOLS_REAL_CMD.gawk= ${TOOLS_PREFIX.gawk}/bin/${GNU_PROGRAM_PREFIX}awk
TOOLS_${_TOOLS_VARNAME.gawk}= ${TOOLS_REAL_CMD.gawk}
. endif
TOOLS_ALIASES.gawk= awk
.endif
.if !defined(TOOLS_IGNORE.gm4) && !empty(_USE_TOOLS:Mgm4)
. if !empty(PKGPATH:Mdevel/m4)
MAKEFLAGS+= TOOLS_IGNORE.gm4=
. elif !empty(_TOOLS_USE_PKGSRC.gm4:M[yY][eE][sS])
TOOLS_DEPENDS.gm4?= m4>=1.4:../../devel/m4
TOOLS_CREATE+= gm4
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gm4=m4
TOOLS_REAL_CMD.gm4= ${TOOLS_PREFIX.gm4}/bin/gm4
TOOLS_${_TOOLS_VARNAME.gm4}= ${TOOLS_REAL_CMD.gm4}
. endif
TOOLS_ALIASES.gm4= m4
.endif
.if !defined(TOOLS_IGNORE.gmake) && !empty(_USE_TOOLS:Mgmake)
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. if !empty(PKGPATH:Mdevel/gmake)
MAKEFLAGS+= TOOLS_IGNORE.gmake=
. elif !empty(_TOOLS_USE_PKGSRC.gmake:M[yY][eE][sS])
TOOLS_DEPENDS.gmake?= gmake>=3.78:../../devel/gmake
TOOLS_CREATE+= gmake
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gmake=gmake
TOOLS_REAL_CMD.gmake= ${TOOLS_PREFIX.gmake}/bin/gmake
TOOLS_${_TOOLS_VARNAME.gmake}= ${TOOLS_REAL_CMD.gmake}
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. endif
.endif
.if !defined(TOOLS_IGNORE.grep) && !empty(_USE_TOOLS:Mgrep)
. if !empty(PKGPATH:Mtextproc/grep)
MAKEFLAGS+= TOOLS_IGNORE.grep=
. elif !empty(_TOOLS_USE_PKGSRC.grep:M[yY][eE][sS])
TOOLS_DEPENDS.grep?= grep>=2.5.1:../../textproc/grep
TOOLS_CREATE+= grep
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.grep=grep
TOOLS_REAL_CMD.grep= ${TOOLS_PREFIX.grep}/bin/${GNU_PROGRAM_PREFIX}grep
TOOLS_${_TOOLS_VARNAME.grep}= ${TOOLS_REAL_CMD.grep}
. endif
.endif
.if !defined(TOOLS_IGNORE.gsed) && !empty(_USE_TOOLS:Mgsed)
2005-04-28 06:00:15 +02:00
. if !empty(PKGPATH:Mtextproc/gsed)
MAKEFLAGS+= TOOLS_IGNORE.gsed=
. elif !empty(_TOOLS_USE_PKGSRC.gsed:M[yY][eE][sS])
TOOLS_DEPENDS.gsed?= gsed>=3.0.2:../../textproc/gsed
TOOLS_CREATE+= gsed
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gsed=gsed
TOOLS_REAL_CMD.gsed= ${TOOLS_PREFIX.gsed}/bin/${GNU_PROGRAM_PREFIX}sed
TOOLS_${_TOOLS_VARNAME.gsed}= ${TOOLS_REAL_CMD.gsed}
. endif
TOOLS_ALIASES.gsed= sed
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
.endif
.if !defined(TOOLS_IGNORE.gtar) && !empty(_USE_TOOLS:Mgtar)
. if !empty(PKGPATH:Marchivers/gtar-base)
MAKEFLAGS+= TOOLS_IGNORE.gtar=
. elif !empty(_TOOLS_USE_PKGSRC.gtar:M[yY][eE][sS])
TOOLS_DEPENDS.gtar?= gtar-base>=1.13.25:../../archivers/gtar-base
TOOLS_CREATE+= gtar
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gtar=gtar-base
TOOLS_REAL_CMD.gtar= ${TOOLS_PREFIX.gtar}/bin/${GNU_PROGRAM_PREFIX}tar
TOOLS_${_TOOLS_VARNAME.gtar}= ${TOOLS_REAL_CMD.gtar}
. endif
.endif
.if !defined(TOOLS_IGNORE.gunzip) && !empty(_USE_TOOLS:Mgunzip)
. if !empty(PKGPATH:Marchivers/gzip-base)
MAKEFLAGS+= TOOLS_IGNORE.gunzip=
. elif !empty(_TOOLS_USE_PKGSRC.gunzip:M[yY][eE][sS])
TOOLS_DEPENDS.gunzip?= gzip-base>=1.2.4b:../../archivers/gzip-base
TOOLS_CREATE+= gunzip
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gunzip=gzip-base
TOOLS_REAL_CMD.gunzip= ${TOOLS_PREFIX.gunzip}/bin/gunzip
TOOLS_REAL_ARGS.gunzip= -f
TOOLS_${_TOOLS_VARNAME.gunzip}= ${TOOLS_REAL_CMD.gunzip} ${TOOLS_REAL_ARGS.gunzip}
. endif
.endif
.if !defined(TOOLS_IGNORE.gzcat) && !empty(_USE_TOOLS:Mgzcat)
. if !empty(PKGPATH:Marchivers/gzip-base)
MAKEFLAGS+= TOOLS_IGNORE.gzcat=
. elif !empty(_TOOLS_USE_PKGSRC.gzcat:M[yY][eE][sS])
TOOLS_DEPENDS.gzcat?= gzip-base>=1.2.4b:../../archivers/gzip-base
TOOLS_CREATE+= gzcat
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gzcat=gzip-base
2005-05-16 00:34:43 +02:00
TOOLS_REAL_CMD.gzcat= ${TOOLS_PREFIX.gzcat}/bin/zcat
TOOLS_${_TOOLS_VARNAME.gzcat}= ${TOOLS_REAL_CMD.gzcat}
. endif
.endif
.if !defined(TOOLS_IGNORE.gzip) && !empty(_USE_TOOLS:Mgzip)
. if !empty(PKGPATH:Marchivers/gzip-base)
MAKEFLAGS+= TOOLS_IGNORE.gzip=
. elif !empty(_TOOLS_USE_PKGSRC.gzip:M[yY][eE][sS])
TOOLS_DEPENDS.gzip?= gzip-base>=1.2.4b:../../archivers/gzip-base
TOOLS_CREATE+= gzip
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gzip=gzip-base
TOOLS_REAL_CMD.gzip= ${TOOLS_PREFIX.gzip}/bin/gzip
TOOLS_REAL_ARGS.gzip= -nf ${GZIP}
TOOLS_${_TOOLS_VARNAME.gzip}= ${TOOLS_REAL_CMD.gzip} ${TOOLS_REAL_ARGS.gzip}
. endif
.endif
.if !defined(TOOLS_IGNORE.head) && !empty(_USE_TOOLS:Mhead)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.head=
. elif !empty(_TOOLS_USE_PKGSRC.head:M[yY][eE][sS])
TOOLS_DEPENDS.head?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= head
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.head=coreutils
TOOLS_REAL_CMD.head= ${TOOLS_PREFIX.head}/bin/${GNU_PROGRAM_PREFIX}head
TOOLS_${_TOOLS_VARNAME.head}= ${TOOLS_REAL_CMD.head}
. endif
.endif
.if !defined(TOOLS_IGNORE.hostname) && !empty(_USE_TOOLS:Mhostname)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.hostname=
. elif !empty(_TOOLS_USE_PKGSRC.hostname:M[yY][eE][sS])
TOOLS_DEPENDS.hostname?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= hostname
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.hostname=coreutils
TOOLS_REAL_CMD.hostname= ${TOOLS_PREFIX.hostname}/bin/${GNU_PROGRAM_PREFIX}hostname
TOOLS_${_TOOLS_VARNAME.hostname}= ${TOOLS_REAL_CMD.hostname}
. endif
.endif
.if !defined(TOOLS_IGNORE.id) && !empty(_USE_TOOLS:Mid)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.id=
. elif !empty(_TOOLS_USE_PKGSRC.id:M[yY][eE][sS])
TOOLS_DEPENDS.id?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= id
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.id=coreutils
TOOLS_REAL_CMD.id= ${TOOLS_PREFIX.id}/bin/${GNU_PROGRAM_PREFIX}id
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=
. elif !empty(_TOOLS_USE_PKGSRC.install:M[yY][eE][sS])
TOOLS_DEPENDS.install?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= install
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.install=coreutils
TOOLS_REAL_CMD.install= ${TOOLS_PREFIX.install}/bin/${GNU_PROGRAM_PREFIX}install
TOOLS_${_TOOLS_VARNAME.install}= ${TOOLS_REAL_CMD.install}
. endif
.endif
.if !defined(TOOLS_IGNORE.lex) && !empty(_USE_TOOLS:Mlex)
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. if !empty(PKGPATH:Mdevel/flex)
MAKEFLAGS+= TOOLS_IGNORE.lex=
. elif !empty(_TOOLS_USE_PKGSRC.lex:M[yY][eE][sS])
. include "../../devel/flex/buildlink3.mk"
_TOOLS_DEPENDS.lex= # empty
. for _dep_ in ${BUILDLINK_DEPENDS.flex}
_TOOLS_DEPENDS.lex+= ${_dep_}:${BUILDLINK_PKGSRCDIR.flex}
. endfor
TOOLS_DEPENDS.lex?= ${_TOOLS_DEPENDS.lex}
TOOLS_CREATE+= lex
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.lex=flex
TOOLS_REAL_CMD.lex= ${TOOLS_PREFIX.lex}/bin/flex
TOOLS_${_TOOLS_VARNAME.lex}= ${TOOLS_REAL_CMD.lex}
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. endif
.endif
.if !defined(TOOLS_IGNORE.lha) && !empty(_USE_TOOLS:Mlha)
. if !empty(PKGPATH:Marchivers/lha)
MAKEFLAGS+= TOOLS_IGNORE.lha=
. elif !empty(_TOOLS_USE_PKGSRC.lha:M[yY][eE][sS])
TOOLS_DEPENDS.lha?= lha>=114.9:../../archivers/lha
TOOLS_CREATE+= lha
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.lha=lha
TOOLS_REAL_CMD.lha= ${TOOLS_PREFIX.lha}/bin/lha
TOOLS_${_TOOLS_VARNAME.lha}= ${TOOLS_REAL_CMD.lha}
. endif
.endif
.if !defined(TOOLS_IGNORE.ln) && !empty(_USE_TOOLS:Mln)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.ln=
. elif !empty(_TOOLS_USE_PKGSRC.ln:M[yY][eE][sS])
TOOLS_DEPENDS.ln?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= ln
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.ln=coreutils
TOOLS_REAL_CMD.ln= ${TOOLS_PREFIX.ln}/bin/${GNU_PROGRAM_PREFIX}ln
TOOLS_${_TOOLS_VARNAME.ln}= ${TOOLS_REAL_CMD.ln}
. endif
.endif
.if !defined(TOOLS_IGNORE.ls) && !empty(_USE_TOOLS:Mls)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.ls=
. elif !empty(_TOOLS_USE_PKGSRC.ls:M[yY][eE][sS])
TOOLS_DEPENDS.ls?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= ls
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.ls=coreutils
TOOLS_REAL_CMD.ls= ${TOOLS_PREFIX.ls}/bin/${GNU_PROGRAM_PREFIX}ls
TOOLS_${_TOOLS_VARNAME.ls}= ${TOOLS_REAL_CMD.ls}
. endif
.endif
.if !defined(TOOLS_IGNORE.m4) && !empty(_USE_TOOLS:Mm4)
. if !empty(PKGPATH:Mdevel/m4)
MAKEFLAGS+= TOOLS_IGNORE.m4=
. elif !empty(_TOOLS_USE_PKGSRC.m4:M[yY][eE][sS])
TOOLS_DEPENDS.m4?= m4>=1.4:../../devel/m4
TOOLS_CREATE+= m4
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.m4=m4
TOOLS_REAL_CMD.m4= ${TOOLS_PREFIX.m4}/bin/gm4
TOOLS_${_TOOLS_VARNAME.m4}= ${TOOLS_REAL_CMD.m4}
. endif
.endif
.if !defined(TOOLS_IGNORE.mail) && !empty(_USE_TOOLS:Mmail)
. if !empty(PKGPATH:Mmail/nail)
MAKEFLAGS+= TOOLS_IGNORE.mail=
. elif !empty(_TOOLS_USE_PKGSRC.mail:M[yY][eE][sS])
TOOLS_DEPENDS.mail?= nail>=11.22:../../mail/nail
TOOLS_CREATE+= mail
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mail=nail
TOOLS_REAL_CMD.mail= ${TOOLS_PREFIX.mail}/bin/nail
TOOLS_${_TOOLS_VARNAME.mail}= ${TOOLS_REAL_CMD.mail}
. endif
.endif
.if !defined(TOOLS_IGNORE.mkdir) && !empty(_USE_TOOLS:Mmkdir)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.mkdir=
. elif !empty(_TOOLS_USE_PKGSRC.mkdir:M[yY][eE][sS])
TOOLS_DEPENDS.mkdir?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= mkdir
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mkdir=coreutils
TOOLS_REAL_CMD.mkdir= ${TOOLS_PREFIX.mkdir}/bin/${GNU_PROGRAM_PREFIX}mkdir
TOOLS_REAL_ARGS.mkdir= -p
TOOLS_${_TOOLS_VARNAME.mkdir}= ${TOOLS_REAL_CMD.mkdir} ${TOOLS_REAL_ARGS.mkdir}
. endif
.endif
.if !defined(TOOLS_IGNORE.mktemp) && !empty(_USE_TOOLS:Mmktemp)
. if !empty(PKGPATH:Msysutils/mktemp)
MAKEFLAGS+= TOOLS_IGNORE.mktemp=
. elif !empty(_TOOLS_USE_PKGSRC.mktemp:M[yY][eE][sS])
TOOLS_DEPENDS.mktemp?= mktemp>=1.5:../../sysutils/mktemp
TOOLS_CREATE+= mktemp
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mktemp=mktemp
TOOLS_REAL_CMD.mktemp= ${TOOLS_PREFIX.mktemp}/bin/mktemp
TOOLS_${_TOOLS_VARNAME.mktemp}= ${TOOLS_REAL_CMD.mktemp}
. endif
.endif
.if !defined(TOOLS_IGNORE.mtree) && !empty(_USE_TOOLS:Mmtree)
2005-04-27 08:15:53 +02:00
. if !empty(PKGPATH:Mpkgtools/mtree)
MAKEFLAGS+= TOOLS_IGNORE.mtree=
. elif !empty(_TOOLS_USE_PKGSRC.mtree:M[yY][eE][sS])
#
# This is installed by pkgsrc bootstrap, and is never registered, so
# comment out the dependency on it.
#
#TOOLS_DEPENDS.mtree?= mtree>=20040722:../../pkgtools/mtree
TOOLS_CREATE+= mtree
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mtree=mtree
TOOLS_REAL_CMD.mtree= ${TOOLS_PREFIX.mtree}/bin/mtree
TOOLS_${_TOOLS_VARNAME.mtree}= ${TOOLS_REAL_CMD.mtree}
2005-04-27 08:15:53 +02:00
. endif
.endif
.if !defined(TOOLS_IGNORE.mv) && !empty(_USE_TOOLS:Mmv)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.mv=
. elif !empty(_TOOLS_USE_PKGSRC.mv:M[yY][eE][sS])
TOOLS_DEPENDS.mv?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= mv
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.mv=coreutils
TOOLS_REAL_CMD.mv= ${TOOLS_PREFIX.mv}/bin/${GNU_PROGRAM_PREFIX}mv
TOOLS_${_TOOLS_VARNAME.mv}= ${TOOLS_REAL_CMD.mv}
. endif
.endif
.if !defined(TOOLS_IGNORE.nice) && !empty(_USE_TOOLS:Mnice)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.nice=
. elif !empty(_TOOLS_USE_PKGSRC.nice:M[yY][eE][sS])
TOOLS_DEPENDS.nice?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= nice
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.nice=coreutils
TOOLS_REAL_CMD.nice= ${TOOLS_PREFIX.nice}/bin/${GNU_PROGRAM_PREFIX}nice
TOOLS_${_TOOLS_VARNAME.nice}= ${TOOLS_REAL_CMD.nice}
. endif
.endif
2005-05-26 23:46:13 +02:00
.if !defined(TOOLS_IGNORE.nroff) && !empty(_USE_TOOLS:Mnroff)
. if !empty(PKGPATH:Mtextproc/groff)
MAKEFLAGS+= TOOLS_IGNORE.nroff=
. elif !empty(_TOOLS_USE_PKGSRC.nroff:M[yY][eE][sS])
TOOLS_DEPENDS.nroff?= groff>=1.19nb4:../../textproc/groff
TOOLS_CREATE+= nroff
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.nroff=groff
TOOLS_REAL_CMD.nroff= ${TOOLS_PREFIX.nroff}/bin/nroff
TOOLS_${_TOOLS_VARNAME.nroff}= ${TOOLS_REAL_CMD.nroff}
. endif
.endif
.if !defined(TOOLS_IGNORE.patch) && !empty(_USE_TOOLS:Mpatch)
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. if !empty(PKGPATH:Mdevel/patch)
MAKEFLAGS+= TOOLS_IGNORE.patch=
. elif !empty(_TOOLS_USE_PKGSRC.patch:M[yY][eE][sS])
TOOLS_DEPENDS.patch?= patch>=2.2:../../devel/patch
TOOLS_CREATE+= patch
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.patch=patch
TOOLS_REAL_CMD.patch= ${TOOLS_PREFIX.patch}/bin/gpatch
TOOLS_${_TOOLS_VARNAME.patch}= ${TOOLS_REAL_CMD.patch}
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. endif
.endif
.if !defined(TOOLS_IGNORE.pax) && !empty(_USE_TOOLS:Mpax)
. if !empty(PKGPATH:Marchivers/pax)
MAKEFLAGS+= TOOLS_IGNORE.pax=
. elif !empty(_TOOLS_USE_PKGSRC.pax:M[yY][eE][sS])
#
# This is installed by pkgsrc bootstrap, and is never registered, so
# comment out the dependency on it.
#
#TOOLS_DEPENDS.pax?= pax>=20040802:../../archivers/pax
TOOLS_CREATE+= pax
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pax=pax
TOOLS_REAL_CMD.pax= ${TOOLS_PREFIX.pax}/bin/pax
TOOLS_${_TOOLS_VARNAME.pax}= ${TOOLS_REAL_CMD.pax}
. endif
.endif
.if !defined(TOOLS_IGNORE.perl) && !empty(_USE_TOOLS:Mperl)
. if !empty(PKGPATH:Mlang/perl5)
MAKEFLAGS+= TOOLS_IGNORE.perl=
. elif !empty(_TOOLS_USE_PKGSRC.perl:M[yY][eE][sS])
. include "../../lang/perl5/version.mk"
TOOLS_DEPENDS.perl?= {perl>=${PERL5_REQD},perl-thread>=${PERL5_REQD}}:../../lang/perl5
TOOLS_CREATE+= perl
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.perl=perl
TOOLS_REAL_CMD.perl= ${TOOLS_PREFIX.perl}/bin/perl
TOOLS_${_TOOLS_VARNAME.perl}= ${TOOLS_REAL_CMD.perl}
. endif
.endif
.if !defined(TOOLS_IGNORE.pwd) && !empty(_USE_TOOLS:Mpwd)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.pwd=
. elif !empty(_TOOLS_USE_PKGSRC.pwd:M[yY][eE][sS])
TOOLS_DEPENDS.pwd?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= pwd
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.pwd=coreutils
TOOLS_REAL_CMD.pwd= ${TOOLS_PREFIX.pwd}/bin/${GNU_PROGRAM_PREFIX}pwd
TOOLS_${_TOOLS_VARNAME.pwd}= ${TOOLS_REAL_CMD.pwd}
. endif
.endif
.if !defined(TOOLS_IGNORE.rm) && !empty(_USE_TOOLS:Mrm)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.rm=
. elif !empty(_TOOLS_USE_PKGSRC.rm:M[yY][eE][sS])
TOOLS_DEPENDS.rm?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= rm
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.rm=coreutils
TOOLS_REAL_CMD.rm= ${TOOLS_PREFIX.rm}/bin/${GNU_PROGRAM_PREFIX}rm
TOOLS_${_TOOLS_VARNAME.rm}= ${TOOLS_REAL_CMD.rm}
. endif
.endif
.if !defined(TOOLS_IGNORE.rmdir) && !empty(_USE_TOOLS:Mrmdir)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.rmdir=
. elif !empty(_TOOLS_USE_PKGSRC.rmdir:M[yY][eE][sS])
TOOLS_DEPENDS.rmdir?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= rmdir
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.rmdir=coreutils
TOOLS_REAL_CMD.rmdir= ${TOOLS_PREFIX.rmdir}/bin/${GNU_PROGRAM_PREFIX}rmdir
TOOLS_${_TOOLS_VARNAME.rmdir}= ${TOOLS_REAL_CMD.rmdir}
. endif
.endif
.if !defined(TOOLS_IGNORE.sed) && !empty(_USE_TOOLS:Msed)
. if !empty(PKGPATH:Mtextproc/nbsed)
MAKEFLAGS+= TOOLS_IGNORE.sed=
. elif !empty(_TOOLS_USE_PKGSRC.sed:M[yY][eE][sS])
TOOLS_DEPENDS.sed?= nbsed>=20040821:../../textproc/nbsed
TOOLS_CREATE+= sed
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sed=nbsed
TOOLS_REAL_CMD.sed= ${TOOLS_PREFIX.nbsed}/bin/nbsed
TOOLS_${_TOOLS_VARNAME.sed}= ${TOOLS_REAL_CMD.sed}
. endif
.endif
.if !defined(TOOLS_IGNORE.sh) && !empty(_USE_TOOLS:Msh)
. if !empty(PKGPATH:Mshells/pdksh)
MAKEFLAGS+= TOOLS_IGNORE.sh=
. elif !empty(_TOOLS_USE_PKGSRC.sh:M[yY][eE][sS])
TOOLS_DEPENDS.sh?= pdksh>=5.2.14:../../shells/pdksh
TOOLS_CREATE+= sh
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sh=pdksh
TOOLS_REAL_CMD.sh= ${TOOLS_PREFIX.sh}/bin/pdksh
TOOLS_${_TOOLS_VARNAME.sh}= ${TOOLS_REAL_CMD.sh}
. endif
TOOLS_CMD.sh= ${TOOLS_DIR}/bin/sh
.endif
.if !defined(TOOLS_IGNORE.shlock) && !empty(_USE_TOOLS:Mshlock)
. if !empty(PKGPATH:Mpkgtools/shlock)
MAKEFLAGS+= TOOLS_IGNORE.shlock=
. elif !empty(_TOOLS_USE_PKGSRC.shlock:M[yY][eE][sS])
TOOLS_DEPENDS.shlock?= shlock>=20020114:../../pkgtools/shlock
TOOLS_CREATE+= shlock
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.shlock=shlock
TOOLS_REAL_CMD.shlock= ${TOOLS_PREFIX.shlock}/bin/shlock
TOOLS_${_TOOLS_VARNAME.shlock}= ${TOOLS_REAL_CMD.shlock}
. endif
.endif
.if !defined(TOOLS_IGNORE.sort) && !empty(_USE_TOOLS:Msort)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.sort=
. elif !empty(_TOOLS_USE_PKGSRC.sort:M[yY][eE][sS])
TOOLS_DEPENDS.sort?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= sort
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.sort=coreutils
TOOLS_REAL_CMD.sort= ${TOOLS_PREFIX.sort}/bin/${GNU_PROGRAM_PREFIX}sort
TOOLS_${_TOOLS_VARNAME.sort}= ${TOOLS_REAL_CMD.sort}
. endif
.endif
.if !defined(TOOLS_IGNORE.tail) && !empty(_USE_TOOLS:Mtail)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.tail=
. elif !empty(_TOOLS_USE_PKGSRC.tail:M[yY][eE][sS])
TOOLS_DEPENDS.tail?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= tail
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tail=coreutils
TOOLS_REAL_CMD.tail= ${TOOLS_PREFIX.tail}/bin/${GNU_PROGRAM_PREFIX}tail
TOOLS_${_TOOLS_VARNAME.tail}= ${TOOLS_REAL_CMD.tail}
. endif
.endif
.if !defined(TOOLS_IGNORE.tar) && !empty(_USE_TOOLS:Mtar)
. if !empty(PKGPATH:Marchivers/pax)
MAKEFLAGS+= TOOLS_IGNORE.tar=
. elif !empty(_TOOLS_USE_PKGSRC.tar:M[yY][eE][sS])
#
# This is installed by pkgsrc bootstrap, and is never registered, so
# comment out the dependency on it.
#
#TOOLS_DEPENDS.tar?= pax>=20040802:../../archivers/pax
TOOLS_CREATE+= tar
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tar=pax
TOOLS_REAL_CMD.tar= ${TOOLS_PREFIX.tar}/bin/tar
TOOLS_${_TOOLS_VARNAME.tar}= ${TOOLS_REAL_CMD.tar}
. endif
.endif
.if !defined(TOOLS_IGNORE.tbl) && !empty(_USE_TOOLS:Mtbl)
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. if !empty(PKGPATH:Mtextproc/groff)
MAKEFLAGS+= TOOLS_IGNORE.tbl=
. elif !empty(_TOOLS_USE_PKGSRC.tbl:M[yY][eE][sS])
TOOLS_DEPENDS.tbl?= groff>=1.19nb4:../../textproc/groff
TOOLS_CREATE+= tbl
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tbl=groff
TOOLS_REAL_CMD.tbl= ${TOOLS_PREFIX.tbl}/bin/tbl
TOOLS_${_TOOLS_VARNAME.tbl}= ${TOOLS_REAL_CMD.tbl}
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. endif
.endif
.if !defined(TOOLS_IGNORE.tee) && !empty(_USE_TOOLS:Mtee)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.tee=
. elif !empty(_TOOLS_USE_PKGSRC.tee:M[yY][eE][sS])
TOOLS_DEPENDS.tee?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= tee
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tee=coreutils
TOOLS_REAL_CMD.tee= ${TOOLS_PREFIX.tee}/bin/${GNU_PROGRAM_PREFIX}tee
TOOLS_${_TOOLS_VARNAME.tee}= ${TOOLS_REAL_CMD.tee}
. endif
.endif
.if !defined(TOOLS_IGNORE.test) && !empty(_USE_TOOLS:Mtest)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.test=
. elif !empty(_TOOLS_USE_PKGSRC.test:M[yY][eE][sS])
TOOLS_DEPENDS.test?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= test
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.test=coreutils
TOOLS_REAL_CMD.test= ${TOOLS_PREFIX.test}/bin/${GNU_PROGRAM_PREFIX}test
TOOLS_${_TOOLS_VARNAME.test}= ${TOOLS_REAL_CMD.test}
. endif
.endif
.if !defined(TOOLS_IGNORE.touch) && !empty(_USE_TOOLS:Mtouch)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.touch=
. elif !empty(_TOOLS_USE_PKGSRC.touch:M[yY][eE][sS])
TOOLS_DEPENDS.touch?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= touch
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.touch=coreutils
TOOLS_REAL_CMD.touch= ${TOOLS_PREFIX.touch}/bin/${GNU_PROGRAM_PREFIX}touch
TOOLS_${_TOOLS_VARNAME.touch}= ${TOOLS_REAL_CMD.touch}
. endif
.endif
.if !defined(TOOLS_IGNORE.tr) && !empty(_USE_TOOLS:Mtr)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.tr=
. elif !empty(_TOOLS_USE_PKGSRC.tr:M[yY][eE][sS])
TOOLS_DEPENDS.tr?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= tr
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tr=coreutils
TOOLS_REAL_CMD.tr= ${TOOLS_PREFIX.tr}/bin/${GNU_PROGRAM_PREFIX}tr
TOOLS_${_TOOLS_VARNAME.tr}= ${TOOLS_REAL_CMD.tr}
. endif
.endif
.if !defined(TOOLS_IGNORE.true) && !empty(_USE_TOOLS:Mtrue)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.true=
. elif !empty(_TOOLS_USE_PKGSRC.true:M[yY][eE][sS])
TOOLS_DEPENDS.true?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= true
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.true=coreutils
TOOLS_REAL_CMD.true= ${TOOLS_PREFIX.true}/bin/${GNU_PROGRAM_PREFIX}true
TOOLS_${_TOOLS_VARNAME.true}= ${TOOLS_REAL_CMD.true}
. endif
.endif
.if !defined(TOOLS_IGNORE.tsort) && !empty(_USE_TOOLS:Mtsort)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.tsort=
. elif !empty(_TOOLS_USE_PKGSRC.tsort:M[yY][eE][sS])
TOOLS_DEPENDS.tsort?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= tsort
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.tsort=coreutils
TOOLS_REAL_CMD.tsort= ${TOOLS_PREFIX.tsort}/bin/${GNU_PROGRAM_PREFIX}tsort
TOOLS_${_TOOLS_VARNAME.tsort}= ${TOOLS_REAL_CMD.tsort}
. endif
.endif
.if !defined(TOOLS_IGNORE.unrar) && !empty(_USE_TOOLS:Munrar)
. if !empty(PKGPATH:Marchivers/unrar)
MAKEFLAGS+= TOOLS_IGNORE.unrar=
. elif !empty(_TOOLS_USE_PKGSRC.unrar:M[yY][eE][sS])
TOOLS_DEPENDS.unrar?= unrar>=3.3.4:../../archivers/unrar
TOOLS_CREATE+= unrar
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unrar=unrar
TOOLS_REAL_CMD.unrar= ${TOOLS_PREFIX.unrar}/bin/unrar
TOOLS_${_TOOLS_VARNAME.unrar}= ${TOOLS_REAL_CMD.unrar}
. endif
.endif
.if !defined(TOOLS_IGNORE.unzip) && !empty(_USE_TOOLS:Munzip)
. if !empty(PKGPATH:Marchivers/unzip)
MAKEFLAGS+= TOOLS_IGNORE.unzip=
. elif !empty(_TOOLS_USE_PKGSRC.unzip:M[yY][eE][sS])
TOOLS_DEPENDS.unzip?= unzip-[0-9]*:../../archivers/unzip
TOOLS_CREATE+= unzip
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unzip=unzip
TOOLS_REAL_CMD.unzip= ${TOOLS_PREFIX.unzip}/bin/unzip
TOOLS_${_TOOLS_VARNAME.unzip}= ${TOOLS_REAL_CMD.unzip}
. endif
.endif
.if !defined(TOOLS_IGNORE.unzoo) && !empty(_USE_TOOLS:Munzoo)
. if !empty(PKGPATH:Marchivers/unzoo)
MAKEFLAGS+= TOOLS_IGNORE.unzoo=
. elif !empty(_TOOLS_USE_PKGSRC.unzoo:M[yY][eE][sS])
TOOLS_DEPENDS.unzoo?= unzoo-[0-9]*:../../archivers/unzoo
TOOLS_CREATE+= unzoo
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.unzoo=unzoo
TOOLS_REAL_CMD.unzoo= ${TOOLS_PREFIX.unzoo}/bin/unzoo
TOOLS_${_TOOLS_VARNAME.unzoo}= ${TOOLS_REAL_CMD.unzoo}
. endif
.endif
.if !defined(TOOLS_IGNORE.wc) && !empty(_USE_TOOLS:Mwc)
. if !empty(PKGPATH:Msysutils/coreutils)
MAKEFLAGS+= TOOLS_IGNORE.wc=
. elif !empty(_TOOLS_USE_PKGSRC.wc:M[yY][eE][sS])
TOOLS_DEPENDS.wc?= coreutils>=5.2.1:../../sysutils/coreutils
TOOLS_CREATE+= wc
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.wc=coreutils
TOOLS_REAL_CMD.wc= ${TOOLS_PREFIX.wc}/bin/${GNU_PROGRAM_PREFIX}wc
TOOLS_${_TOOLS_VARNAME.wc}= ${TOOLS_REAL_CMD.wc}
. endif
.endif
.if !defined(TOOLS_IGNORE.xargs) && !empty(_USE_TOOLS:Mxargs)
. if !empty(PKGPATH:Msysutils/findutils)
MAKEFLAGS+= TOOLS_IGNORE.xargs=
. elif !empty(_TOOLS_USE_PKGSRC.xargs:M[yY][eE][sS])
TOOLS_DEPENDS.xargs?= findutils>=4.1:../../sysutils/findutils
TOOLS_CREATE+= xargs
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.xargs=findutils
TOOLS_REAL_CMD.xargs= ${TOOLS_PREFIX.xargs}/bin/${GNU_PROGRAM_PREFIX}xargs
TOOLS_REAL_ARGS.xargs= -r # don't run command if stdin is empty
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)
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. if !empty(PKGPATH:Mdevel/bison)
MAKEFLAGS+= TOOLS_IGNORE.yacc=
. elif !empty(_TOOLS_USE_PKGSRC.yacc:M[yY][eE][sS])
TOOLS_DEPENDS.yacc?= bison>=1.0:../../devel/bison
TOOLS_CREATE+= yacc
TOOLS_FIND_PREFIX+= TOOLS_PREFIX.yacc=bison
TOOLS_REAL_CMD.yacc= ${TOOLS_PREFIX.yacc}/bin/bison
TOOLS_REAL_ARGS.yacc= -y
TOOLS_${_TOOLS_VARNAME.yacc}= ${TOOLS_REAL_CMD.yacc} ${TOOLS_REAL_ARGS.yacc}
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. endif
.endif
# Compute the locations of the pkgsrc-supplied tools.
FIND_PREFIX:= ${TOOLS_FIND_PREFIX}
.include "../../mk/find-prefix.mk"
######################################################################
# Add the dependencies for each pkgsrc-supplied tool.
#
.for _t_ in ${_USE_TOOLS}
. if defined(TOOLS_DEPMETHOD.${_t_}) && defined(TOOLS_DEPENDS.${_t_})
. for _dep_ in ${TOOLS_DEPENDS.${_t_}}
. if empty(${TOOLS_DEPMETHOD.${_t_}}:C/\:.*$//:M${_dep_:C/\:.*$//})
${TOOLS_DEPMETHOD.${_t_}}+= ${_dep_}
. endif
. endfor
. endif
.endfor
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
######################################################################
# For each tool, make sure that the "TOOL" name points to the real
# command, e.g., AWK, SED, etc., provided that "TOOL" has been
# associated with <tool>.
#
.for _t_ in ${_USE_TOOLS}
_TOOLS_USE_PKGSRC.${_t_}?= no
. if defined(_TOOLS_VARNAME.${_t_})
. if !empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])
. if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
${_TOOLS_VARNAME.${_t_}}= ${TOOLS_PLATFORM.${_t_}}
. endif
. else
${_TOOLS_VARNAME.${_t_}}= ${TOOLS_${_TOOLS_VARNAME.${_t_}}}
. endif
. endif
.endfor
######################################################################
# If we are using the system-supplied tool, create symlinks or wrappers
# for each of the tools requested.
#
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
# Set TOOLS_REAL_CMD.<tool> appropriately in the case where we are
# using the system-supplied tool. Here, we first check to see if
# TOOLS_PLATFORM.<tool> is defined. If it is, then use that as the
# path to the real command and extract any arguments into
# TOOLS_REAL_ARGS.<tool>.
#
# Always set the "TOOLS_TOOL" name for each tool to point to the real
# command, e.g., TOOLS_TBL, TOOLS_YACC, etc., provided that "TOOL" has
# been associated with <tool>. If the "TOOL" name is undefined, then
# set it to the same value to provide a simple name for use by package
# Makefiles.
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
#
.for _t_ in ${_USE_TOOLS}
. if !defined(TOOLS_IGNORE.${_t_}) && \
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
!empty(_TOOLS_USE_PKGSRC.${_t_}:M[nN][oO])
. if defined(TOOLS_PLATFORM.${_t_}) && !empty(TOOLS_PLATFORM.${_t_})
TOOLS_REAL_CMD.${_t_}?= \
${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
TOOLS_REAL_ARGS.${_t_}?= \
${TOOLS_PLATFORM.${_t_}:C/^/_asdf_/1:N_asdf_*}
. if defined(_TOOLS_VARNAME.${_t_})
TOOLS_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_PLATFORM.${_t_}}
. endif
TOOLS_CREATE+= ${_t_}
. elif defined(_TOOLS_VARNAME.${_t_})
. if defined(TOOLS_REAL_CMD.${_t_})
TOOLS_${_TOOLS_VARNAME.${_t_}}= ${TOOLS_REAL_CMD.${_t_}} ${TOOLS_REAL_ARGS.${_t_}}
. else
TOOLS_${_TOOLS_VARNAME.${_t_}}= ${_TOOLS_VARNAME.${_t_}}_not_defined_
. endif
. endif
. endif
. if defined(_TOOLS_VARNAME.${_t_})
. if defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
. for _v_ in ${_TOOLS_VARNAME.${_t_}}
${_v_}?= ${TOOLS_${_TOOLS_VARNAME.${_t_}}}
. endfor
Initial commit of the new tools framework. This is currently designed to be a drop-in replacement for mk/tools.mk, but isn't yet enabled pending further testing. To use, edit bsd.pkg.mk to include bsd.tools.mk instead of tools.mk. The major changes from the old tools framework are: (1) The new interface to using the tools framework is through setting USE_TOOLS in the package Makefile, e.g., USE_TOOLS+= autoconf gmake yacc (2) Bison/yacc handling is improved. Instead of adding checks for /usr/bin/yacc to the package Makefile and explicitly setting YACC, e.g., security/mit-krb5/Makefile, simply add "yacc" to USE_TOOLS. If bison is explicitly required, then add "bison" to USE_TOOLS instead. (3) GNU auto* tools are handled differently. "autoconf", "aclocal", "automake", etc. will be tools in ${TOOLS_DIR} that point to the correct versions of the auto* tools. Instead of patching Makefiles or scripts to use ${AUTOCONF}, ${ACLOCAL}, etc., the correct versions of the tools will be called if they are invoked simply by their bare names. This is selected by adding either "autoconf" or "autoconf213", or "automake" or "automake14" to USE_TOOLS. The new tools framework will deprecate the following variables: ACLOCAL AUTORECONF AUTOCONF BUILD_USES_GETTEXT_M4 AUTOHEADER USE_GNU_TOOLS AUTOMAKE USE_TBL The new tools framework will deprecate the following *.mk files: mk/autoconf.mk mk/automake.mk mk/tools.mk Additional documentation on how to use bsd.tools.mk to create new tools under ${TOOLS_DIR} may be found in the header comments in bsd.tools.mk.
2005-04-15 02:00:21 +02:00
. endif
. endif
.endfor
######################################################################
# For packages that use GNU configure scripts, pass the real command
# paths for the tools that the package uses through the shell environment.
# We do this since these paths may be hardcoded into package scripts,
# and if they're not pre-specified, then they'll be searched for in the
# PATH, which would find the ones in ${TOOLS_DIR}.
#
.if defined(GNU_CONFIGURE)
. for _t_ in ${_USE_TOOLS}
. if defined(TOOLS_${_TOOLS_VARNAME.${_t_}})
. for _v_ in ${_TOOLS_VARNAME_GNU.${_t_}}
CONFIGURE_ENV+= ${_v_}=${TOOLS_${_TOOLS_VARNAME.${_t_}}:Q}
. endfor
. endif
. endfor
.endif