629 |
|
|
630 |
The benefits of Automake increase for larger packages (especially ones |
The benefits of Automake increase for larger packages (especially ones |
631 |
with subdirectories), but even for small programs the added convenience |
with subdirectories), but even for small programs the added convenience |
632 |
and portability can be substantial. And that's not all@dots{} |
and portability can be substantial. And that's not all@enddots{} |
633 |
|
|
634 |
@node Libtool |
@node Libtool |
635 |
@section Libtool |
@section Libtool |
1850 |
|
|
1851 |
You should be extremely cautious in your variable names: all the |
You should be extremely cautious in your variable names: all the |
1852 |
@var{init-cmds} share the same name space and may overwrite each other |
@var{init-cmds} share the same name space and may overwrite each other |
1853 |
in unpredictable ways. Sorry@dots{} |
in unpredictable ways. Sorry@enddots{} |
1854 |
@end table |
@end table |
1855 |
|
|
1856 |
All these macros can be called multiple times, with different |
All these macros can be called multiple times, with different |
5918 |
@example |
@example |
5919 |
AC_LANG_PUSH(Fortran 77) |
AC_LANG_PUSH(Fortran 77) |
5920 |
# Perform some tests on Fortran 77. |
# Perform some tests on Fortran 77. |
5921 |
# ... |
# @dots{} |
5922 |
AC_LANG_POP(Fortran 77) |
AC_LANG_POP(Fortran 77) |
5923 |
@end example |
@end example |
5924 |
@end defmac |
@end defmac |
6378 |
@end group |
@end group |
6379 |
|
|
6380 |
@group |
@group |
6381 |
# Might abort... |
# Might abort@dots{} |
6382 |
AM_PATH_GTK(1.0.2,, [AC_MSG_ERROR([GTK not in path])]) |
AM_PATH_GTK(1.0.2,, [AC_MSG_ERROR([GTK not in path])]) |
6383 |
AM_PATH_GTKMM(0.9.5,, [AC_MSG_ERROR([GTK not in path])]) |
AM_PATH_GTKMM(0.9.5,, [AC_MSG_ERROR([GTK not in path])]) |
6384 |
@end group |
@end group |
6496 |
|
|
6497 |
@c FIXME: Grmph, yet another quoting myth: quotation has *never* |
@c FIXME: Grmph, yet another quoting myth: quotation has *never* |
6498 |
@c prevented `expansion' of $1. Unless it refers to the expansion |
@c prevented `expansion' of $1. Unless it refers to the expansion |
6499 |
@c of the value of $1? Anyway, we need a rewrite here@dots{} |
@c of the value of $1? Anyway, we need a rewrite here@enddots{} |
6500 |
|
|
6501 |
The most common problem with existing macros is an improper quotation. |
The most common problem with existing macros is an improper quotation. |
6502 |
This section, which users of Autoconf can skip, but which macro writers |
This section, which users of Autoconf can skip, but which macro writers |
6637 |
@end example |
@end example |
6638 |
|
|
6639 |
With this in mind, we can explore the cases where macros invoke |
With this in mind, we can explore the cases where macros invoke |
6640 |
macros@dots{} |
macros@enddots{} |
6641 |
|
|
6642 |
|
|
6643 |
@node Quotation and Nested Macros |
@node Quotation and Nested Macros |
6806 |
@code{--syntax}. Nevertheless, they are implemented as M4 builtins, as |
@code{--syntax}. Nevertheless, they are implemented as M4 builtins, as |
6807 |
it makes M4 libraries self contained (no need for additional options). |
it makes M4 libraries self contained (no need for additional options). |
6808 |
|
|
6809 |
There lies the problem... |
There lies the problem@enddots{} |
6810 |
|
|
6811 |
@sp 1 |
@sp 1 |
6812 |
|
|
7366 |
|
|
7367 |
@defmac m4_if (@var{comment}) |
@defmac m4_if (@var{comment}) |
7368 |
@defmacx m4_if (@var{string-1}, @var{string-2}, @var{equal}, @ovar{not-equal}) |
@defmacx m4_if (@var{string-1}, @var{string-2}, @var{equal}, @ovar{not-equal}) |
7369 |
@defmacx m4_if (@var{string-1}, @var{string-2}, @var{equal}, ...) |
@defmacx m4_if (@var{string-1}, @var{string-2}, @var{equal}, @dots{}) |
7370 |
@msindex m4_if |
@msindex m4_if |
7371 |
This macro corresponds to @code{ifelse}. |
This macro corresponds to @code{ifelse}. |
7372 |
@end defmac |
@end defmac |
7429 |
by adding or removing levels of quotes. They are meant for hard core M4 |
by adding or removing levels of quotes. They are meant for hard core M4 |
7430 |
programmers. |
programmers. |
7431 |
|
|
7432 |
@defmac m4_dquote (@var{arg1}, ...) |
@defmac m4_dquote (@var{arg1}, @dots{}) |
7433 |
@msindex dquote |
@msindex dquote |
7434 |
Return the arguments as a quoted list of quoted arguments. |
Return the arguments as a quoted list of quoted arguments. |
7435 |
@end defmac |
@end defmac |
7436 |
|
|
7437 |
@defmac m4_quote (@var{arg1}, ...) |
@defmac m4_quote (@var{arg1}, @dots{}) |
7438 |
@msindex quote |
@msindex quote |
7439 |
Return the arguments as a single entity, i.e., wrap them into a pair of |
Return the arguments as a single entity, i.e., wrap them into a pair of |
7440 |
quotes. |
quotes. |
8383 |
@end example |
@end example |
8384 |
|
|
8385 |
@noindent |
@noindent |
8386 |
You'll appreciate the various levels of detail@dots{} |
You'll appreciate the various levels of detail@enddots{} |
8387 |
|
|
8388 |
One workaround is to grep out uninteresting lines, hoping not to remove |
One workaround is to grep out uninteresting lines, hoping not to remove |
8389 |
good ones@dots{} |
good ones@enddots{} |
8390 |
|
|
8391 |
Don't try to move/delete open files, such as in @samp{exec >foo; mv foo |
Don't try to move/delete open files, such as in @samp{exec >foo; mv foo |
8392 |
bar}, see @ref{Limitations of Builtins}, @command{mv} for more details. |
bar}, see @ref{Limitations of Builtins}, @command{mv} for more details. |
10106 |
|
|
10107 |
Make itself suffers a great number of limitations, only a few of which |
Make itself suffers a great number of limitations, only a few of which |
10108 |
being listed here. First of all, remember that since commands are |
being listed here. First of all, remember that since commands are |
10109 |
executed by the shell, all its weaknesses are inherited@dots{} |
executed by the shell, all its weaknesses are inherited@enddots{} |
10110 |
|
|
10111 |
@table @asis |
@table @asis |
10112 |
@item @code{$<} |
@item @code{$<} |
12444 |
@section Upgrading From Version 2.13 |
@section Upgrading From Version 2.13 |
12445 |
|
|
12446 |
The introduction of the previous section (@pxref{Autoconf 1}) perfectly |
The introduction of the previous section (@pxref{Autoconf 1}) perfectly |
12447 |
suits this section... |
suits this section@enddots{} |
12448 |
|
|
12449 |
@quotation |
@quotation |
12450 |
Autoconf version 2.50 is mostly backward compatible with version 2.13. |
Autoconf version 2.50 is mostly backward compatible with version 2.13. |
12517 |
@end example |
@end example |
12518 |
|
|
12519 |
Many many (and many more) Autoconf macros were lacking proper quotation, |
Many many (and many more) Autoconf macros were lacking proper quotation, |
12520 |
including no less than... @code{AC_DEFUN} itself! |
including no less than@dots{} @code{AC_DEFUN} itself! |
12521 |
|
|
12522 |
@example |
@example |
12523 |
$ @kbd{cat configure.in} |
$ @kbd{cat configure.in} |
12552 |
|
|
12553 |
Unfortunately Automake did not quote the name of these macros! |
Unfortunately Automake did not quote the name of these macros! |
12554 |
Therefore, when @command{m4} finds something like |
Therefore, when @command{m4} finds something like |
12555 |
@samp{AC_DEFUN(AM_TYPE_PTRDIFF_T, ...)} in @file{aclocal.m4}, |
@samp{AC_DEFUN(AM_TYPE_PTRDIFF_T, @dots{})} in @file{aclocal.m4}, |
12556 |
@code{AM_TYPE_PTRDIFF_T} is |
@code{AM_TYPE_PTRDIFF_T} is |
12557 |
expanded, replaced with its Autoconf definition. |
expanded, replaced with its Autoconf definition. |
12558 |
|
|
12787 |
@end example |
@end example |
12788 |
|
|
12789 |
@noindent |
@noindent |
12790 |
Unfortunately, @command{autoupdate} cannot help here, since... this is |
Unfortunately, @command{autoupdate} cannot help here, since@dots{} this is |
12791 |
not a macro! Of course, first make sure your release of Automake and/or |
not a macro! Of course, first make sure your release of Automake and/or |
12792 |
Libtool still requires these. |
Libtool still requires these. |
12793 |
|
|
12990 |
state of the build machine, including some important environment |
state of the build machine, including some important environment |
12991 |
variables. |
variables. |
12992 |
@c FIXME: How about having an M4sh macro to say `hey, log the value |
@c FIXME: How about having an M4sh macro to say `hey, log the value |
12993 |
@c of `...'? This would help both Autoconf and Autotest. |
@c of `@dots{}'? This would help both Autoconf and Autotest. |
12994 |
|
|
12995 |
@item tested programs |
@item tested programs |
12996 |
The absolute path and answers to @option{--version} of the tested |
The absolute path and answers to @option{--version} of the tested |
13491 |
get into its present form? (Why does it look like gorilla spit?) If |
get into its present form? (Why does it look like gorilla spit?) If |
13492 |
you're not wondering, then this chapter contains no information useful |
you're not wondering, then this chapter contains no information useful |
13493 |
to you, and you might as well skip it. If you @emph{are} wondering, |
to you, and you might as well skip it. If you @emph{are} wondering, |
13494 |
then let there be light@dots{} |
then let there be light@enddots{} |
13495 |
|
|
13496 |
@menu |
@menu |
13497 |
* Genesis:: Prehistory and naming of @command{configure} |
* Genesis:: Prehistory and naming of @command{configure} |