This webpage hosts a package holding a book titled “Autoconf, Automake and Libtool” aka The Autobook: a tutorial for the GNU Autotools by Gary V. Vaughan, . Classic noarch. , The Autoconf, Automake, and Libtool book. FreeBSD FreeBSD Ports Latest amd autobooktxz, GNU . The Goat Book or Autobook, officially titled “GNU Autoconf, Automake, and Libtool”, is a printed and online introduction into all three tools, from , written by.
|Published (Last):||18 December 2010|
|PDF File Size:||16.33 Mb|
|ePub File Size:||10.35 Mb|
|Price:||Free* [*Free Regsitration Required]|
Archived copy as title link.
The GNU Project Build Tools
General questionsUp: It is conceivable that you might wish to use these M4 constructs when writing macros to generate large amounts of in-line shell code or arbitrarily nested aitobook then; fi statements. Arguments in M4 are simply text, so they have no type. A macro invoked with an empty argument list is not empty at all, but rather is considered to be a single empty string:.
Given the following input, m4 would produce the corresponding output:. The dnl macro takes no arguments and expands to the empty string, but it has the side effect of discarding all input up to and including the next newline character.
GNU Autoconf, Automake and Libtool
Although the comment delimiting characters can be reassigned by the user, this is highly discouraged, as it may break GNU Autotools macros which rely on this fact to pass Bourne shell comment lines — which share the same comment delimiters — through to the output unaffected.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. When m4 encounters a quoted string — as a type of token Section It is quoted, so that it can be used as the body of a new, renamed macro: And there were no widely used approaches to portability problems.
In particular, often cited weak points of Autoconf are:.
It expands to the empty string:. There are times, however, when you wish to defer expansion. Inthanks to Gary V.
The unofficial Autobook webpage
Principally, there are three situations when this is so: There are three kinds of tokens: Therefore, regard the texinfo documentation shipped with these tools as the authoritive source of information. Autobook talks likely about autoconf version 2. How can I speed up make? This is how Autoconf makes the distinction clear. The recursive definition can use conditionals Section Something as simple as inverted logic may lead to a nonsense test result:.
Suffice to say, M4 will remove the quote characters and pass the inner string to the output Section Never use the argument macros e. This is the unofficial Autobook page, remember.
Thus, m4 will appear to consume macro invocations like these from the input. If they autovook not equal, m4 will shift the argument list three positions to the left and try again: The gnu M4 manual provides a thorough tutorial on M4.
Here is an example of dnl from the Autoconf source code:. As ever, the full texinfo source for the book is available via anonymous cvs: Comments in M4 differ from most languages, though, aitobook that the text within the comment, including delimiters, is passed through to the output unaltered.
Perhaps its spirit will inspire you to make your own contributions. As it evolved in the s it demonstrated the power of some good ideas: Veteran users of free software on Unix could testify that though there were a lot of programs distributed as source code back then over USENETthere was not a lot of consistency in auhobook to compile and install it.
The developer specifies the desired behaviour of the configure script by writing a list of instructions in the GNU m4 language in a file called “configure. The Autobook is getting somewhat obsolete, I’m afraid: This is useful because m4 will expand the macro and give the macro the opportunity to test autobool argument for the empty string. As of januaryreleased are autoconf 2. Frequently this is due to a problem in quoting see Section The dnl text has a special purpose, too, which will be covered in Section This is one big empty foo.
Libtool-related questions autobokk, Previous: The Autoconf approach to portability is to test for featuresnot for versions. Symbolic macros may be defined which have replacement text.
The most obvious one is definewhich defines a macro. Magic happens under the hood, where experts have tinkered until the GNU Autotools engine can run on everything from jet fuel to whale oil. Finally, a word about built-in macros: Free and open-source software portal.
Tue Feb 8 Always consider this a real possibility! After running a series of tests on the target system, the configure script generates header files and a makefile from templates, thus customizing the software package for the target system.
How do I add a question to this FAQ? Something as simple as inverted logic may lead to a nonsense test result: Vaughan A slew of updates: