2006-06-16 21:15:19 +02:00
|
|
|
# $NetBSD: bsd.tools.mk,v 1.37 2006/06/16 19:15:19 jlam Exp $
|
2005-05-21 06:46:52 +02:00
|
|
|
#
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
# Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
|
2005-05-21 06:46:52 +02:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# This code is derived from software contributed to The NetBSD Foundation
|
2005-05-21 06:53:17 +02:00
|
|
|
# by Johnny C. Lam.
|
2005-05-21 06:46:52 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
# This Makefile fragment is included to bsd.pkg.mk and defines the
|
|
|
|
# relevant variables and targets for the "tools" phase.
|
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
|
|
|
#
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
# The following are the "public" targets provided by this module:
|
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
|
|
|
#
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
# tools
|
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
|
|
|
#
|
|
|
|
|
|
|
|
# Prepend ${TOOLS_DIR}/bin to the PATH so that our scripts are found
|
|
|
|
# first when searching for executables.
|
|
|
|
#
|
|
|
|
TOOLS_DIR= ${WRKDIR}/.tools
|
|
|
|
PREPEND_PATH+= ${TOOLS_DIR}/bin
|
|
|
|
|
|
|
|
TOOLS_SHELL?= ${SH}
|
|
|
|
_TOOLS_WRAP_LOG= ${WRKLOG}
|
|
|
|
|
|
|
|
USE_TOOLS?= # empty
|
|
|
|
|
2006-06-16 21:15:19 +02:00
|
|
|
_TOOLS_COOKIE= ${WRKDIR}/.tools_done
|
|
|
|
|
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
|
|
|
######################################################################
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
### tools (PUBLIC)
|
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
|
|
|
######################################################################
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
### tools is a public target to create a private directory of tools
|
|
|
|
### specified by USE_TOOLS.
|
|
|
|
###
|
|
|
|
_TOOLS_TARGETS+= acquire-tools-lock
|
2006-06-16 21:15:19 +02:00
|
|
|
_TOOLS_TARGETS+= ${_TOOLS_COOKIE}
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
_TOOLS_TARGETS+= release-tools-lock
|
|
|
|
|
|
|
|
.PHONY: tools
|
|
|
|
.if !target(tools)
|
|
|
|
tools: ${_TOOLS_TARGETS}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.PHONY: acquire-tools-lock release-tools-lock
|
|
|
|
acquire-tools-lock: acquire-lock
|
|
|
|
release-tools-lock: release-lock
|
2005-04-27 22:35:01 +02:00
|
|
|
|
2006-06-16 21:15:19 +02:00
|
|
|
.if !exists(${_TOOLS_COOKIE})
|
|
|
|
${_TOOLS_COOKIE}: real-tools
|
|
|
|
.else
|
|
|
|
${_TOOLS_COOKIE}:
|
|
|
|
@${DO_NADA}
|
|
|
|
.endif
|
|
|
|
|
2005-04-27 22:35:01 +02:00
|
|
|
######################################################################
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
### real-tools (PRIVATE)
|
|
|
|
######################################################################
|
|
|
|
### real-tools is a helper target onto which one can hook all of the
|
|
|
|
### targets that do the actual tool creation.
|
|
|
|
###
|
|
|
|
_REAL_TOOLS_TARGETS+= tools-message
|
|
|
|
_REAL_TOOLS_TARGETS+= tools-vars
|
|
|
|
_REAL_TOOLS_TARGETS+= override-tools
|
2006-06-16 21:15:19 +02:00
|
|
|
_REAL_TOOLS_TARGETS+= post-tools
|
|
|
|
_REAL_TOOLS_TARGETS+= tools-cookie
|
2006-06-09 15:59:06 +02:00
|
|
|
_REAL_TOOLS_TARGETS+= error-check
|
2005-04-27 22:35:01 +02:00
|
|
|
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
.PHONY: real-tools
|
|
|
|
real-tools: ${_REAL_TOOLS_TARGETS}
|
2005-05-11 10:41:50 +02:00
|
|
|
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
.PHONY: tools-message
|
|
|
|
tools-message:
|
|
|
|
@${PHASE_MSG} "Overriding tools for ${PKGNAME}"
|
2005-05-09 03:11:58 +02:00
|
|
|
|
2006-06-16 21:15:19 +02:00
|
|
|
######################################################################
|
|
|
|
### tools-cookie (PRIVATE)
|
|
|
|
######################################################################
|
|
|
|
### tools-cookie creates the "tools" cookie file. The contents
|
|
|
|
### are the names of the tools in USE_TOOLS.
|
|
|
|
###
|
|
|
|
.PHONY: tools-cookie
|
|
|
|
tools-cookie:
|
|
|
|
${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_TOOLS_COOKIE:H}
|
|
|
|
${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${USE_TOOLS:Q} >> ${_TOOLS_COOKIE}
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
### override-tools (PRIVATE)
|
|
|
|
######################################################################
|
|
|
|
### override-tools is a helper target onto which one can hook all of
|
|
|
|
### the targets that create tools so they are generated at the proper
|
|
|
|
### time.
|
|
|
|
###
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
.PHONY: override-tools
|
2006-06-16 21:15:19 +02:00
|
|
|
override-tools:
|
|
|
|
@${DO_NADA}
|
|
|
|
|
|
|
|
######################################################################
|
|
|
|
### post-tools (PUBLIC, override)
|
|
|
|
######################################################################
|
|
|
|
### post-tools may be overridden within a package Makefile and can be
|
|
|
|
### used to directly modify the contents of the tools directory after
|
|
|
|
### the tools are generated.
|
|
|
|
###
|
|
|
|
.PHONY: post-tools
|
|
|
|
.if !target(post-tools)
|
|
|
|
post-tools:
|
|
|
|
@${DO_NADA}
|
|
|
|
.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
|
|
|
|
Separate out the part of bsd.tools.mk that actually created the tools
into a new file pkgsrc/mk/tools/create.mk. This leaves bsd.tools.mk
as a file that pulls in all of the other ones. Also move the
tools-related targets from bsd.pkg.mk into bsd.tools.mk.
The tools cookie file has been removed, as well as hooks for
{pre,do,post}-tools. Instead, there is now only a single public target
"tools" which may be invoked. Invoking "tools" will always cause all
of the tools in ${TOOLS_DIR} to be created.
The "tools" step has been moved and is now just after the "depends"
step and before sources are extracted. This is the earliest place
where the "tools" step can be taken, and it allows the created tools
to be used in all steps/phases after it, starting with "extract". As
a consequence, we should just invoke tools by their bare names in
targets, e.g. awk, sed, patch, etc., instead of with the ${VARIABLE}
names, e.g. ${AWK}, ${SED}, ${PATCH}, etc.
2006-06-06 08:30:29 +02:00
|
|
|
.include "${PKGSRCDIR}/mk/tools/automake.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/autoconf.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/texinfo.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/gettext.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/ldconfig.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/rpcgen.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/strip.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/imake.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/replace.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/perl.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/pkg-config.mk"
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/make.mk"
|
|
|
|
|
|
|
|
.include "${PKGSRCDIR}/mk/tools/create.mk"
|