pkgsrc/mk/buildlink2
seb 16437cbe4c Make it possible to have a package requiring makeinfo but not install-info.
INFO_FILES is now defined by default to the empty value.
If it is not empty it means that install-info -or a suitable
replacement like pkg_install-info- is required.

USE_MAKEINFO is now defined by default to the 'no' value.
If it has any other value it means that makeinfo is required.
Note that as before simply defining USE_MAKEINFO in a package
Makefile is enough to trigger the use of makeinfo. I.e. it is not
required to be '[yY][eE][sS]'.

As a side effect when using buildlink2 always create install-info and
makeinfo wrappers in ${BUILDLINK_DIR}/bin. This could help
package maintainer to catch spurious/hidden install-info and makeinfo
usage.

Note that for now this nice feature is not really enabled as the relevant
part of bsd.buildlink2.mk is still conditional upon USE_NEW_TEXINFO.
It will really be when USE_NEW_TEXINFO will be removed from pkgsrc.
2003-07-31 13:50:11 +00:00
..
bsd.buildlink2.mk Make it possible to have a package requiring makeinfo but not install-info. 2003-07-31 13:50:11 +00:00
buildlink2.txt More ideas: _STRIPFLAG_CC, _STRIPFLAG_INSTALL, compiler optimization flags. 2002-12-27 20:34:53 +00:00
fake-la Apply patch by Joachim Koenig-Baltes (joachim at handshake dot de) in 2003-06-19 17:20:41 +00:00
gen-transform.sh More support bits for native Sun compilers (on Solaris). 2003-07-09 16:07:21 +00:00
ld-logic Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
ld-post-cache Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
libtool-do-install Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
libtool-fix-la Strip bare "-L${BUILDLINK_DIR}" (note there is no trailing "/lib") from 2003-01-24 12:09:16 +00:00
libtool-logic Output warnings to stderr, not to stdout (duh!) 2003-01-07 07:34:39 +00:00
libtool-post-cache Add some libtool workarounds for software authors that don't follow the 2002-12-26 17:17:32 +00:00
libtool.sh Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
logic Fix indentation for case statement. 2003-01-10 09:41:53 +00:00
NOTES Darwin 5.5 has finished the grueling recertification process: still 2002-12-28 23:01:25 +00:00
post-cache Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
pre-cache Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
private-pre-cache Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
README Rewrite wrapper scripts so that it is possible to add wrapper-specific 2002-12-26 17:08:55 +00:00
wrapper.sh Use a while loop instead of a for loop to iterate over the arguments. This 2003-01-01 07:16:57 +00:00

$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.