- New in 1.12.4:
+New in 1.13:
+
+* Version requirements:
+
+ - Autoconf 2.65 or greater is required.
+
+ - The rules to build PDF and DVI output from Texinfo input now
+ requires Texinfo 4.9 or later.
+
+ - Support for the "Cygnus-style" trees (once enabled by the 'cygnus'
+ option) has been removed. See discussion about automake bug#11034
+ for more background.
+
+ - The automake-provided '@mkdir_p@' configure substitution and
+ AM_PROG_MKDIR m4 macro have been removed. They had been obsolete
+ since automake 1.10, and actively deprecated since Automake 1.12.1.
+ However, to maintain a degree of backward-compatibility, the make
+ variable '$(mkdir_p)' is still defined (now simple as an alias to
+ '$(MKDIR_P)'). It will probably be removed in future major versions
+ of Automake (probably 1.14).
+
+ - The deprecated aclocal option '--acdir' has been removed. You
+ should use the options '--automake-acdir' and '--system-acdir'
+ instead (which have been introduced in Automake 1.11.2).
+
+ - The following long-obsolete m4 macros have been removed:
+
+ AM_PROG_CC_STDC: superseded by AC_PROG_CC since October 2002
+ fp_PROG_CC_STDC: broken alias for AM_PROG_CC_STDC
+ fp_WITH_DMALLOC: old alias for AM_WITH_DMALLOC
+ AM_CONFIG_HEADER: superseded by AC_CONFIG_HEADERS since July 2002
+ ud_PATH_LISPDIR: old alias for AM_PATH_LISPDIR
+ jm_MAINTAINER_MODE: old alias for AM_MAINTAINER_MODE
+ ud_GNU_GETTEXT: old alias for AM_GNU_GETTEXT
+ gm_PROG_LIBTOOL: old alias for AC_PROG_LIBTOOL
+ fp_C_PROTOTYPES: old alias for AM_C_PROTOTYPES (which was part
+ of the now-removed automatic de-ANSI-fication
+ support of Automake)
+
+ - All the "old alias" macros in 'm4/obsolete.m4' have been removed.
+
+* Obsolescent features:
+
+ - Use of the long-deprecated two- and three-arguments invocation forms
+ of the AM_INIT_AUTOMAKE is not documented anymore. It's still
+ supported though (albeit with a warning in the 'obsolete' category),
+ to cater for people who want to define the version number for their
+ package dynamically (e.g., from the current VCS revision). We'll
+ have to continue this support until Autoconf itself is fixed to allow
+ better support for such dynamic version numbers.
+
+* Elisp byte-compilation:
+
+ - The byte compilation of '.el' files into '.elc' files is now done
+ with a suffix rule. This has simplified the compilation process, and
+ more importantly made it less brittle. The downside is that emacs is
+ now invoked once for each '.el' files, which cause some noticeable
+ slowdowns. These should however be mitigated on multicore machines
+ (which are becoming the norm today) if concurrent make ("make -j")
+ is used.
+
+ - Elisp files placed in a subdirectory are now byte-compiled to '.elc'
+ files in the same subdirectory; for example, byte-compiling of file
+ 'sub/foo.el' file will result in 'sub/foo.elc' rather than in
+ 'foo.elc'. This behaviour is backward-incompatible with older
+ Automake versions, but it is more natural and more sane. See also
+ automake bug#7441.
+
+ - The Emacs invocation performing byte-compilation of '.el' files honors
+ the $(AM_ELCFLAGS) and $(ELCFLAGS) variables; as typical, the former
+ one is developer-reserved and the latter one user-reserved.
+
+ - The 'elisp-comp' script, once provided by Automake, has been rendered
+ obsoleted by the just-described changes, and thus removed.
+
+* Changes to Automake-generated testsuite harnesses:
+
+ - The parallel testsuite harness (previously only enabled by the
+ 'parallel-tests' option) is the default one; the older serial
+ testsuite harness will still be available through the use of the
+ 'serial-tests' option (introduced in Automake 1.12).
+
+ - The 'color-tests' option is now unconditionally activated by default.
+ In particular, this means that testsuite output is now colorized by
+ default if the attached terminal seems to support ANSI escapes, and
+ that the user can force output colorization by setting the variable
+ AM_COLOR_TESTS to "always". The 'color-tests' is still recognized
+ for backward-compatibility, although it's a handled as a no-op now.
+
+* Silent rules support:
+
+ - Support for silent rules is now always active in Automake-generated
+ Makefiles. So, although the verbose output is still the default,
+ the user can now always use "./configure --enable-silent-rules" or
+ "make V=0" to enable quieter output in the package he's building.
+
+ - The 'silent-rules' option has now become a no-op, preserved for
+ backward-compatibility only. In particular, its use does not disable
+ the warnings in the 'portability-recursive' category anymore.
+
+* Texinfo Support:
+
+ - The rules to build PDF and DVI files from Texinfo input now use the
+ '--build-dir' option, to keep the auxiliary files used by texi2dvi
+ and texi2pdf around without cluttering the build directory, and to
+ make it possible to run the "dvi" and "pdf" recipes in parallel.
+
+* Automatic remake rules and 'missing' script:
+
+ - The 'missing' script does not try anymore to update the timestamp
+ of out-of-date files that require a maintainer-specific tool to be
+ remade, in case the user lacks such a tool (or has a too-old version
+ of it). It just give a useful warning, and in some cases also a tip
+ about how to obtain such a tool.
+
+ - The missing script has thus become useless as a (poor) way to work
+ around the sketched-timestamps issues that can happen for projects
+ that keep generated files committed in their VCS repository. Such
+ projects are now encouraged to write a custom "fix-timestamps.sh"
+ script to avoid such issues; a simple example is provided in the
+ "CVS and generated files" chapter of the automake manual.
+
+* Recursive targets:
+
+ - The user can now define his own recursive targets that recurse
+ in the directories specified in $(SUBDIRS). This can be done by
+ specifying the name of such targets in invocations of the new
+ 'AM_EXTRA_RECURSIVE_TARGETS' m4 macro.
+
+* Tags:
+
+ - Any failure in the recipe of the "tags", "ctags", "cscope" or
+ "cscopelist" targets in a subdirectory is now propagated to the
+ top-level make invocation.
+
+ - Tags are correctly computed also for files in _SOURCES variables that
+ only list files with non-standard suffixes (see automake bug#12372).
+
+* Improvements to aclocal and related rebuilds rules:
+
+ - The Autoconf-provided macro AC_CONFIG_MACRO_DIR is now traced by
+ aclocal, and can be used to declare the local m4 include directory.
+ Formerly, one had to specify it with an explicit '-I' option to the
+ 'aclocal' invocation.
+
+ - The special make variable ACLOCAL_AMFLAGS is deprecated; future
+ Automake versions will warn about its use, and later version will
+ remove support for it altogether.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ New in 1.12.5:
* WARNING: Future backward-incompatibilities!
use the options '--automake-acdir' and '--system-acdir' instead
(which have been introduced in Automake 1.11.2).
- - The 'missing' script will not try anymore to update the timestamp
+ - The 'missing' script will no longer try to update the timestamp
of out-of-date files that require a maintainer-specific tool to be
remade, in case the user lacks such a tool (or has a too-old version
of it). In fact, starting from Automake 1.13, all it'll do will be
giving more useful warnings than a bare "command not found" from a
make recipe would.
+ Bugs fixed in 1.12.5:
+
+ * Long-standing bugs:
+
+ - Automake no longer generates spurious remake rules invoking autoheader
+ to regenerate the template corresponding to header files specified after
+ the first one in AC_CONFIG_HEADERS (automake bug#12495).
+
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ New in 1.12.4:
+
* Warnings and deprecations:
- Warnings in the 'obsolete' category are enabled by default both in
* Miscellaneous changes:
- - The '.m4' files provided by Automake does not define serial numbers
- anymore. This should cause no difference in the behaviour of aclocal
- though.
+ - The '.m4' files provided by Automake no longer define serial numbers.
+ This should cause no difference in the behaviour of aclocal though.
- Some testsuite weaknesses and spurious failures have been fixed.
- Use of the long-deprecated two- and three-arguments invocation forms
of the AM_INIT_AUTOMAKE macro now elicits a warning in the 'obsolete'
category. Starting from some future major Automake release (likely
- post-1.13), such usages won't be allowed anymore.
+ post-1.13), such usages will be no longer allowed.
- Support for the "Cygnus-style" trees (enabled by the 'cygnus' option) is
now deprecated (its use triggers a warning in the 'obsolete' category).
* Miscellaneous changes:
- The Automake test cases now require a proper POSIX-conforming shell.
- Older non-POSIX Bourne shells (like Solaris 10 /bin/sh) won't be
- accepted anymore. In most cases, the user shouldn't have to specify
+ Older non-POSIX Bourne shells (like Solaris 10 /bin/sh) will be no
+ longer accepted. In most cases, the user shouldn't have to specify
such POSIX shell explicitly, since it will be looked up at configure
time. Still, when this lookup fails, or when the user wants to
override its conclusion, the variable 'AM_TEST_RUNNER_SHELL' can be
the '--add-missing' option, or manually copy the 'test-driver' script
into their tree. The second, and more important, implication is that
now, when the 'parallel-tests' option is in use, TESTS_ENVIRONMENT can
- not be used anymore to define a test runner, and the command specified
+ no longer be used to define a test runner, and the command specified
in LOG_COMPILER (and <ext>_LOG_COMPILER) must be a *real* executable
program or script. For example, this is still a valid usage (albeit
a little contorted):
fi;
LOG_COMPILER = $(SHELL) $$maybe_errexit
- while this is not anymore:
+ OTOH, this is no longer a valid usage:
TESTS_ENVIRONMENT = \
$(SHELL) `test -n '$(STRICT_TESTS_CHECKING)' && echo ' -e'`
- The AM_COND_IF macro also works if the shell expression for the
conditional is no longer valid for the condition.
- - The automake-provided parallel testsuite harness does not fail anymore
- with BSD make used in parallel mode when there are test scripts in a
- subdirectory, like in:
+ - The automake-provided parallel testsuite harness no longer fails
+ with BSD make used in parallel mode when there are test scripts in
+ a subdirectory, like in:
TESTS = sub/foo.test sub/bar.test
* Bugs introduced by 1.11.2:
- A definition of 'noinst_PYTHON' before 'python_PYTHON' (or similar)
- don't cause spurious failures upon "make install" anymore.
+ no longer cause spurious failures upon "make install".
- The user can now instruct the 'uninstall-info' rule not to update
the '${infodir}/dir' file by exporting the environment variable
'-I' is non-existent, aclocal will now create it before trying to copy
files in it.
- - An empty declaration of a "foo_PRIMARY" don't cause anymore the
- generated install rules to create an empty $(foodir) directory;
- for example, if Makefile.am contains something like:
+ - An empty declaration of a "foo_PRIMARY" no longer cause the generated
+ install rules to create an empty $(foodir) directory; for example, if
+ Makefile.am contains something like:
pkglibexec_SCRIPTS =
if FALSE
- Automake's own build system is more silent by default, making use of
the 'silent-rules' option.
- - The master copy of the `gnupload' script is now maintained in gnulib,
+ - The master copy of the 'gnupload' script is now maintained in gnulib,
not in automake.
- - The `missing' script doesn't try to wrap calls to `tar' anymore.
+ - The 'missing' script no longer tries to wrap calls to 'tar'.
- - "make dist" doesn't wrap `tar' invocations with the `missing' script
- anymore. Similarly, the obsolescent variable `$(AMTAR)' (which you
- shouldn't be using BTW ;-) does not invoke the missing script anymore
- to wrap tar, but simply invokes the `tar' program itself.
+ - "make dist" no longer wraps 'tar' invocations with the 'missing'
+ script. Similarly, the obsolescent variable '$(AMTAR)' (which you
+ shouldn't be using BTW ;-) no longer invokes the 'missing' script
+ to wrap tar, but simply invokes the 'tar' program itself.
- "make dist" can now create lzip-compressed tarballs.
* Bugs introduced by 1.11.2:
- Automake now correctly recognizes the prefix/primary combination
- `pkglibexec_SCRIPTS' as valid.
+ 'pkglibexec_SCRIPTS' as valid.
- - The parallel-tests harness doesn't trip anymore on sed implementations
+ - The parallel-tests harness now doesn't trip on sed implementations
with stricter limits on the length of input lines (problem seen at
least on Solaris 8).
* Long-standing bugs:
- The "deleted header file problem" for *.am files is avoided by stub
- rules. This allows `make' to trigger a rerun of `automake' also if
- some previously needed `.am' file has been removed.
+ rules. This allows 'make' to trigger a rerun of 'automake' also if
+ some previously needed '.am' file has been removed.
- - The `silent-rules' option now generates working makefiles even
- for the uncommon `make' implementations that do not support the
- nested-variables extension to POSIX 2008. For such `make'
+ - The 'silent-rules' option now generates working makefiles even
+ for the uncommon 'make' implementations that do not support the
+ nested-variables extension to POSIX 2008. For such 'make'
implementations, whether a build is silent is determined at
configure time, and cannot be overridden at make time with
- `make V=0' or `make V=1'.
+ "make V=0" or "make V=1".
- Vala support now works better in VPATH setups.
(qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
ar-lib compile config.guess config.rpath
- config.sub depcomp elisp-comp install-sh libversion.in mdate-sh
+ config.sub depcomp install-sh libversion.in mdate-sh
missing mkinstalldirs py-compile texinfo.tex ylwrap),
@libtool_files, @libtool_sometimes);
# Whether AM_GNU_GETTEXT_INTL_SUBDIR has been seen.
my $seen_gettext_intl = 0;
+# The arguments of the AM_EXTRA_RECURSIVE_TARGETS call (if any).
+my @extra_recursive_targets = ();
+
# Lists of tags supported by Libtool.
my %libtool_tags = ();
# 1 if Libtool uses LT_SUPPORTED_TAG. If it does, then it also
'install-ps-am' => 1,
'install-info-am' => 1,
'installcheck-am' => 1,
- 'uninstall-am' => 1,
-
- 'install-man' => 1,
+ 'uninstall-am' => 1,
+ 'tags-am' => 1,
+ 'ctags-am' => 1,
+ 'cscopelist-am' => 1,
+ 'install-man' => 1,
);
# Queue to push require_conf_file requirements to.
################################################################
-# 'silent-rules' mode handling functions.
+# Silent rules handling functions.
# verbose_var (NAME)
# ------------------
-# The public variable stem used to implement 'silent-rules'.
+# The public variable stem used to implement silent rules.
sub verbose_var ($)
{
my ($name) = @_;
# verbose_private_var (NAME)
# --------------------------
-# The naming policy for the private variables for 'silent-rules'.
+# The naming policy for the private variables for silent rules.
sub verbose_private_var ($)
{
my ($name) = @_;
# define_verbose_var (NAME, VAL-IF-SILENT, [VAL-IF-VERBOSE])
# ----------------------------------------------------------
-# For 'silent-rules' mode, setup VAR and dispatcher, to expand to
-# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to empty)
-# if not.
+# For silent rules, setup VAR and dispatcher, to expand to
+# VAL-IF-SILENT if silent, to VAL-IF-VERBOSE (defaulting to
+# empty) if not.
sub define_verbose_var ($$;$)
{
my ($name, $silent_val, $verbose_val) = @_;
my $pvar = verbose_private_var ($name);
my $silent_var = $pvar . '_0';
my $verbose_var = $pvar . '_1';
- if (option 'silent-rules')
- {
- # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
- # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
- # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
- # See AM_SILENT_RULES in m4/silent.m4.
- define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
- define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)', INTERNAL);
- Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
- $silent_val, '', INTERNAL, VAR_ASIS)
- if (! vardef ($silent_var, TRUE));
- Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
- $verbose_val, '', INTERNAL, VAR_ASIS)
- if (! vardef ($verbose_var, TRUE));
-}
+ # For typical 'make's, 'configure' replaces AM_V (inside @@) with $(V)
+ # and AM_DEFAULT_V (inside @@) with $(AM_DEFAULT_VERBOSITY).
+ # For strict POSIX 2008 'make's, it replaces them with 0 or 1 instead.
+ # See AM_SILENT_RULES in m4/silent.m4.
+ define_variable ($var, '$(' . $pvar . '_@'.'AM_V'.'@)', INTERNAL);
+ define_variable ($pvar . '_', '$(' . $pvar . '_@'.'AM_DEFAULT_V'.'@)',
+ INTERNAL);
+ Automake::Variable::define ($silent_var, VAR_AUTOMAKE, '', TRUE,
+ $silent_val, '', INTERNAL, VAR_ASIS)
+ if (! vardef ($silent_var, TRUE));
+ Automake::Variable::define ($verbose_var, VAR_AUTOMAKE, '', TRUE,
+ $verbose_val, '', INTERNAL, VAR_ASIS)
+ if (! vardef ($verbose_var, TRUE));
}
# Above should not be needed in the general automake code.
sub verbose_flag ($)
{
my ($name) = @_;
- return '$(' . verbose_var ($name) . ')'
- if (option 'silent-rules');
- return '';
+ return '$(' . verbose_var ($name) . ')';
}
sub verbose_nodep_flag ($)
{
my ($name) = @_;
- return '$(' . verbose_var ($name) . subst ('am__nodep') . ')'
- if (option 'silent-rules');
- return '';
+ return '$(' . verbose_var ($name) . subst ('am__nodep') . ')';
}
# silent_flag
# define_verbose_tagvar (NAME)
# ----------------------------
-# Engage the needed 'silent-rules' machinery for tag NAME.
+# Engage the needed silent rules machinery for tag NAME.
sub define_verbose_tagvar ($)
{
my ($name) = @_;
- if (option 'silent-rules')
- {
- define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;');
- }
+ define_verbose_var ($name, '@echo " '. $name . ' ' x (8 - length ($name)) . '" $@;');
}
# define_verbose_texinfo
# ----------------------
-# Engage the needed 'silent-rules' machinery for assorted texinfo commands.
+# Engage the needed silent rules machinery for assorted texinfo commands.
sub define_verbose_texinfo ()
{
my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF');
# define_verbose_libtool
# ----------------------
-# Engage the needed 'silent-rules' machinery for 'libtool --silent'.
+# Engage the needed silent rules machinery for 'libtool --silent'.
sub define_verbose_libtool ()
{
define_verbose_var ('lt', '--silent');
sub handle_silent ()
{
- return unless option 'silent-rules';
# Define "$(AM_V_P)", expanding to a shell conditional that can be
# used in make recipes to determine whether we are being run in
# silent mode or not. The choice of the name derives from the LISP
# also "the '-P' convention" in the Jargon File); we do so for lack
# of a better convention.
define_verbose_var ('P', 'false', ':');
- # *Always* provide the user with 'AM_V_GEN' for 'silent-rules' mode.
+ # *Always* provide the user with '$(AM_V_GEN)', unconditionally.
define_verbose_tagvar ('GEN');
define_verbose_var ('at', '@');
}
return 1 if process_option_list (@options);
}
- # Override portability-recursive warning.
- switch_warning ('no-portability-recursive')
- if option 'silent-rules';
-
if ($strictness == GNITS)
{
set_option ('readme-alpha', INTERNAL);
{
# Include auto-dep code. Don't include it if DEP_FILES would
# be empty.
- if (&saw_sources_p (0) && keys %dep_files)
+ if (keys %extension_seen && keys %dep_files)
{
# Set location of depcomp.
&define_variable ('depcomp',
my($xlink, $vlink) = &define_per_target_linker_variable ($linker, $xname);
$vlink = verbose_flag ($vlink || 'GEN');
- # If the resulting program lies into a subdirectory,
- # make sure this directory will exist.
+ # If the resulting program lies in a subdirectory,
+ # ensure that the directory exists before we need it.
my $dirstamp = require_build_directory_maybe ($one_file);
$libtool_clean_directories{dirname ($one_file)} = 1;
&handle_source_transform ($xlib, $onelib, $obj, $where,
NONLIBTOOL => 1, LIBTOOL => 0);
- # If the resulting library lies into a subdirectory,
+ # If the resulting library lies in a subdirectory,
# make sure this directory will exist.
my $dirstamp = require_build_directory_maybe ($onelib);
my $verbose = verbose_flag ('AR');
}
}
- # If the resulting library lies into a subdirectory,
+ # If the resulting library lies in a subdirectory,
# make sure this directory will exist.
my $dirstamp = require_build_directory_maybe ($onelib);
## Handling Texinfo files. ##
## ------------------------ ##
-# ($OUTFILE, $VFILE, @CLEAN_FILES)
+# ($OUTFILE, $VFILE)
# &scan_texinfo_file ($FILENAME)
# ------------------------------
# $OUTFILE - name of the info file produced by $FILENAME.
# $VFILE - name of the version.texi file used (undef if none).
-# @CLEAN_FILES - list of byproducts (indexes etc.)
sub scan_texinfo_file ($)
{
my ($filename) = @_;
- # Some of the following extensions are always created, no matter
- # whether indexes are used or not. Other (like cps, fns, ... pgs)
- # are only created when they are used. We used to scan $FILENAME
- # for their use, but that is not enough: they could be used in
- # included files. We can't scan included files because we don't
- # know the include path. Therefore we always erase these files, no
- # matter whether they are used or not.
- #
- # (tmp is only created if an @macro is used and a certain e-TeX
- # feature is not available.)
- my %clean_suffixes =
- map { $_ => 1 } (qw(aux log toc tmp
- cp cps
- fn fns
- ky kys
- vr vrs
- tp tps
- pg pgs)); # grep 'new.*index' texinfo.tex
-
my $texi = new Automake::XFile "< $filename";
verb "reading $filename";
{
$vfile = $1;
}
-
- # Try to find new or unused indexes.
-
- # Creating a new category of index.
- elsif (/^\@def(code)?index (\w+)/)
- {
- $clean_suffixes{$2} = 1;
- $clean_suffixes{"$2s"} = 1;
- }
-
- # Merging an index into an another.
- elsif (/^\@syn(code)?index (\w+) (\w+)/)
- {
- delete $clean_suffixes{"$2s"};
- $clean_suffixes{"$3s"} = 1;
- }
-
}
if (! $outfile)
my $infobase = basename ($filename);
$infobase =~ s/\.te?xi(nfo)?$//;
- return ($outfile, $vfile,
- map { "$infobase.$_" } (sort keys %clean_suffixes));
+ return ($outfile, $vfile);
}
# extension).
my $generic_info = ($generic && $dsfx) ? 1 : 0;
- # If the resulting file lie into a subdirectory,
+ # If the resulting file lies in a subdirectory,
# make sure this directory will exist.
my $dirstamp = require_build_directory_maybe ($dest);
# If 'version.texi' is referenced by input file, then include
# automatic versioning capability.
- my ($out_file, $vtexi, @clean_files) =
+ my ($out_file, $vtexi) =
scan_texinfo_file ("$relative_dir/$texi")
or next;
- push (@mostly_cleans, @clean_files);
+ # Directory of auxiliary files and build by-products used by texi2dvi
+ # and texi2pdf.
+ push @mostly_cleans, "$infobase.t2d";
+ push @mostly_cleans, "$infobase.t2p";
# If the Texinfo source is in a subdirectory, create the
# resulting info in this subdirectory. If it is in the current
$texinfodir = ('$(srcdir)/'
. dirname (variable_value ('TEXINFO_TEX')));
}
- elsif (option 'cygnus')
- {
- $texinfodir = '$(top_srcdir)/../texinfo';
- define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex", INTERNAL);
- }
elsif ($config_aux_dir_set_in_configure_ac)
{
$texinfodir = $am_config_aux_dir;
# Handle TAGS.
sub handle_tags
{
- my @tag_deps = ();
- my @ctag_deps = ();
- my @cscope_deps = ();
- if (var ('SUBDIRS'))
- {
- $output_rules .= ("tags-recursive:\n"
- . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
- # Never fail here if a subdir fails; it
- # isn't important.
- . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
- . " && \$(MAKE) \$(AM_MAKEFLAGS) tags); \\\n"
- . "\tdone\n");
- push (@tag_deps, 'tags-recursive');
- &depend ('.PHONY', 'tags-recursive');
- &depend ('.MAKE', 'tags-recursive');
-
- $output_rules .= ("ctags-recursive:\n"
- . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
- # Never fail here if a subdir fails; it
- # isn't important.
- . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
- . " && \$(MAKE) \$(AM_MAKEFLAGS) ctags); \\\n"
- . "\tdone\n");
- push (@ctag_deps, 'ctags-recursive');
- &depend ('.PHONY', 'ctags-recursive');
- &depend ('.MAKE', 'ctags-recursive');
-
- $output_rules .= ("cscopelist-recursive:\n"
- . "\tlist='\$(SUBDIRS)'; for subdir in \$\$list; do \\\n"
- # Never fail here if a subdir fails; it
- # isn't important.
- . "\t test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
- . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
- . "\tdone\n");
- push (@cscope_deps, 'cscopelist-recursive');
- &depend ('.PHONY', 'cscopelist-recursive');
- &depend ('.MAKE', 'cscopelist-recursive');
- }
-
- if (&saw_sources_p (1)
- || var ('ETAGS_ARGS')
- || @tag_deps)
- {
- my @config;
- foreach my $spec (@config_headers)
- {
- my ($out, @ins) = split_config_file_spec ($spec);
- foreach my $in (@ins)
- {
- # If the config header source is in this directory,
- # require it.
- push @config, basename ($in)
- if $relative_dir eq dirname ($in);
- }
- }
- $output_rules .= &file_contents ('tags',
- new Automake::Location,
- CONFIG => "@config",
- TAGSDIRS => "@tag_deps",
- CTAGSDIRS => "@ctag_deps",
- CSCOPEDIRS => "@cscope_deps");
+ my @config;
+ foreach my $spec (@config_headers)
+ {
+ my ($out, @ins) = split_config_file_spec ($spec);
+ foreach my $in (@ins)
+ {
+ # If the config header source is in this directory,
+ # require it.
+ push @config, basename ($in)
+ if $relative_dir eq dirname ($in);
+ }
+ }
+
+ define_variable ('am__tagged_files',
+ '$(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)'
+ . "@config", INTERNAL);
+ if (rvar('am__tagged_files')->value_as_list_recursive
+ || var ('ETAGS_ARGS') || var ('SUBDIRS'))
+ {
+ $output_rules .= &file_contents ('tags', new Automake::Location);
set_seen 'TAGS_DEPENDENCIES';
- }
- elsif (reject_var ('TAGS_DEPENDENCIES',
- "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
- . " without\nsources or 'ETAGS_ARGS'"))
- {
- }
+ }
else
- {
+ {
+ reject_var ('TAGS_DEPENDENCIES',
+ "it doesn't make sense to define 'TAGS_DEPENDENCIES'"
+ . " without\nsources or 'ETAGS_ARGS'");
# Every Makefile must define some sort of TAGS rule.
# Otherwise, it would be possible for a top-level "make TAGS"
- # to fail because some subdirectory failed.
- $output_rules .= "tags: TAGS\nTAGS:\n\n";
- # Ditto ctags and cscope.
- $output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
- $output_rules .= "cscope cscopelist:\n\n";
- }
+ # to fail because some subdirectory failed. Ditto ctags and
+ # cscope.
+ $output_rules .=
+ "tags TAGS:\n\n" .
+ "ctags CTAGS:\n\n" .
+ "cscope cscopelist:\n\n";
+ }
}
}
-# $BOOLEAN
-# &for_dist_common ($A, $B)
-# -------------------------
-# Subroutine for &handle_dist: sort files to dist.
-#
-# We put README first because it then becomes easier to make a
-# Usenet-compliant shar file (in these, README must be first).
-#
-# FIXME: do more ordering of files here.
-sub for_dist_common
-{
- return 0
- if $a eq $b;
- return -1
- if $a eq 'README';
- return 1
- if $b eq 'README';
- return $a cmp $b;
-}
-
# handle_dist
# -----------
# Handle 'dist' target.
# Files to distributed. Don't use ->value_as_list_recursive
# as it recursively expands '$(dist_pkgdata_DATA)' etc.
my @dist_common = split (' ', rvar ('DIST_COMMON')->variable_value);
- @dist_common = uniq (sort for_dist_common (@dist_common));
+ @dist_common = uniq @dist_common;
variable_delete 'DIST_COMMON';
define_pretty_variable ('DIST_COMMON', TRUE, INTERNAL, @dist_common);
define_pretty_variable ('am__configure_deps', TRUE, INTERNAL,
@configuredeps);
- my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : $strictness_name)
- . (global_option 'no-dependencies' ? ' --ignore-deps' : '');
+ my $automake_options = '--' . $strictness_name .
+ (global_option 'no-dependencies' ? ' --ignore-deps' : '');
$output_rules .= file_contents
('configure',
file_contents ('remake-hdr',
new Automake::Location,
FILES => "@files",
+ 'FIRST-HDR' => ($hdr_index == 1),
CONFIG_H => $cn_sans_dir,
CONFIG_HIN => $ins[0],
CONFIG_H_DEPS => "@ins",
}
}
+# Generate helper targets for user recursion, where needed.
+sub handle_user_recursion ()
+{
+ return unless @extra_recursive_targets;
+
+ define_pretty_variable ('am__extra_recursive_targets', TRUE, INTERNAL,
+ map { "$_-recursive" } @extra_recursive_targets);
+ my $aux = var ('SUBDIRS') ? 'recursive' : 'am';
+ foreach my $target (@extra_recursive_targets)
+ {
+ # This allows the default target's rules to be overridden in
+ # Makefile.am.
+ user_phony_rule ($target);
+ depend ("$target", "$target-$aux");
+ depend ("$target-am", "$target-local");
+ # Every user-defined recursive target 'foo' *must* have a valid
+ # associated 'foo-local' rule; we define it as an empty rule by
+ # default, so that the user can transparently extend it in his
+ # own Makefile.am.
+ pretty_print_rule ("$target-local:");
+ # $target-recursive might as well be undefined, so do not add
+ # it here; it's taken care of in subdirs.am anyway.
+ depend (".PHONY", "$target-am", "$target-local");
+ }
+}
+
# &do_check_merge_target ()
# -------------------------
push @check_tests, 'check-local'
if user_phony_rule 'check-local';
- # In --cygnus mode, check doesn't depend on all.
- if (option 'cygnus')
- {
- # Just run the local check rules.
- pretty_print_rule ('check-am:', "\t\t", @check);
- }
- else
+ # The check target must depend on the local equivalent of
+ # 'all', to ensure all the primary targets are built. Then it
+ # must build the local check rules.
+ $output_rules .= "check-am: all-am\n";
+ if (@check)
{
- # The check target must depend on the local equivalent of
- # 'all', to ensure all the primary targets are built. Then it
- # must build the local check rules.
- $output_rules .= "check-am: all-am\n";
- if (@check)
- {
- pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ",
- @check);
- depend ('.MAKE', 'check-am');
- }
+ pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ", @check);
+ depend ('.MAKE', 'check-am');
}
+
if (@check_tests)
{
pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t ",
sub handle_per_suffix_test
{
my ($test_suffix, %transform) = @_;
- my ($pfx, $generic, $parallel_tests_option, $am_exeext);
- prog_error ("called with 'parallel-tests' option not set")
- unless $parallel_tests_option = option 'parallel-tests';
+ my ($pfx, $generic, $am_exeext);
if ($test_suffix eq '')
{
$pfx = '';
: 'FALSE';
}
# The "test driver" program, deputed to handle tests protocol used by
- # test scripts. By default, it's assumed that no protocol is used,
- # so we fall back to the old "parallel-tests" behaviour, implemented
- # by the 'test-driver' auxiliary script.
+ # test scripts. By default, it's assumed that no protocol is used, so
+ # we fall back to the old behaviour, implemented by the 'test-driver'
+ # auxiliary script.
if (! var "${pfx}LOG_DRIVER")
{
- require_conf_file ($parallel_tests_option->{position}, FOREIGN,
- 'test-driver');
+ require_conf_file ("parallel-tests", FOREIGN, 'test-driver');
define_variable ("${pfx}LOG_DRIVER",
"\$(SHELL) $am_config_aux_dir/test-driver",
INTERNAL);
push (@check_tests, 'check-TESTS');
my $check_deps = "@check";
$output_rules .= &file_contents ('check', new Automake::Location,
- COLOR => !! option 'color-tests',
- PARALLEL_TESTS => !! option 'parallel-tests',
+ SERIAL_TESTS => !! option 'serial-tests',
CHECK_DEPS => $check_deps);
# Tests that are known programs should have $(EXEEXT) appended.
append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
if (var ('XFAIL_TESTS'));
- if (my $parallel_tests = option 'parallel-tests')
+ if (! option 'serial-tests')
{
define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
my $suff = '.test';
if ($val =~ /(\$\((top_)?srcdir\))\//o)
{
msg ('error', $subvar->rdef ($cond)->location,
- "parallel-tests: using '$1' in TESTS is currently broken: '$val'");
+ "using '$1' in TESTS is currently broken: '$val'");
}
foreach my $test_suffix (@test_suffixes)
require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE,
'EMACS', 'lispdir');
- require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp');
- &define_variable ('elisp_comp', "$am_config_aux_dir/elisp-comp", INTERNAL);
}
# Handle Python
AC_REQUIRE_AUX_FILE => 1,
AC_SUBST_TRACE => 1,
AM_AUTOMAKE_VERSION => 1,
- AM_PROG_MKDIR_P => 0, # FIXME: to be removed in 1.13
AM_CONDITIONAL => 2,
+ _AM_EXTRA_RECURSIVE_TARGETS => 1,
AM_GNU_GETTEXT => 0,
AM_GNU_GETTEXT_INTL_SUBDIR => 0,
AM_INIT_AUTOMAKE => 0,
AM_MAINTAINER_MODE => 0,
AM_PROG_AR => 0,
AM_PROG_CC_C_O => 0,
- AM_SILENT_RULES => 0,
_AM_SUBST_NOTMAKE => 1,
_AM_COND_IF => 1,
_AM_COND_ELSE => 1,
$seen_automake_version = 1;
}
- elsif ($macro eq 'AM_PROG_MKDIR_P') # FIXME: to be removed in 1.13
- {
- msg 'obsolete', $where, <<'EOF';
-The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
-You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
-and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
-EOF
- }
elsif ($macro eq 'AM_CONDITIONAL')
{
$configure_cond{$args[1]} = $where;
}
+ elsif ($macro eq '_AM_EXTRA_RECURSIVE_TARGETS')
+ {
+ push @extra_recursive_targets, split (' ', $args[1]);
+ }
elsif ($macro eq 'AM_GNU_GETTEXT')
{
$seen_gettext = $where;
{
$seen_cc_c_o = $where;
}
- elsif ($macro eq 'AM_SILENT_RULES')
- {
- set_global_option ('silent-rules', $where);
- }
elsif ($macro eq '_AM_COND_IF')
{
cond_stack_if ('', $args[1], $where);
################################################################
-# Set up for Cygnus mode.
-sub check_cygnus
-{
- my $cygnus = option 'cygnus';
- return unless $cygnus;
-
- # This feature is deprecated, will be removed in the next
- # Automake major release.
- msg 'obsolete', $cygnus->get,
- "support for Cygnus-style trees is deprecated";
-
- set_strictness ('foreign');
- set_option ('no-installinfo', $cygnus);
- set_option ('no-dependencies', $cygnus);
- set_option ('no-dist', $cygnus);
-
- err_ac "'AM_MAINTAINER_MODE' required when --cygnus specified"
- if !$seen_maint_mode;
-}
-
# Do any extra checking for GNU standards.
sub check_gnu_standards
{
sub saw_extension
{
my ($ext) = @_;
- if (! defined $extension_seen{$ext})
- {
- $extension_seen{$ext} = 1;
- }
- else
- {
- ++$extension_seen{$ext};
- }
+ $extension_seen{$ext} = 1;
}
-# Return the number of files seen for a given language. Knows about
-# special cases we care about. FIXME: this is hideous. We need
-# something that involves real language objects. For instance yacc
-# and yaccxx could both derive from a common yacc class which would
-# know about the strange ylwrap requirement. (Or better yet we could
-# just not support legacy yacc!)
-sub count_files_for_language
-{
- my ($name) = @_;
-
- my @names;
- if ($name eq 'yacc' || $name eq 'yaccxx')
- {
- @names = ('yacc', 'yaccxx');
- }
- elsif ($name eq 'lex' || $name eq 'lexxx')
- {
- @names = ('lex', 'lexxx');
- }
- else
- {
- @names = ($name);
- }
-
- my $r = 0;
- foreach $name (@names)
- {
- my $lang = $languages{$name};
- foreach my $ext (@{$lang->extensions})
- {
- $r += $extension_seen{$ext}
- if defined $extension_seen{$ext};
- }
- }
-
- return $r
-}
-
-# Called to ask whether source files have been seen . If HEADERS is 1,
-# headers can be included.
-sub saw_sources_p
-{
- my ($headers) = @_;
-
- # count all the sources
- my $count = 0;
- foreach my $val (values %extension_seen)
- {
- $count += $val;
- }
-
- if (!$headers)
- {
- $count -= count_files_for_language ('header');
- }
-
- return $count > 0;
-}
-
-
# register_language (%ATTRIBUTE)
# ------------------------------
# Register a single language.
# - replaces %KEY% with $VAL,
# - enables/disables ?KEY? and ?!KEY?,
# - replaces %?KEY% with TRUE or FALSE.
-# - replaces %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE% with
-# IFTRUE / IFFALSE, as appropriate.
sub transform ($$)
{
my ($token, $transform) = @_;
{
return transform_token ($token, $transform, $1);
}
- # %KEY?IFTRUE%, %KEY:IFFALSE%, and %KEY?IFTRUE:IFFALSE%.
- elsif ($token =~ /^%([\w\-]+)(?:\?([^?:%]+))?(?::([^?:%]+))?%$/)
- {
- return transform_token ($token, $transform, $1) ? ($2 || '') : ($3 || '');
- }
# %?KEY%.
elsif ($token =~ /^%\?([\w\-]+)%$/)
{
# Complete %transform with global options.
# Note that %transform goes last, so it overrides global options.
- %transform = ('CYGNUS' => !! option 'cygnus',
- 'MAINTAINER-MODE'
+ %transform = ( 'MAINTAINER-MODE'
=> $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
'XZ' => !! option 'dist-xz',
'INSTALL-INFO' => ! option 'no-installinfo',
'INSTALL-MAN' => ! option 'no-installman',
- 'HAVE-MANS' => !! var ('MANS'),
'CK-NEWS' => !! option 'check-news',
'SUBDIRS' => !! var ('SUBDIRS'),
# Substitute Automake template tokens.
s/(?: % \?? [\w\-]+ %
- | % [\w\-]+ (?:\?[^?:%]+)? (?::[^?:%]+)? %
| \? !? [\w\-]+ \?
)/transform($&, \%transform)/gex;
# transform() may have added some ##%-comments to strip.
if var 'DIST_SUBDIRS' && ! var 'SUBDIRS';
# Check first, because we might modify some state.
- check_cygnus;
check_gnu_standards;
check_gnits_standards;
handle_data;
handle_headers;
handle_subdirs;
+ handle_user_recursion;
handle_tags;
handle_minor_options;
# Must come after handle_programs so that %known_programs is up-to-date.
--include-deps enable dependency tracking code
Flavors:
- --cygnus assume program is part of Cygnus-style tree
--foreign set strictness to foreign
--gnits set strictness to gnits
--gnu set strictness to gnu
sub parse_arguments ()
{
my $strict = 'gnu';
- my $cygnus = 0;
my $ignore_deps = 0;
my @warnings = ();
'gnu' => sub { $strict = 'gnu'; },
'gnits' => sub { $strict = 'gnits'; },
'foreign' => sub { $strict = 'foreign'; },
- 'cygnus' => \$cygnus,
'include-deps' => sub { $ignore_deps = 0; },
'i|ignore-deps' => sub { $ignore_deps = 1; },
'no-force' => sub { $force_generation = 0; },
set_strictness ($strict);
my $cli_where = new Automake::Location;
- set_global_option ('cygnus', $cli_where) if $cygnus;
set_global_option ('no-dependencies', $cli_where) if $ignore_deps;
for my $warning (@warnings)
{
* Conditionals:: Conditionals
* Silencing Make:: Obtain less verbose output from @command{make}
* Gnits:: The effect of @option{--gnu} and @option{--gnits}
-* Cygnus:: The effect of @option{--cygnus} (deprecated, soon to be removed)
* Not Enough:: When Automake is not Enough
* Distributing:: Distributing the Makefile.in
* API Versioning:: About compatibility between Automake versions
Autoconf macros supplied with Automake
* Public Macros:: Macros that you can use.
-* Obsolete Macros:: Macros that will soon be removed.
* Private Macros:: Macros that you should not use.
Directories
Silencing Make
-* Make verbosity:: Make is verbose by default
-* Tricks For Silencing Make:: Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity:: Make is verbose by default
+* Tricks For Silencing Make:: Standard and generic ways to silence make
+* Automake Silent Rules:: How Automake can help in silencing make
When Automake Isn't Enough
@xref{Gnits}, for more information on the precise implications of the
strictness level.
-Automake also has a special (and @emph{today deprecated}) ``cygnus'' mode
-that is similar to strictness but handled differently. This mode is
-useful for packages that are put into a ``Cygnus'' style tree (e.g., older
-versions of the GCC and gdb trees). @xref{Cygnus}, for more information
-on this mode. Please note that this mode @emph{is deprecated and will be
-removed in the next major Automake release (1.13)}; you must avoid its use
-in new packages, and should stop using it in existing packages as well.
-
@node Uniform
@section The Uniform Naming Scheme
that is then used by the automatic dependency tracking feature
(@pxref{Dependencies}).
-@item elisp-comp
-This program is used to byte-compile Emacs Lisp code.
-
@item install-sh
This is a replacement for the @command{install} program that works on
platforms where @command{install} is unavailable or unusable.
@item missing
This wraps a number of programs that are typically only required by
-maintainers. If the program in question doesn't exist,
-@command{missing} prints an informative warning and attempts to fix
-things so that the build can continue.
+maintainers. If the program in question doesn't exist, or seems to old,
+@command{missing} will print an informative warning before failing out,
+to provide the user with more context and information.
@item mkinstalldirs
This script used to be a wrapper around @samp{mkdir -p}, which is not
When used with @option{--add-missing}, causes installed files to be
copied. The default is to make a symbolic link.
-@item --cygnus
-@opindex --cygnus
-Causes the generated @file{Makefile.in}s to follow Cygnus rules, instead
-of GNU or Gnits rules. For more information, see @ref{Cygnus}.
-Note that @emph{this mode of operation is deprecated, and will be removed}
-in the next major Automake release (1.13).
-
@item -f
@opindex -f
@itemx --force-missing
The categories output by default are @samp{obsolete}, @samp{syntax} and
@samp{unsupported}. Additionally, @samp{gnu} and @samp{portability}
are enabled in @option{--gnu} and @option{--gnits} strictness.
-On the other hand, the @option{silent-rules} options (@pxref{Options})
-turns off portability warnings about recursive variable expansions.
@c Checked by extra-portability.sh
Turning off @samp{portability} will also turn off @samp{extra-portability},
@file{config.guess},
@file{config.sub},
@file{depcomp},
-@file{elisp-comp},
@file{compile},
@file{install-sh},
@file{ltmain.sh},
macro.
@item AC_CONFIG_HEADERS
- Automake will generate rules to rebuild these headers. Older versions
- of Automake required the use of @code{AM_CONFIG_HEADER}; this is no
- longer the case, and that macro has indeed been removed.
+ Automake will generate rules to rebuild these headers from the
+ corresponding templates (usually, the template for a @file{foo.h}
-header being @file{foo.h.in}). Older versions of Automake required
-the use of @code{AM_CONFIG_HEADER} (@pxref{Macros}); this is no
-longer the case.
++header being @file{foo.h.in}). Older versions of Automake
++required the use of @code{AM_CONFIG_HEADER}; this is no longer
++the case, and that macro has indeed been removed.
As with @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
specification using shell variables will be ignored as far as
numerous macros, it will rapidly become difficult to maintain, and it
will be almost impossible to share macros between packages.
-@vindex ACLOCAL_AMFLAGS
The second possibility, which we do recommend, is to write each macro
-in its own file and gather all of these files in a directory. This
-directory is usually called @file{m4/}. To build @file{aclocal.m4},
-one should therefore instruct @command{aclocal} to scan @file{m4/}.
-From the command line, this is done with @samp{aclocal -I m4}. The
-top-level @file{Makefile.am} should also be updated to define
-
-@example
-ACLOCAL_AMFLAGS = -I m4
-@end example
-
-@code{ACLOCAL_AMFLAGS} contains options to pass to @command{aclocal}
-when @file{aclocal.m4} is to be rebuilt by @command{make}. This line is
-also used by @command{autoreconf} (@pxref{autoreconf Invocation, ,
-Using @command{autoreconf} to Update @file{configure} Scripts,
-autoconf, The Autoconf Manual}) to run @command{aclocal} with suitable
-options, or by @command{autopoint} (@pxref{autopoint Invocation, ,
-Invoking the @command{autopoint} Program, gettext, GNU gettext tools})
-and @command{gettextize} (@pxref{gettextize Invocation, , Invoking the
-@command{gettextize} Program, gettext, GNU gettext tools}) to locate
-the place where Gettext's macros should be installed. So even if you
-do not really care about the rebuild rules, you should define
-@code{ACLOCAL_AMFLAGS}.
-
-When @samp{aclocal -I m4} is run, it will build an @file{aclocal.m4}
+in its own file and gather all these files in a directory. This
+directory is usually called @file{m4/}. Then it's enough to update
+@file{configure.ac} by adding a proper call to @code{AC_CONFIG_MACRO_DIR}:
+
+@example
+AC_CONFIG_MACRO_DIR([m4])
+@end example
+
+@command{aclocal} will then take care of automatically adding @file{m4/}
+to its search path for m4 files.
+
+When @samp{aclocal} is run, it will build an @file{aclocal.m4}
that @code{m4_include}s any file from @file{m4/} that defines a
required macro. Macros not found locally will still be searched in
system-wide directories, as explained in @ref{Macro Search Path}.
such third-party macros in your local @file{m4/} directory so they get
distributed.
-Since Automake 1.10, @command{aclocal} offers an option to copy these
-system-wide third-party macros in your local macro directory, solving
-the above problem. Simply use:
-
-@example
-ACLOCAL_AMFLAGS = -I m4 --install
-@end example
+Since Automake 1.10, @command{aclocal} offers the option @code{--install}
+to copy these system-wide third-party macros in your local macro directory,
+helping to solve the above problem.
-@noindent
With this setup, system-wide macros will be copied to @file{m4/}
-the first time you run @command{autoreconf}. Then the locally
-installed macros will have precedence over the system-wide installed
-macros each time @command{aclocal} is run again.
+the first time you run @command{aclocal}. Then the locally installed
+macros will have precedence over the system-wide installed macros
+each time @command{aclocal} is run again.
One reason why you should keep @option{--install} in the flags even
after the first run is that when you later edit @file{configure.ac}
explained in @ref{Local Macros}, and has
@example
-ACLOCAL_AMFLAGS = -I m4 --install
+AC_CONFIG_MACRO_DIR([m4])
@end example
@noindent
-in its top-level @file{Makefile.am}.
+in its @file{configure.ac}.
Initially the @file{m4/} directory is empty. The first time we run
-@command{autoreconf}, it will fetch the options to pass to
-@command{aclocal} in @file{Makefile.am}, and run @samp{aclocal -I m4
---install}. @command{aclocal} will notice that
+@command{aclocal --install}, it will notice that
@itemize @bullet
@item
copy this file in @file{m4/thirdparty.m4}, and output an
@file{aclocal.m4} that contains @samp{m4_include([m4/thirdparty.m4])}.
-The next time @samp{aclocal -I m4 --install} is run (either via
-@command{autoreconf}, by hand, or from the @file{Makefile} rebuild
-rules) something different happens. @command{aclocal} notices that
+The next time @samp{aclocal --install} is run, something different
+happens. @command{aclocal} notices that
@itemize @bullet
@item
Now suppose the system-wide third-party macro is changed. This can
happen if the package installing this macro is updated. Let's suppose
-the new macro has serial number 2. The next time @samp{aclocal -I m4
---install} is run the situation is the following:
+the new macro has serial number 2. The next time @samp{aclocal --install}
+is run the situation is the following:
@itemize @bullet
@item
version. MyPackage just had its macro updated as a side effect of
running @command{aclocal}.
-If you are leery of letting @command{aclocal} update your local macro,
-you can run @samp{aclocal -I m4 --diff} to review the changes
-@samp{aclocal -I m4 --install} would perform on these macros.
+If you are leery of letting @command{aclocal} update your local
+macro, you can run @samp{aclocal --diff} to review the changes
+@samp{aclocal --install} would perform on these macros.
Finally, note that the @option{--force} option of @command{aclocal} has
absolutely no effect on the files installed by @option{--install}. For
instance, if you have modified your local macros, do not expect
@option{--install --force} to replace the local macros by their
system-wide versions. If you want to do so, simply erase the local
-macros you want to revert, and run @samp{aclocal -I m4 --install}.
+macros you want to revert, and run @samp{aclocal --install}.
@node Future of aclocal
@menu
* Public Macros:: Macros that you can use.
-* Obsolete Macros:: Macros that will soon be removed.
* Private Macros:: Macros that you should not use.
@end menu
Runs many macros required for proper operation of the generated Makefiles.
@vindex AUTOMAKE_OPTIONS
-Today, @code{AM_INIT_AUTOMAKE} is called with a single argument: a
-space-separated list of Automake options that should
-be applied to every @file{Makefile.am} in the tree. The effect is as if
-each option were listed in @code{AUTOMAKE_OPTIONS} (@pxref{Options}).
+@code{AM_INIT_AUTOMAKE} is called with a single argument: a space-separated
+list of Automake options that should be applied to every @file{Makefile.am}
+in the tree. The effect is as if each option were listed in
+@code{AUTOMAKE_OPTIONS} (@pxref{Options}).
+
+@c FIXME: Remove this "modernization advice" in Automake 1.14 (and adjust
+@c FIXME: the error message in m4/init.m4:AM_INIT_AUTOMAKE accordingly).
@acindex AC_INIT
-This macro can also be called in @emph{another, deprecated form} (support
-for which will be @emph{removed in the next major Automake release (1.13)}):
+This macro could once (before Automake 1.13) also be called in the
+@emph{now obsolete and completely unsupported} form
@code{AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])}. In this form,
-there are two required arguments: the package and the version number.
-This form is obsolete because the @var{package} and @var{version} can
-be obtained from Autoconf's @code{AC_INIT} macro (which itself has an
-old and a new form).
+there were two required arguments: the package and the version number.
@anchor{Modernize AM_INIT_AUTOMAKE invocation}
If your @file{configure.ac} has:
@end example
@noindent
-you should modernize it as follows:
+you must modernize it as follows in order to make it work with Automake
+1.13 or later:
@example
AC_INIT([mumble], [1.5])
@item AM_SILENT_RULES
@acindex AM_SILENT_RULES
-Enable the machinery for less verbose build output (@pxref{Options}).
+Control the machinery for less verbose build output
+(@pxref{Automake Silent Rules}).
@item AM_WITH_DMALLOC
@acindex AM_WITH_DMALLOC
@end table
-@node Obsolete Macros
-@subsection Obsolete Macros
-@cindex obsolete macros
-@cindex autoupdate
-
-Although using some of the following macros was required in past
-releases, you should not use any of them in new code. @emph{All
-these macros will be removed in the next major Automake version};
-if you are still using them, running @command{autoupdate} should
-adjust your @file{configure.ac} automatically (@pxref{autoupdate
-Invocation, , Using @command{autoupdate} to Modernize
-@file{configure.ac}, autoconf, The Autoconf Manual}).
-@emph{Do it NOW!}
-
-@table @code
-
-@item AM_CONFIG_HEADER
-@acindex AM_CONFIG_HEADER
-Automake will generate rules to automatically regenerate the config
-header. This obsolete macro is a synonym of @code{AC_CONFIG_HEADERS}
-today (@pxref{Optional}).
-
-@item AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
-@acindex AM_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
-If the use of @code{TIOCGWINSZ} requires @file{<sys/ioctl.h>}, then
-define @code{GWINSZ_IN_SYS_IOCTL}. Otherwise @code{TIOCGWINSZ} can be
-found in @file{<termios.h>}. This macro is obsolete, you should
-use Autoconf's @code{AC_HEADER_TIOCGWINSZ} instead.
-
-@item AM_PROG_MKDIR_P
-@acindex AM_PROG_MKDIR_P
-@cindex @code{mkdir -p}, macro check
-@vindex MKDIR_P
-@vindex mkdir_p
-
-From Automake 1.8 to 1.9.6 this macro used to define the output
-variable @code{mkdir_p} to one of @code{mkdir -p}, @code{install-sh
--d}, or @code{mkinstalldirs}.
-
-Nowadays Autoconf provides a similar functionality with
-@code{AC_PROG_MKDIR_P} (@pxref{Particular Programs, , Particular
-Program Checks, autoconf, The Autoconf Manual}), however this defines
-the output variable @code{MKDIR_P} instead. In case you are still
-using the @code{AM_PROG_MKDIR_P} macro in your @file{configure.ac},
-or its provided variable @code{$(mkdir_p)} in your @file{Makefile.am},
-you are advised to switch ASAP to the more modern Autoconf-provided
-interface instead; both the macro and the variable @emph{will be
-removed} in the next major Automake release.
-
-@item AM_SYS_POSIX_TERMIOS
-@acindex AM_SYS_POSIX_TERMIOS
-@cindex POSIX termios headers
-@cindex termios POSIX headers
-Check to see if POSIX termios headers and functions are available on the
-system. If so, set the shell variable @code{am_cv_sys_posix_termios} to
-@samp{yes}. If not, set the variable to @samp{no}. This macro is obsolete,
-you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} instead.
-
-@end table
-
-
@node Private Macros
@subsection Private Macros
built after everything else since they are meant to test what has
been constructed.
+In addition to the built-in recursive targets defined by Automake
+(@code{all}, @code{check}, etc.), the developer can also define his
+own recursive targets. That is done by passing the names of such
+targets as arguments to the m4 macro @code{AM_EXTRA_RECURSIVE_TARGETS}
+in @file{configure.ac}. Automake generates rules to handle the
+recursion for such targets; and the developer can define real actions
+for them by defining corresponding @code{-local} targets.
+
+@example
+% @kbd{cat configure.ac}
+AC_INIT([pkg-name], [1.0]
+AM_INIT_AUTOMAKE
+AM_EXTRA_RECURSIVE_TARGETS([foo])
+AC_CONFIG_FILES([Makefile sub/Makefile sub/src/Makefile])
+AC_OUTPUT
+% @kbd{cat Makefile.am}
+SUBDIRS = sub
+foo-local:
+ @@echo This will be run by "make foo".
+% @kbd{cat sub/Makefile.am}
+SUBDIRS = src
+% @kbd{cat sub/src/Makefile.am}
+foo-local:
+ @@echo This too will be run by a "make foo" issued either in
+ @@echo the 'sub/src/' directory, the 'sub/' directory, or the
+ @@echo top-level directory.
+@end example
+
@node Conditional Subdirectories
@section Conditional Subdirectories
@cindex Subdirectories, building conditionally
not be set in @file{Makefile.am}: this is a user variable (@pxref{Flag
Variables Ordering}. It allows users to run @samp{make
LIBTOOLFLAGS=--silent}, for instance. Note that the verbosity of
-@command{libtool} can also be influenced with the Automake
-@option{silent-rules} option (@pxref{Options}).
-
+@command{libtool} can also be influenced by the Automake support
+for silent rules (@pxref{Automake Silent Rules}).
@node LTLIBOBJS, Libtool Issues, Libtool Flags, A Shared Library
@subsection @code{LTLIBOBJS} and @code{LTALLOCA}
separate variable that is also passed to every compilation that invokes
the C preprocessor. In particular it generates @samp{-I.},
@samp{-I$(srcdir)}, and a @option{-I} pointing to the directory holding
-@file{config.h} (if you've used @code{AC_CONFIG_HEADERS} or
-@code{AM_CONFIG_HEADER}). You can disable the default @option{-I}
-options using the @option{nostdinc} option.
+@file{config.h} (if you've used @code{AC_CONFIG_HEADERS}). You can
+disable the default @option{-I} options using the @option{nostdinc}
+option.
When a file to be included is generated during the build and not part
of a distribution tarball, its location is under @code{$(builddir)},
distributed.
Automake will byte-compile all Emacs Lisp source files using the Emacs
-found by @code{AM_PATH_LISPDIR}, if any was found.
+found by @code{AM_PATH_LISPDIR}, if any was found. When performing such
+byte-compilation, the flags specified in the (developer-reserved)
+@code{AM_ELCFLAGS} and (user-reserved) @code{ELCFLAGS} make variables
+will be passed to the Emacs invocation.
Byte-compiled Emacs Lisp files are not portable among all versions of
Emacs, so it makes sense to turn this off if you expect sites to have
different means (the so-called ``log compilers'', @pxref{Parallel Test
Harness}).
-Test scripts can be executed serially or concurrently. Automake
-supports both these kinds of test execution, with the serial test harness
-being the default (for backward-compatibility reasons only, as its use
-is nowadays discouraged). The concurrent test harness relies on the
-concurrence capabilities (if any) offered by the underlying @command{make}
+Test scripts can be executed serially or concurrently. Automake supports
+both these kinds of test execution, with the parallel test harness being
+the default. The concurrent test harness relies on the concurrence
+capabilities (if any) offered by the underlying @command{make}
implementation, and can thus only be as good as those are.
By default, only the exit statuses of the test scripts are considered when
determining the testsuite outcome. But Automake allows also the use of
more complex test protocols, either standard (@pxref{Using the TAP test
-protocol}) or custom (@pxref{Custom Test Drivers}). Note that you can
-enable such protocols only when the parallel harness is used: they won't
-work with the serial test harness. In the rest of this section we are
-going to concentrate mostly on protocol-less tests, since we cover
-test protocols in a later section (again, @pxref{Custom Test Drivers}).
+protocol}) or custom (@pxref{Custom Test Drivers}). Note that you can't
+enable such protocols when the serial harness is used, though.
+In the rest of this section we are going to concentrate mostly on
+protocol-less tests, since we cover test protocols in a later section
+(again, @pxref{Custom Test Drivers}).
@cindex Exit status 77, special interpretation
@cindex Exit status 99, special interpretation
@anchor{Simple tests and color-tests}
@vindex AM_COLOR_TESTS
@cindex Colorized testsuite output
-If the Automake option @code{color-tests} is used (@pxref{Options})
-and standard output is connected to a capable terminal, then the test
-results and the summary are colored appropriately. The user can disable
-colored output by setting the @command{make} variable
-@samp{AM_COLOR_TESTS=no}, or force colored output even without a connecting
-terminal with @samp{AM_COLOR_TESTS=always}. It's also worth noting that
-some @command{make} implementations, when used in parallel mode, have
-slightly different semantics (@pxref{Parallel make,,, autoconf,
-The Autoconf Manual}), which can break the automatic detection of a
-connection to a capable terminal. If this is the case, you'll have to
-resort to the use of @samp{AM_COLOR_TESTS=always} in order to have the
-testsuite output colorized.
+If the standard output is connected to a capable terminal, then the test
+results and the summary are colored appropriately. The developer and the
+user can disable colored output by setting the @command{make} variable
+@samp{AM_COLOR_TESTS=no}; the user can in addition force colored output
+even without a connecting terminal with @samp{AM_COLOR_TESTS=always}.
+It's also worth noting that some @command{make} implementations,
+when used in parallel mode, have slightly different semantics
+(@pxref{Parallel make,,, autoconf, The Autoconf Manual}), which can
+break the automatic detection of a connection to a capable terminal.
+If this is the case, the user will have to resort to the use of
+@samp{AM_COLOR_TESTS=always} in order to have the testsuite output
+colorized.
Test programs that need data files should look for them in @code{srcdir}
(which is both a make variable and an environment variable made available
@code{TESTS = $(check_PROGRAMS)} if all your programs are test cases.
@node Serial Test Harness
-@subsection Serial Test Harness
+@subsection Older (and obsolescent) serial test harness
@cindex @option{serial-tests}, Using
-@emph{NOTE:} This harness, while still being the default one, is
-obsolescent, and kept mostly for backward-compatibility reasons. The user
-is advised to use the parallel test harness instead (@pxref{Parallel Test
-Harness}). Be warned that future Automake versions might switch to use
-that more modern and feature-rich harness by default.
+@emph{This harness is obsolescent}, and kept for backward-compatibility
+reasons only. The user is strongly advised to just use the parallel test
+harness instead (@pxref{Parallel Test Harness}).
The serial test harness is enabled by the Automake option
@option{serial-tests}. It operates by simply running the tests serially,
@node Parallel Test Harness
@subsection Parallel Test Harness
-@cindex @option{parallel-tests}, Using
-The parallel (or concurrent) test harness is enabled by the Automake option
-@option{parallel-tests}. It features automatic collection of the test
-scripts output in @file{.log} files, concurrent execution of tests with
-@code{make -j}, specification of inter-test dependencies, lazy reruns of
-tests that have not completed in a prior run, and hard errors for exceptional
-failures.
+By default, Automake generated a parallel (concurrent) test harness. It
+features automatic collection of the test scripts output in @file{.log}
+files, concurrent execution of tests with @code{make -j}, specification
+of inter-test dependencies, lazy reruns of tests that have not completed
+in a prior run, and hard errors for exceptional failures.
This harness is still somewhat experimental and may undergo changes in
order to satisfy additional portability requirements.
@end itemize
@noindent
-On the other hand, the exact semantics of how (and if)
-@option{color-tests}, @code{XFAIL_TESTS}, and hard errors are supported
-and handled is left to the individual test drivers.
+On the other hand, the exact semantics of how (and if) testsuite output
+colorization, @code{XFAIL_TESTS}, and hard errors are supported and
+handled is left to the individual test drivers.
@c TODO: We should really add a working example in the doc/ directory,
@c TODO: and reference if from here.
@subsubsection Command-line arguments for test drivers
A custom driver can rely on various command-line options and arguments
-being passed to it automatically by the Automake's @option{parallel-tests}
-harness. It is @emph{mandatory} that it understands all of them (even
-if the exact interpretation of the associated semantics can legitimately
-change between a test driver and another, and even be a no-op in some
-drivers).
+being passed to it automatically by the Automake-generated test harness.
+It is @emph{mandatory} that it understands all of them (even if the exact
+interpretation of the associated semantics can legitimately change
+between a test driver and another, and even be a no-op in some drivers).
@noindent
Here is the list of options:
Note that the exact semantics attached to the @option{--color-tests},
@option{--expect-failure} and @option{--enable-hard-errors} options are
left up to the individual test drivers. Still, having a behaviour
-compatible or at least similar to that provided by the default
-@option{parallel-tests} driver is advised, as that would offer a better
-consistency and a more pleasant user experience.
+compatible or at least similar to that provided by the default driver
+is advised, as that would offer a better consistency and a more pleasant
+user experience.
@node Log files generation and test results recording
@subsubsection Log files generation and test results recording
@code{SKIP}, @code{FAIL}, @code{XPASS} and @code{ERROR}. These results,
when declared with @code{:test-result:}, can be optionally followed by
text holding the name and/or a brief description of the corresponding
-test; the @option{parallel-tests} harness will ignore such extra text when
-generating @file{test-suite.log} and preparing the testsuite summary.
+test; the harness will ignore such extra text when generating
+@file{test-suite.log} and preparing the testsuite summary.
@c Keep in sync with 'test-metadata-recheck.sh'.
@item @code{:recheck:}
parse and interpret these results, and properly present them to the user,
and/or register them for later analysis. The exact details of how this
is accomplished can vary among different test harnesses. The Automake
-parallel harness will present the results on the console in the usual
+harness will present the results on the console in the usual
fashion (@pxref{Testsuite progress on console}), and will use the
@file{.trs} files (@pxref{Basics of test metadata}) to store the test
results and related metadata. Apart from that, it will try to remain
% @kbd{cat configure.ac}
AC_INIT([GNU Try Tap], [1.0], [bug-automake@@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_FILES([Makefile])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK
A @code{Bail out!} directive doesn't stop the whole testsuite, but only
the test script it occurs in. This doesn't follow TAP specifications,
but on the other hand it maximizes compatibility (and code sharing) with
-the ``hard error'' concept of the default @option{parallel-tests} driver.
+the ``hard error'' concept of the default testsuite driver.
@item
The @code{version} and @code{pragma} directives are not supported.
@item
If you are using @code{AM_MAINTAINER_MODE} in @file{configure.ac}, then
these automatic rebuilding rules are only enabled in maintainer mode.
-@vindex ACLOCAL_AMFLAGS
-Sometimes you need to run @command{aclocal} with an argument like
-@option{-I} to tell it where to find @file{.m4} files. Since
-sometimes @command{make} will automatically run @command{aclocal}, you
-need a way to specify these arguments. You can do this by defining
-@code{ACLOCAL_AMFLAGS}; this holds arguments that are passed verbatim
-to @command{aclocal}. This variable is only useful in the top-level
-@file{Makefile.am}.
-
@vindex CONFIG_STATUS_DEPENDENCIES
@vindex CONFIGURE_DEPENDENCIES
@cindex @file{version.sh}, example
in the example above.
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
-@command{automake} cannot track dependencies (listing @file{version.sh}
-in @command{CONFIG_STATUS_DEPENDENCIES}, and distributing this file is up
-to the user), and that it uses the obsolete form of @code{AC_INIT} and
-@code{AM_INIT_AUTOMAKE}. Upgrading to the new syntax is not
-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}:
+today. We recommend that @file{version.sh} be replaced by an M4 file
+that is included by @file{configure.ac}:
@example
m4_include([version.m4])
@samp{m4_define([VERSION_NUMBER], [1.2])}. The advantage of this
second form is that @command{automake} will take care of the
dependencies when defining the rebuild rule, and will also distribute
-the file automatically. An inconvenience is that @command{autoconf}
-will now be rerun each time the version number is bumped, when only
-@file{configure} had to be rerun in the previous setup.
+the file automatically.
@node Options
@item @option{gnits}
@itemx @option{gnu}
@itemx @option{foreign}
-@itemx @option{cygnus}
@cindex Option, @option{gnits}
@cindex Option, @option{gnu}
@cindex Option, @option{foreign}
-@cindex Option, @option{cygnus}
@opindex gnits
@opindex gnu
@opindex foreign
-@opindex cygnus
Set the strictness as appropriate. The @option{gnits} option also
implies options @option{readme-alpha} and @option{check-news}.
Cause @samp{make dist} to fail unless the current version number appears
in the first few lines of the @file{NEWS} file.
-@item @option{color-tests}
-@cindex Option, @option{color-tests}
-@opindex color-tests
-Cause output of the serial and parallel test harnesses (see @ref{Simple
-Tests}) and of properly-written custom test drivers (@pxref{Custom Test
-Drivers}) to be colorized on capable terminals.
-
@item @option{dejagnu}
@cindex Option, @option{dejagnu}
@opindex dejagnu
Don't require @file{texinfo.tex}, even if there are texinfo files in
this directory.
-@item @option{parallel-tests}
-@cindex Option, @option{parallel-tests}
-@opindex parallel-tests
-Enable test suite harness for @code{TESTS} that can run tests in parallel
-(@pxref{Parallel Test Harness}, for more information).
-
@item @option{serial-tests}
@cindex Option, @option{serial-tests}
@opindex serial-tests
Enable the older serial test suite harness for @code{TESTS} (@pxref{Serial
-Test Harness}, for more information). This is still the default for the
-moment.
+Test Harness}, for more information).
+
+@item @option{parallel-tests}
+@cindex Option, @option{parallel-tests}
+@opindex parallel-tests
+Enable test suite harness for @code{TESTS} that can run tests in parallel
+(@pxref{Parallel Test Harness}, for more information). This option is
+only kept for backward-compatibility, since the parallel test harness is
+the default now.
@item @option{readme-alpha}
@cindex Option, @option{readme-alpha}
@samp{@var{major}.@var{minor}@var{alpha}}, where @var{alpha} is a
letter; it should be omitted for non-alpha releases.
-@item @option{silent-rules}
-@cindex Option, @option{silent-rules}
-@opindex silent-rules
-Enable less verbose build rules. This can be used to let build rules
-output status lines of the form:
-@example
-GEN @var{output-file}
- CC @var{object-file}
-@end example
-@noindent
-instead of printing the command that will be executed to update
-@var{output-file} or to compile @var{object-file}. It can also
-silence @command{libtool} output.
-
-For more information about how to use, enable, or disable silent
-rules, @pxref{Automake silent-rules Option}.
-
@item @option{std-options}
@cindex Options, @option{std-options}
@cindex @samp{make installcheck}, testing @option{--help} and @option{--version}
@cindex Silent @command{make} rules
@menu
-* Make verbosity:: Make is verbose by default
-* Tricks For Silencing Make:: Standard and generic ways to silence make
-* Automake silent-rules Option:: How Automake can help in silencing make
+* Make verbosity:: Make is verbose by default
+* Tricks For Silencing Make:: Standard and generic ways to silence make
+* Automake Silent Rules:: How Automake can help in silencing make
@end menu
@node Make verbosity
Here we describe some common idioms/tricks to obtain a quieter make
output, with their relative advantages and drawbacks. In the next
-section (@ref{Automake silent-rules Option}) we'll see how Automake
-can help in this respect.
+section (@ref{Automake Silent Rules}) we'll see how Automake can help
+in this respect, providing more elaborate and flexible idioms.
@itemize @bullet
@end itemize
-@node Automake silent-rules Option
+@node Automake Silent Rules
@section How Automake can help in silencing make
The tricks and idioms for silencing @command{make} described in the
previous section can be useful from time to time, but we've seen that
they all have their serious drawbacks and limitations. That's why
automake provides support for a more advanced and flexible way of
-obtaining quieter output from @command{make}: the @option{silent-rules}
-mode.
+obtaining quieter output from @command{make} (for most rules at least).
@c TODO: Maybe describe in brief the precedent set by the build system
@c of the Linux Kernel, from which Automake took inspiration ... Links?
-To give the gist of what @option{silent-rules} can do, here is a simple
+To give the gist of what Automake can do in this respect, here is a simple
comparison between a typical @command{make} output (where silent rules
are disabled) and one with silent rules enabled:
CCLD foo
@end example
-@cindex silent-rules and libtool
+@cindex silent rules and libtool
Also, in projects using @command{libtool}, the use of silent rules can
automatically enable the @command{libtool}'s @option{--silent} option:
CCLD libx.la
@end example
-Let's now see how the @option{silent-rules} mode interfaces with the
-package developer and the package user.
-
-To enable the use of @option{silent-rules} in his package, a developer
-needs to do either of the following:
-
-@itemize @bullet
-@item
-Add the @option{silent-rules} option as argument to @code{AM_INIT_AUTOMAKE}.
-@item
-Call the @code{AM_SILENT_RULES} macro from within the @file{configure.ac}
-file.
-@end itemize
-
-It is not possible to instead specify @option{silent-rules} in a
-@file{Makefile.am} file.
-
-If the developer has done either of the above, then the user of the
-package may influence the verbosity at @command{configure} run time as
-well as at @command{make} run time:
+For Automake-generated @file{Makefile}s, the user may influence the
+verbosity at @command{configure} run time as well as at @command{make}
+run time:
@itemize @bullet
@item
@code{make V=0} less verbose output.
@end itemize
-@cindex default verbosity for silent-rules
+@cindex default verbosity for silent rules
Note that silent rules are @emph{disabled} by default; the user must
enable them explicitly at either @command{configure} run time or at
@command{make} run time. We think that this is a good policy, since
it provides the casual user with enough information to prepare a good
bug report in case anything breaks.
-Still, notwithstanding the rationales above, a developer who wants to
-make silent rules enabled by default in his own package can do so by
-adding a @samp{yes} argument to the @code{AM_SILENT_RULES} call in
-@file{configure.ac}. We advise against this approach, though.
+Still, notwithstanding the rationales above, a developer who really
+wants to make silent rules enabled by default in his own package can
+do so by calling @code{AM_SILENT_RULES([yes])} in @file{configure.ac}.
@c Keep in sync with silent-configsite.sh
Users who prefer to have silent rules enabled by default can edit their
are advised to not set the variable @code{V} inside the @file{Makefile.am}
file, to allow the user to override the value for subdirectories as well.
-The current implementation of this feature normally uses nested
-variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile} feature
-that is not required by POSIX 2008 but is widely supported in
-practice. The @option{silent-rules} option thus turns off warnings
-about recursive variable expansion, which are in turn enabled by
-@option{-Wportability} (@pxref{automake Invocation}). On the rare
-@command{make} implementations that do not support nested variable
-expansion, whether rules are silent is always determined at configure
-time, and cannot be overridden at make time. Future versions of POSIX
-are likely to require nested variable expansion, so this minor
+To work at its best, the current implementation of this feature normally
+uses nested variable expansion @samp{$(@var{var1}$(V))}, a @file{Makefile}
+feature that is not required by POSIX 2008 but is widely supported in
+practice. On the rare @command{make} implementations that do not support
+nested variable expansion, whether rules are silent is always determined at
+configure time, and cannot be overridden at make time. Future versions of
+POSIX are likely to require nested variable expansion, so this minor
limitation should go away with time.
@vindex @code{AM_V_GEN}
@end itemize
-@node Cygnus
-@chapter The effect of @option{--cygnus}
-
-@cindex @option{cygnus} strictness
-
-@emph{The features described in this section are deprecated; you must
-not use any of them in new code, and should remove their use from older
-but still maintained code: they will be withdrawn the next major Automake
-release (1.13).}
-
-Some packages, notably GNU GCC and GNU gdb, used to have a build
-environment originally written at Cygnus Support (subsequently renamed
-Cygnus Solutions, and then later purchased by Red Hat). Packages with
-this ancestry are sometimes referred to as ``Cygnus'' trees.
-
-A Cygnus tree has slightly different rules for how a
-@file{Makefile.in} is to be constructed. Passing @option{--cygnus} to
-@command{automake} will cause any generated @file{Makefile.in} to
-comply with Cygnus rules.
-
-Here are the precise effects of @option{--cygnus}:
-
-@itemize @bullet
-
-@item
-The @option{foreign} strictness is implied.
-
-@item
-The options @option{no-installinfo}, @option{no-dependencies} and
-@option{no-dist} are implied (@pxref{Options}).
-
-@item
-The macro @code{AM_MAINTAINER_MODE} is required.
-
-@item
-Info files are always created in the build directory, and not in the
-source directory. Packages that don't use the @option{cygnus} option
-can emulate this effect by using the @option{no-installinfo} option
-and listing the generated info files in the @code{CLEANFILES} variable.
-
-@item
-@file{texinfo.tex} is not required if a Texinfo source file is
-specified. The assumption is that the file will be supplied, but in a
-place that Automake cannot find -- it is an artifact of how Cygnus
-packages are typically bundled. This effect can be emulated in
-packages not using the @option{cygnus} option with a proper definition
-of the @code{TEXINFO_TEX} variable (@pxref{Texinfo}).
-
-@item
-Certain tools will be searched for in the build tree as well as in the
-user's @env{PATH}. These tools are @command{runtest}, @command{expect},
-@command{makeinfo} and @command{texi2dvi}.
-
-@item
-The @code{check} target doesn't depend on @code{all}.
-@end itemize
-
-
@node Not Enough
@chapter When Automake Isn't Enough
Packages made with Autoconf and Automake ship with some generated
files like @file{configure} or @file{Makefile.in}. These files were
-generated on the developer's host and are distributed so that
+generated on the developer's machine and are distributed so that
end-users do not have to install the maintainer tools required to
rebuild them. Other generated files like Lex scanners, Yacc parsers,
or Info documentation, are usually distributed on similar grounds.
-Automake outputs rules in @file{Makefile}s to rebuild these files. For
+Automake output rules in @file{Makefile}s to rebuild these files. For
instance, @command{make} will run @command{autoconf} to rebuild
@file{configure} whenever @file{configure.ac} is changed. This makes
development safer by ensuring a @file{configure} is never out-of-date
inaccurate. Some rebuild rules will be triggered and attempt to
run developer tools such as @command{autoconf} or @command{automake}.
-Actually, calls to such tools are all wrapped into a call to the
-@command{missing} script discussed later (@pxref{maintainer-mode}).
-@command{missing} will take care of fixing the timestamps when these
-tools are not installed, so that the build can continue.
+Calls to such tools are all wrapped into a call to the @command{missing}
+script discussed later (@pxref{maintainer-mode}), so that the user will
+see more descriptive warnings about missing or out-of-date tools, and
+possible suggestions about how to obtain them, rather than just some
+``command not found'' error, or (worse) some obscure message from some
+older version of the required tool they happen to have installed.
+
+Maintainers interested in keeping their package buildable from a CVS
+checkout even for those users that lack maintainer-specific tools might
+want to provide an helper script (or to enhance their existing bootstrap
+script) to fix the timestamps after a
+@command{cvs update} or a @command{git checkout}, to prevent spurious
+rebuilds. In case of a project committing the Autotools-generated
+files, as well as the generated @file{.info} files, such script might
+look something like this:
+
+@smallexample
+#!/bin/sh
+# fix-timestamp.sh: prevents useless rebuilds after "cvs update"
+sleep 1
+# aclocal-generated aclocal.m4 depends on locally-installed
+# '.m4' macro files, as well as on 'configure.ac'
+touch aclocal.m4
+sleep 1
+# autoconf-generated configure depends on aclocal.m4 and on
+# configure.ac
+configure config.h.in
+# so does autoheader-generated config.h.in
+configure config.h.in
+# and all the automake-generated Makefile.in files
+touch `find . -name Makefile.in -print`
+# finally, the makeinfo-generated '.info' files depend on the
+# corresponding '.texi' files
+touch doc/*.info
+@end smallexample
@item
In distributed development, developers are likely to have different
checked for in @file{configure}.
However, if for some reason a rebuild rule is triggered and involves a
-missing tool, @command{missing} will notice it and warn the user.
-Besides the warning, when a tool is missing, @command{missing} will
-attempt to fix timestamps in a way that allows the build to continue.
-For instance, @command{missing} will touch @file{configure} if
-@command{autoconf} is not installed. When all distributed files are
-kept under version control, this feature of @command{missing} allows a
-user @emph{with no maintainer tools} to build a package off its version
-control repository, bypassing any timestamp inconsistency (implied by
-e.g.@: @samp{cvs update} or @samp{git clone}).
+missing tool, @command{missing} will notice it and warn the user, even
+suggesting how to obtain such a tool (at least in case it is a well-known
+one, like @command{makeinfo} or @command{bison}). This is more helpful
+and user-friendly than just having the rebuild rules spewing out a terse
+error message like @samp{sh: @var{tool}: command not found}. Similarly,
+@command{missing} will warn the user if it detects that a maintainer
+tool it attempted to use seems too old (be warned that diagnosing this
+correctly is typically more difficult that detecting missing tools, and
+requires cooperation from the tool itself, so it won't always work).
If the required tool is installed, @command{missing} will run it and
won't attempt to continue after failures. This is correct during
development: developers love fixing failures. However, users with
-wrong versions of maintainer tools may get an error when the rebuild
+missing or too old maintainer tools may get an error when the rebuild
rule is spuriously triggered, halting the build. This failure to let
the build continue is one of the arguments of the
@code{AM_MAINTAINER_MODE} advocates.
not portable to other @command{make} implementations.
The only way Automake could support @command{$(wildcard ...)} is by
- expending @command{$(wildcard ...)} when @command{automake} is run.
+ expanding @command{$(wildcard ...)} when @command{automake} is run.
The resulting @file{Makefile.in}s would be portable since they would
list all files and not use @samp{$(wildcard ...)}. However that
means developers would need to remember to run @command{automake} each
@code{MAKEFLAGS} is passed to sub-@command{make}s implicitly by
@command{make} itself.
-However you should not think that all variables ending with
-@code{FLAGS} follow this convention. For instance,
-@code{DISTCHECK_CONFIGURE_FLAGS} (@pxref{Checking the Distribution}) and
-@code{ACLOCAL_AMFLAGS} (see @ref{Rebuilding} and @ref{Local Macros}),
-are two variables that are only useful to the maintainer and have no
-user counterpart.
-
@code{ARFLAGS} (@pxref{A Library}) is usually defined by Automake and
has neither @code{AM_} nor per-target cousin.
@itemize
@item
-If less verbose output has been enabled in the package with the
-@samp{silent-rules} option (@pxref{Options}), you can use
+If less verbose output has been enabled in the package with the use
+of silent rules (@pxref{Automake Silent Rules}), you can use
@code{make V=1} to see the commands being executed.
@item
@code{make -n} can help show what would be done without actually doing
@c LocalWords: texinfo setfilename settitle setchapternewpage texi direntry
@c LocalWords: dircategory in's aclocal ifinfo titlepage Tromey vskip pt sp
@c LocalWords: filll defcodeindex ov cv op tr syncodeindex fn cp vr ifnottex
-@c LocalWords: dir Automake's ac Dist Gnits gnits cygnus dfn Autoconf's pxref
+@c LocalWords: dir Automake's ac Dist Gnits gnits dfn Autoconf's pxref
@c LocalWords: cindex Autoconf autoconf perl samp cvs dist trindex SUBST foo
@c LocalWords: xs emph FIXME ref vindex pkglibdir pkgincludedir pkgdatadir mt
@c LocalWords: pkg libdir cpio bindir sbindir rmt pax sbin zar zardir acindex