diff options
author | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2011-01-16 12:15:19 +0100 |
---|---|---|
committer | Ralf Wildenhues <Ralf.Wildenhues@gmx.de> | 2011-01-16 12:15:19 +0100 |
commit | 1456186dab6c7e9384aa54d113b2e1ad0aadc2dd (patch) | |
tree | ae79b61cb04c75d621e25502a9ad4b8ae60e698d /doc/automake.texi | |
parent | f4f5bbe6f3094c3817efa63695844a5b1dca2ceb (diff) | |
parent | e5fb6dce45aae3a3bc403cd3f3e0d4e3babf2f75 (diff) | |
download | automake-1456186dab6c7e9384aa54d113b2e1ad0aadc2dd.tar.gz |
Merge branch 'maint'
Diffstat (limited to 'doc/automake.texi')
-rw-r--r-- | doc/automake.texi | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/automake.texi b/doc/automake.texi index 51d73046d..9f66a9d79 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -3471,6 +3471,7 @@ not actually needed. Doing so should alleviate many problems of the current implementation, however it requires a stricter style from the macro authors. Hopefully it is easy to revise the existing macros. For instance, + @example # bad style AC_PREREQ(2.57) @@ -3480,8 +3481,10 @@ AX_FOO AX_BAR ]) @end example + @noindent should be rewritten as + @example AC_DEFUN([AX_FOOBAR], [AC_PREREQ([2.57])dnl @@ -7483,18 +7486,20 @@ installation less nice for everybody else. There are two ways to avoid byte-compiling. Historically, we have recommended the following construct. + @example lisp_LISP = file1.el file2.el ELCFILES = @end example + @noindent @code{ELCFILES} is an internal Automake variable that normally lists all @file{.elc} files that must be byte-compiled. Automake defines @code{ELCFILES} automatically from @code{lisp_LISP}. Emptying this variable explicitly prevents byte-compilation. -Since Automake 1.8, we now recommend using @code{lisp_DATA} instead. As -in +Since Automake 1.8, we now recommend using @code{lisp_DATA} instead: + @example lisp_DATA = file1.el file2.el @end example @@ -8967,9 +8972,11 @@ output in all them), so it is safer and easier to @code{AC_SUBST} them from @file{configure.ac}. For instance, the following statement will cause @file{configure} to be rerun each time @file{version.sh} is changed. + @example AC_SUBST([CONFIG_STATUS_DEPENDENCIES], ['$(top_srcdir)/version.sh']) @end example + @noindent Note the @samp{$(top_srcdir)/} in the file name. Since this variable is to be used in all @file{Makefile}s, its value must be sensible at @@ -8995,12 +9002,14 @@ Speaking of @file{version.sh} scripts, we recommend against them today. They are mainly used when the version of a package is updated automatically by a script (e.g., in daily builds). Here is what some old-style @file{configure.ac}s may look like: + @example AC_INIT . $srcdir/version.sh AM_INIT_AUTOMAKE([name], $VERSION_NUMBER) @dots{} @end example + @noindent Here, @file{version.sh} is a shell fragment that sets @code{VERSION_NUMBER}. The problem with this example is that @@ -9011,12 +9020,14 @@ to the user), and that it uses the obsolete form of @code{AC_INIT} and straightforward, because shell variables are not allowed in @code{AC_INIT}'s arguments. We recommend that @file{version.sh} be replaced by an M4 file that is included by @file{configure.ac}: + @example m4_include([version.m4]) AC_INIT([name], VERSION_NUMBER) AM_INIT_AUTOMAKE @dots{} @end example + @noindent Here @file{version.m4} could contain something like @samp{m4_define([VERSION_NUMBER], [1.2])}. The advantage of this @@ -10401,12 +10412,14 @@ older releases will not be used. For instance, use this in your @example AM_INIT_AUTOMAKE([1.6.1]) dnl Require Automake 1.6.1 or better. @end example + @noindent or, in a particular @file{Makefile.am}: @example AUTOMAKE_OPTIONS = 1.6.1 # Require Automake 1.6.1 or better. @end example + @noindent Automake will print an error message if its version is older than the requested version. @@ -11293,6 +11306,7 @@ true_CPPFLAGS = -DEXIT_CODE=0 false_SOURCES = generic.c false_CPPFLAGS = -DEXIT_CODE=1 @end example + @noindent Obviously the two programs are built from the same source, but it would be bad if they shared the same object, because @file{generic.o} @@ -11462,6 +11476,7 @@ data.c: data.foo data.h: data.foo data.c foo data.foo @end example + @noindent therefore a parallel @command{make} will have to serialize the builds of @file{data.c} and @file{data.h}, and will detect that the second is |