ac0258dd3c
put the tools in ${WRKDIR}/.tools/bin instead of in ${BUILDLINK_DIR}, and remove the need for buildlink2 to use USE_GNU_TOOLS. In the modified USE_GNU_TOOLS implementation, the following implementation- specific variables have the following meanings: _TOOLS_REPLACE.<tool> means that we want ${AWK}, ${SED}, etc. symlinked into ${TOOLS_DIR} as awk, sed, etc. _TOOLS_NEED_GNU.<tool> means that we want to use the pkgsrc version of <tool> symlinked info ${TOOLS_DIR} as awk, sed, etc. If this is "YES", then it always trumps _TOOLS_REPLACE.<tool>. And we want nothing to happen if we're building the pkgsrc GNU tool itself. The modified USE_GNU_TOOLS implementation should also hopefully fix the circular dependency problem. Create a new target "tools" that is run after "patch" and before "buildlink" that populates the ${TOOLS_DIR} directory. This ensures that it's always run at the right time, instead of relying on pre-buildlink or pre-configure, which may be cancelled by NO_BUILDLINK or NO_CONFIGURE. XXX There is some possible fallout in texinfo.mk with the MAKE_ENV and XXX CONFIGURE_ENV settings for INSTALL_INFO and MAKEINFO. It looks XXX like the MAKE_ENV and CONFIGURE_ENV settings should move from XXX tools.mk into texinfo.mk, and they no longer need to be XXX conditional on USE_BUILDLINK2. I'll leave it to the texinfo.mk XXX dude (Hi, Stoned!). |
||
---|---|---|
.. | ||
bsd.buildlink2.mk | ||
buildlink2.txt | ||
fake-la | ||
gen-transform.sh | ||
ld-logic | ||
ld-post-cache | ||
libtool-do-install | ||
libtool-fix-la | ||
libtool-logic | ||
libtool-post-cache | ||
libtool.sh | ||
logic | ||
NOTES | ||
post-cache | ||
pre-cache | ||
private-pre-cache | ||
README | ||
wrapper.sh |
$NetBSD: README,v 1.5 2002/12/26 17:08:56 jlam Exp $ For more general information about the use of buildlink2, see the file buildlink2.txt in this directory. 0 buildlink2 Wrapper Script System ================================== The purpose of the buildlink2 wrapper script system is to replace calls to compiler tool with scripts that tranlate any arguments into their buildlink equivalents, then invoke the actual compiler tools with the translated arguments. The pkgsrc/mk/buildlink2 directory contains bits of the wrapper script system for the buildlink2 framework. The wrapper script system is composed of three parts: the main wrapper script, the "cache", and the "logic" script. 0.1 Main wrapper script ======================= The main wrapper script for a compiler tool (cc, ld, as, etc.) is generated from wrapper.sh, except for the libtool wrapper script which is generated from libtool.sh. The wrapper scripts share a common set of logic files that translate arguments into their buildlink equivalents. 0.2 Cache ========= The cache is a giant Bourne shell "case" statement that stores pre-translated arguments from previous wrapper invocations. This allows speedy translation of already-seen arguments without having to run the utilities needed to perform a translation from scratch. There are two caches: the common cache and a wrapper-specific cache. The common cache is used by all wrapper scripts. The wrapper-specific cache is read before the common cache and contains wrapper-specific argument translation that shouldn't be used by other wrapper scripts. 0.3 Logic script ================ The logic script contains a large "case" statement that handles the actual translation of an argument into its buildlink equivalent. The logic script also invokes a wrapper-specific logic script which may contain extra commands that perform further translation of an argument after the main translation has been performed by the logic script. Finally, the logic script may save the translations results into a cache file if requested by the wrapper script.