Support Vala in non-recursive builds; more tests and fixes.
* automake.in: Support Vala in non-recursive builds. Make sure
foo_VALAFLAGS really use used. Inject --library switch when building
Vala libraries.
* doc/automake.texi, NEWS: Document Vala support.
* m4/vala.m4: Rename AC_PROG_VALAC to AM_PROG_VALAC.
* tests/Makefile.am: Additional Vala tests.
* tests/vala.test: Also test VALAFLAGS support.
* tests/vala1.test: Test non-recursive Vala support.
* tests/vala2.test: Test _PKGNAME variables.
* tests/vala3.test: Test compiling of C code generated by Vala.
Initial support for the vala programming language.
* automake.in: Add %known_libraries, lang_vala_rewrite,
lang_vala_finish and lang_vala_target_hook to support the Vala
programming language. Register Vala language hooks.
* lib/am/vala.am: Empty rules file to prevent creation of depend2
based rules for Vala code.
* lib/am/Makefile.am (dist_am_DATA): Add vala.am.
* m4/vala.m4: Provide AC_PROG_VALAC for detecting the Vala compiler.
* m4/Makefile.am (dist_m4data_DATA): Add vala.m4.
* tests/vala.test: Test Vala support.
* tests/Makefile.am: Update.
Ralf Wildenhues [Wed, 8 Oct 2008 21:25:11 +0000 (23:25 +0200)]
Require texi2dvi in tests, makeinfo may not be enough.
* tests/txinfo16.test: RHEL 5.2 has makeinfo and texi2dvi in
separate packages, so also list the latter as required, as the
test generates DVI and/or PDF output (through distcheck).
* tests/txinfo18.test: Likewise.
* tests/txinfo21.test: Likewise.
* tests/txinfo22.test: Likewise.
* tests/txinfo3.test: Likewise.
* tests/version7.test: Likewise.
* THANKS: Update.
Report by Alexander Martens.
Ralf Wildenhues [Mon, 6 Oct 2008 20:46:57 +0000 (22:46 +0200)]
Improve test coverage of current TESTS semantics.
* tests/check8.test: New test, for subdir tests and setting of
$srcdir.
* tests/check9.test: New test, check @substituted@ TESTS.
* tests/Makefile.am: Update.
Ralf Wildenhues [Sun, 5 Oct 2008 19:24:32 +0000 (21:24 +0200)]
Print captured output before failing.
* tests/acloca14.test, tests/acloca17.test, tests/acloca18.test,
tests/aclocal.test, tests/acsilent.test, tests/alpha.test,
tests/check4.test, tests/color.test, tests/fn99.test,
tests/fn99subdir.test, tests/help.test, tests/init.test,
tests/lisp8.test, tests/missing3.test, tests/pr220.test,
tests/python11.test, tests/python4.test, tests/python5.test,
tests/unused.test, tests/version8.test: When Exit is called
after a command that has stdout or stderr redirected to a file
for later inspection, output the file before failing the test.
* doc/Makefile.am (update_mans): Use wrappers in tests/
directory.
($(srcdir)/aclocal-$(APIVERSION).1): Use versioned wrapper as
input program to help2man.
($(srcdir)/automake-$(APIVERSION).1): Likewise.
Report by Eric Blake.
* doc/automake.texi (Length limitations): New node.
(Alternative): `nobase_' is not always equivalent to several
base variables.
(Install): Mention multi-file install.
* NEWS: Expand on the issue, list some more user-visible
consequences.
Install nobase_lib_LTLIBRARIES before bin_PROGRAMS.
* automake.in (generate_makefile): If nobase_lib_LTLIBRARIES are
used, add an ugly hack to install them before bin_PROGRAMS, just
like done with lib_LTLIBRARIES.
* tests/ltorder.test: Add program, to expose this.
This patch changes back the order of installation of nobase
LTLIBRARIES to that in which files are listed in the variables.
It does not fix the issue of strict dependency ordering, as
implied by *_LIBADD, but as before allows to steer the order by
listing the libraries in nobase_*_LTLIBRARIES appropriately.
As an advantage over the state of 1.10, multiple consecutive
nobase libraries to be installed in the same directory are
passed to libtool in one invocation.
* lib/am/ltlib.am (install-%DIR%LTLIBRARIES) [!%?BASE%]: Do not
reorder libraries upon installation. Remove spurious empty
line.
* tests/ltorder.test: New test.
* tests/Makefile.am: Update.
* automake.in (handle_ltlibraries): New hash %instsubdirs to
track the dirname of nobase ltlibraries, and tack it onto the
end of the -rpath argument. Also, fix the warning about ltlibs
installed in multiple locations to fit a bit better.
* tests/pr300-ltlib.test: Expose this bug here.
* tests/ltinstloc.test: New test.
* tests/Makefile.am: Update.
* NEWS: Update.
* configure.ac (HELP2MAN): New substitution.
* doc/Makefile.am (dist_man1_MANS, MAINTAINERCLEANFILES)
(update_mans): New macros.
($(srcdir)/aclocal-$(APIVERSION).1)
($(srcdir)/automake-$(APIVERSION).1): New rules, generate
man pages from the command line help with help2man.
($(srcdir)/aclocal.1, $(srcdir)/automake.1): New rules, for
`.so' man page links to the versioned pages.
* NEWS: Update.
* lib/am/progs.am (install-%DIR%PROGRAMS): Rewrite rule to not
try to use the installed name as key in a hash, so destructive
$(transform) scripts still work.
* lib/am/scripts.am (install-%DIR%SCRIPTS): Likewise.
* tests/transform.test: Fix test to look in right place for
installed files.
* tests/transform2.test: New test.
* tests/Makefile.am: Adjust.
Report by Jim Meyering.
* lib/am/ltlib.am (install-%DIR%LTLIBRARIES): Invoke `libtool
--mode=install' with multiple libraries at once.
(%DIR%LTLIBRARIES_INSTALL): No need to use install_sh any more.
* lib/am/progs.am (install-%DIR%PROGRAMS): Likewise, remove much
of the libtool special-casing by invoking it for multiple
programs at once.
* lib/am/scripts.am [%?INSTALL%]: Include inst-vars.am
independent of `%?BASE%'.
(install-%DIR%SCRIPTS): Install multiple scripts at once,
using awk and a number of sed scripts.
(uninstall-%DIR%SCRIPTS): Compute the installed names, and
remove them, all at once.
(%DIR%SCRIPT_INSTALL) [!BASE]: No need to use install-sh any
more.
* lib/am/progs.am (install-%DIR%PROGRAMS): Allow to install
several programs with one install invocation, when not using
libtool; employs some trickery to cater for nobase_, $(EXEEXT),
create needed directories, libtool, while only forking a
constant number of times in the fast path; uses awk and sed also
in the default path.
(%DIR%PROGRAMS_INSTALL) [!BASE]: No need to use install-sh any
more.
* lib/am/progs.am (clean-%DIR%PROGRAMS) [?LIBTOOL?]: Fork less
often, avoid removing programs twice if $(EXEEXT) is empty.
* tests/nobase-libtool.test: Also test PROGRAMS, in order to
exercise the code path.
* THANKS: Update.
Report by Toralf Förster.
* lib/am/mans.am: Include inst-vars.am.
(install-man%SECTION%): Gather lists of man pages to install,
and install up to 40 of those that do not have to be renamed
at once. Fail if installation of any file fails.
(uninstall-man%SECTION%): Rewrite to use fewer sed invocations.
* doc/automake.texi (Man pages): Hint the user to the fast path.
Indentation fix.
* tests/instmany-mans.test: New test.
* tests/Makefile.am: Update.
* lib/am/inst-vars.am (am__nobase_strip_setup)
(am__nobase_strip): New macros.
(am__nobase_list): Factorize.
* lib/am/data.am (uninstall-%DIR%%PRIMARY%): Use them, for a
constant number of forks per uninstall.
* lib/am/libs.am (uninstall-%DIR%LIBRARIES): Likewise.
* lib/am/lisp.am (uninstall-%DIR%LISP): Likewise.
* lib/am/progs.am (uninstall-%DIR%PROGRAMS): Fast uninstall.
* lib/am/python.am (uninstall-%DIR%PYTHON): Fast uninstall.
Echo all `rm' commands that are are executed.
* lib/am/java.am (install-%DIR%JAVA, uninstall-%DIR%JAVA):
Fast install and uninstall.
* lib/am/libs.am (install-%DIR%LIBRARIES): Fix instsh.test
failure on AIX due to ranlib and whitespace in the directory.
* THANKS: Update.
Report by John F Trudeau.
* lib/am/java.am (install-%DIR%JAVA): Fail upon install failure.
* lib/am/lisp.am (install-%DIR%LISP): Likewise.
* lib/am/ltlib.am (install-%DIR%LTLIBRARIES): Likewise.
* lib/am/libs.am (install-%DIR%LIBRARIES): Likewise, for
`install' as well as `ranlib'.
* lib/am/progs.am (install-%DIR%PROGRAMS): If `install' fails,
return its exit failure, not 1.
* tests/instfail.test: New test, for PROGRAMS (without libtool),
LIBRARIES, including nobase variants.
* tests/instfail-info.test: Likewise, for TEXINFOS.
* tests/instfail-java.test: Likewise, for JAVA.
* tests/instfail-libtool.test: Likewise, for PROGRAMS (with
libtool) and LTLIBRARIES.
* tests/Makefile.am: Adjust.
For files that can live in the build tree or the source tree,
we have to expect that prepending `$(srcdir)/' to each name
will let the install command line exceed length limitations.
Thus use a new macro, $(am__base_list), to install in chunks
of 40 files, similar to what we do for nobase_* files. There,
lower the limit to 40, too.
* lib/am/inst-vars.am (am__install_max): Lower to 40.
(am__base_list): New macro.
* lib/am/data.am (install-%DIR%%PRIMARY%) [%?BASE%]: Use it.
* lib/am/texinfos.am (install-dvi-am, install-html-am)
(install-info-am, install-pdf-am, install-ps-am): Likewise.
Cater to Bourne shells like Solaris sh that do not pass the
`exit' argument as status to the cleanup trap.
* Makefile.am (maintainer-check): Check that here-documents
use only `END' or `EOF' as delimiter in the test suite.
Check that, outside of here-documents, the tests do not use
`exit' with an argument, but use `Exit' instead.
* tests/defs.in (Exit): New function. Use it throughout,
starting with the introduction of the exit trap.
* tests/*.test: Use `Exit $arg' instead of `exit $arg'
throughout, except inside created files.
Up to now, $(am__cd) was only used within backquotes, to avoid
extraneous output. This patch also uses it for every `cd' to a
relative subdir, to prevent CDPATH from entering an unwanted
directory.
* Makefile.am (maintainer-check): Fix current check for
$(am__cd) within backquotes a bit. Add new check for `cd' to a
relative subdir.
* automake.in (handle_tags, handle_configure): Adjust rules.
* lib/am/ansi2knr.am: Likewise.
* lib/am/configure.am: Likewise.
* lib/am/distdir.am: Likewise.
* lib/am/remake-hdr.am: Likewise.
* lib/am/subdirs.am: Likewise.
* lib/am/tags.am: Likewise.
* lib/am/texibuild.am: Likewise.
* tests/nobase-python.test: Listing a dependency to be found
via VPATH search explicitly, without the path, as a target,
will turn off VPATH search for FreeBSD make. So move the
creation of the files outside of the Makefile.
* m4/maintainer.m4 (AM_MAINTAINER_MODE): Allow for an optional
first argument of `enable' or `disable', setting the default.
* doc/automake.texi (Optional, maintainer-mode): Document.
* tests/mmode.test: New test.
* tests/Makefile.am: Adjust.
* NEWS: Update.
Suggestion by Vincent Lefevre.
Ralf Wildenhues [Fri, 22 Aug 2008 11:19:04 +0000 (13:19 +0200)]
Fix rebuilding of removed subdir/Makefile.in files.
* lib/am/configure.am (%MAKEFILE-IN%) [?!TOPDIR_P?]: If
subdir/Makefile.in was removed, am--refresh would not update
it. Fix up for it by running the per-directory rebuild rule.
* tests/remake6.test, tests/remake6.test: New tests.
* tests/Makefile.am: Adjust.
* NEWS, THANKS: Update.
Report and initial patch by Ilya N. Golubev.
Ralf Wildenhues [Tue, 17 Jun 2008 22:37:42 +0000 (00:37 +0200)]
Introduce macro $(am__mv) to facilitate 'libtool --dry-run'.
* lib/am/depend.am (am__mv): New macro, set to 'mv -f'.
* lib/am/depend2.am: Use throughout to move the temporary
depfile *.Tpo to its final destination *.Po.
Ralf Wildenhues [Tue, 17 Jun 2008 22:11:36 +0000 (00:11 +0200)]
For AC_CONFIG_LINKS(X,X), do not clean X in a non-VPATH build.
* automake.in (rewrite_inputs_into_dependencies): Do distribute
inputs where input and output name are equal. This relies on
the assumption that it only happens with AC_CONFIG_LINKS.
(handle_configure) <CONFIG_CLEAN_VPATH_FILES>: New variable, for
links where source and dest are equal.
* lib/am/clean.am (distclean-generic): Remove, if build tree not
equal source tree.
* tests/conflnk4.test: New test.
* tests/Makefile.am: Adjust.
* NEWS: Update.
Karl Berry [Wed, 4 Jun 2008 18:45:56 +0000 (20:45 +0200)]
Improve description of -local and -hook targets.
* doc/automake.texi (Install, Hard-Coded Install Paths): Fix
punctuation and markup.
(Extending): Improve wording and clarify order semantics of
*-local and *-hook targets.
* automake.in (%ac_config_files_condition): New.
(scan_autoconf_config_files): Record condition if any.
(scan_autoconf_traces): Trace _AM_COND_IF, _AM_COND_ELSE,
_AM_COND_ENDIF, updating @cond_stack as appropriate.
(handle_configure): Prefix config.status rule with condition.
Check that m4 quotation is done consistently.
* m4/cond.m4 (AM_CONDITION): Define `_AM_COND_VALUE_name'
with `name' being the name of the condition, to its shell
condition.
* m4/cond-if.m4: New file.
(_AM_COND_IF, _AM_COND_ELSE, _AM_COND_ENDIF): New trace helpers.
(AM_COND_IF): New macro, implements conditionals.
* m4/Makefile.am: Adjust.
* doc/automake.texi (Requirements, Optional, Conditionals):
Document AM_COND_IF.
* NEWS: Update.
* tests/cond39.test, tests/cond40.test, tests/cond41.test,
tests/cond42.test, tests/cond43.test: New tests.
* tests/Makefile.am: Adjust.
Ralf Wildenhues [Mon, 17 Mar 2008 05:49:44 +0000 (06:49 +0100)]
New function xsystem_hint, for autoreconf.
* lib/Autom4te/FileUtils.pm (handle_exec_errors): New argument
$hint, show if the executing program does not exist.
(xsystem_hint): New function, like xsystem but allows to pass
a hint.
Implement the `notrans_' prefix for untransformed manpages.
* automake.in (handle_man_pages), lib/am/mans.am: Implement
notrans_ prefix for MANS primary and rework dependencies for
install-man%SECTION%; use only vars defined in Makefile.am.
* doc/automake.texi (Renaming, Uniform, Man pages):
Document notrans_ prefix.
* NEWS: Update.
* tests/notrans.test: New test.
* tests/Makefile.am: Update.
Ralf Wildenhues [Sat, 8 Mar 2008 12:58:18 +0000 (13:58 +0100)]
Exploit `install' with multiple files at once for some file types.
With nobase targets, at most 50 files are installed at once,
to avoid quadratic string concatenation and line length limits.
This isn't yet done with base targets. One hope is that there,
the typical file name length is lower. If this turns out to be
a problem, it should be revisited.
* lib/am/inst-vars.am (am__nobase_list): New helper macro for
installation of multiple nobase files at once: sorts and lists
files keyed by their target directory.
* lib/am/data.am (%DIR%%PRIMARY%_INSTALL): No need to set it to
$(install_sh_DATA) any more, not even for nobase targets.
(install-%DIR%%PRIMARY%): Split base and nobase cases.
Rewrite to pass lists of files which all go in the same
directory to `install'. In the nobase case, make use of
$(am__nobase_list) and $(MKDIR_P) each directory before
populating it. Take care of files in source and build trees,
and avoid creating directories where no files are to be
installed.
* lib/am/libs.am (%DIR%LIBRARIES_INSTALL): Likewise.
(install-%DIR%LIBRARIES): Likewise.
* lib/am/python.am (%DIR%PYTHON_INSTALL): Likewise.
(install-%DIR%PYTHON): Likewise. Also take care to keep note of
a list for byte compilation after installation.
* lib/am/texinfos.am (install-dvi-am, install-html-am)
(install-info-am, install-pdf-am, install-ps-am): Use file lists
to install multiple files at once.
* NEWS: Update.
Suggested by Akim Demaille.
Ralf Wildenhues [Sat, 8 Mar 2008 12:35:05 +0000 (13:35 +0100)]
Require unreleased Autoconf for fixed AC_PROG_INSTALL.
* m4/init.m4 (AM_INIT_AUTOMAKE): Bump AC_PREREQ to 2.61-341,
regenerate files.
* configure.ac: Also require Autoconf 2.61-341, to catch
failure early and provide a sensible error message.
Ralf Wildenhues [Sat, 23 Feb 2008 09:47:20 +0000 (10:47 +0100)]
Fix XFAIL_TESTS matching for NetBSD ksh.
* lib/am/check.am (check-TESTS): In the case patterns for
XFAILed tests, add literal bracket expression for matching
whitespace, as NetBSD 4.99.54 ksh does not understand a
bracket expression resulting from variable expansion.
* README: Explain how to run the Automake test suite, including
setting MAKE to test gmake.
Report by Patrick Welche.
Ralf Wildenhues [Tue, 19 Feb 2008 21:15:03 +0000 (22:15 +0100)]
PR automake/498
* m4/options.m4 (_AM_SET_OPTIONS): Use m4_foreach_w instead of
obsolete AC_FOREACH.
Report by NightStrike and gurganbl@rose-hulman.edu.
Ralf Wildenhues [Wed, 30 Jan 2008 20:23:16 +0000 (21:23 +0100)]
Split instsh2.test, so that only the new part requires non-root.
* tests/instsh2.test: Split off testing of `install-sh -C' ...
* tests/instsh3.test: ... to this new test, requiring non-root.
* tests/Makefile.am: Adjust.
* THANKS: Update.
Report by Theodoros V. Kalamatianos.
Ralf Wildenhues [Wed, 23 Jan 2008 22:38:34 +0000 (23:38 +0100)]
Split libtool part off of nobase.test.
* tests/nobase.test: Split off libtool part of nobase.test for
increased test exposure, to ...
* tests/nobase-libtool.test: ... this new test.
* tests/Makefile.am: Update.
Ralf Wildenhues [Tue, 22 Jan 2008 22:35:57 +0000 (23:35 +0100)]
Prefer generated manpages over distributed ones.
* lib/am/mans.am (install-man%SECTION%): Prefer generated manpages
over distributed ones.
Report and patch by Peter Breitenlohner.
* tests/man3.test: New test.
* tests/Makefile.am: Update.
Ralf Wildenhues [Sat, 8 Dec 2007 10:06:03 +0000 (11:06 +0100)]
Fix `fetch' target to match current upstream locations.
* Makefile.am (WGET_SV_CVS): Renamed from WGETSGO.
(WGET_SV_GIT_AC, WGET_SV_GIT_GL, WGET_GCC): New.
(fetch): Update to match current upstream locations.
Ralf Wildenhues [Mon, 14 Jan 2008 21:42:33 +0000 (22:42 +0100)]
* doc/automake.texi (DESTDIR, Built sources example): Fix wording.
* THANKS: Update.
Reports and suggestions by William Pursell and nightstrike@gmail.com.
Ralf Wildenhues [Sun, 13 Jan 2008 17:05:44 +0000 (18:05 +0100)]
Do not fail if `autoupdate' is not present.
* tests/obsolete.test: Check for presence of autoupdate. Apparently,
FreeBSD may install the other Autoconf programs without a version
suffix but not autoupdate.
Ralf Wildenhues [Thu, 10 Jan 2008 19:49:07 +0000 (20:49 +0100)]
Clarify texinfo.tex and TEXINFO_TEX semantics.
* doc/automake.texi (Texinfo): Clarify that by default,
texinfo.tex is searched in the same directory as the Makefile.am
that needs it. Clarify that TEXINFO_TEX has precedence over
AC_CONFIG_AUX_DIR, and that it requires the user to install and
distribute it.
* tests/txinfo22.test: Ensure TEXINFO_TEX is not distributed.
* THANKS: Update.
Reports by Dilyan Palauzov and Roumen Petrov.
Ralf Wildenhues [Tue, 8 Jan 2008 20:37:21 +0000 (21:37 +0100)]
Fix acloca20.test for fast machines.
* tests/acloca20.test: Use `--force' with the second $AUTOCONF,
to force update on fast machines where both autoconf invocations
happen within the same second.
Report by Greg Schafer.