platform/upstream/automake.git
13 years agopy-compile: '--' and non-option arguments terminate the option list
Stefano Lattarini [Wed, 8 Jun 2011 20:27:25 +0000 (22:27 +0200)]
py-compile: '--' and non-option arguments terminate the option list

* lib/py-compile: Any non-option argument, or the special `--'
argument, now explicitly terminates the list of options.
* tests/py-compile-option-terminate.test: New test.
* tests/Makefile.am (TESTS): Update.
* NEWS: Update.

13 years agopy-compile: complain on unrecognized options
Stefano Lattarini [Wed, 8 Jun 2011 20:10:08 +0000 (22:10 +0200)]
py-compile: complain on unrecognized options

* lib/py-compile: Complain on unrecognized options.  Don't be too
lax in matching `--help' and `--version' options.
* tests/py-compile-usage.test: Extend accordingly.
* NEWS: Update.

13 years agopy-compile: normalize error and help messages
Stefano Lattarini [Wed, 8 Jun 2011 20:00:38 +0000 (22:00 +0200)]
py-compile: normalize error and help messages

* lib/py-compile: Now error messages do not begin with a capital
letter, nor end with a period, as per GNU standards.  Prepend the
error messages with the name of the script, not with its path.
When an invalid usage is recognized, always display the customary
message "Try `py-compile --help' ..." on a line of its own.
($me): New variable, containing the name of the
program, i.e., `py-compile'.  Use it throughout.
(usage_error): New function, used to display error messages about
invalid usage.
* tests/py-compile-usage.test: Extend and tighten accordingly.

13 years agopython tests: add "unit tests" on py-compile
Stefano Lattarini [Wed, 8 Jun 2011 19:37:51 +0000 (21:37 +0200)]
python tests: add "unit tests" on py-compile

* tests/py-compile-basic.test: New test.
* tests/py-compile-basic2.test: New test.
* tests/py-compile-basedir.test: Likewise.
* tests/py-compile-destdir.test: Likewise.
* tests/py-compile-env.test: Likewise.
* tests/py-compile-usage.test: Likewise.
* tests/Makefile.am (TESTS): Update.

Tested with python 2.0.1, 2.4.6, 2.6.6, 2.7.1, and 3.1.3.

13 years agopy-compile: the '--destdir' option now accepts a blank argument
Stefano Lattarini [Wed, 8 Jun 2011 12:55:01 +0000 (14:55 +0200)]
py-compile: the '--destdir' option now accepts a blank argument

* lib/py-compile (Option parsing): Do not count an empty argument
to `--destdir' or `--basedir' as a missing argument.
* lib/python.am: Simplify accordingly, passing the `--destdir'
option to py-compile unconditionally, even if `$(DESTDIR)' is
empty.
* NEWS: Update.

13 years agopython: run the 'py-compile' script with $(SHELL)
Stefano Lattarini [Wed, 8 Jun 2011 12:33:49 +0000 (14:33 +0200)]
python: run the 'py-compile' script with $(SHELL)

* lib/python.am (install-%DIR%PYTHON): Run each instance of
py-compile using $(SHELL).  Since we are at it, break overly
long lines.
(am__py_compile): New variable, to reduce code duplication.

13 years agomaintcheck: fix some failures, extend some checks
Stefano Lattarini [Thu, 2 Jun 2011 10:15:52 +0000 (12:15 +0200)]
maintcheck: fix some failures, extend some checks

* Makefile.am (sc_diff_automake_in_automake): Update, as we
now expect 9 lines, not 8, to be changed from `automake.in'
to `automake'.
(sc_diff_aclocal_in_aclocal): New maintainer check, similar to
the above, and checking that only 10 lines are changed from
`aclocal.in' to `aclocal'.
(syntax_check_rules): Update.
(sc_tests_Exit_not_exit): Exempt self tests `self-check-*.test'
from this check, as they can legitimately use the bare `exit'
builtin in various places.
* doc/automake.texi (Python): Remove stray `@' from the end of
a line.  Typo introduced in commit `v1.11-312-g5bf7af6'.
* tests/depcomp8a.test: Pass DISTCHECK_CONFIGURE_FLAGS to make
from the environment rather than from the command line, to
pacify the `sc_tests_overriding_macros_on_cmdline' maintainer
check.
* tests/depcomp8b.test: Likewise.

13 years agoMerge branch 'remake-rules-non-GNU-make' into maint
Stefano Lattarini [Wed, 1 Jun 2011 16:58:35 +0000 (18:58 +0200)]
Merge branch 'remake-rules-non-GNU-make' into maint

13 years agoautomake, aclocal: honour configure-time AUTOCONF and AUTOM4TE
Stefano Lattarini [Sun, 29 May 2011 08:42:00 +0000 (10:42 +0200)]
automake, aclocal: honour configure-time AUTOCONF and AUTOM4TE

Currently, the Automake's own configure script allow definition
of AUTOCONF and AUTOM4TE, expected to point respectively to an
autoconf and autom4te programs.  But while these definitions are
honoured in the Automake's build systems and test suite, they
were *not* honoured in the generated `automake' and `aclocal'
scripts.  This behaviour, apart from being wrong in that it does
not allow the user enough freedom in choosing his tools, also
caused inconsistencies in the test suite, brining to spurious
failures.

Problem reported by Graham Reitz on the automake list; see thread:
<http://lists.gnu.org/archive/html/automake/2011-05/msg00022.html>

* automake.in ($traces): Use `@am_AUTOCONF', not simply `autoconf'.
* aclocal.in ($traces): Use `@am_AUTOM4TE', not simply `autom4te'.
* Makefile.am (do_subst): Substitute also `@am_AUTOCONF' and
`@am_AUTOM4TE'.
* NEWS: Update.
* THANKS: Update.

13 years agobuild: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too
Stefano Lattarini [Sun, 29 May 2011 09:04:08 +0000 (11:04 +0200)]
build: the user can override AUTOM4TE, AUTORECONF and AUTOUPDATE too

Our build system allows the user to override AUTOCONF and AUTOHEADER
at configure time, and honours these overrides in our testsuite.
But it didn't do the same with AUTOM4TE, AUTORECONF and AUTOUPDATE.
This change fixes that inconsistency.

* configure.ac (am_AUTOM4TE, am_AUTOUPDATE, am_AUTORECONF): New
AC_SUBSTitutions.  Update comments.
* tests/defs.in ($AUTOUPDATE): Default to `@am_AUTOUPDATE@' now.
($AUTOM4TE): New variable, defaulting to `@am_AUTOM4TE@'.
($AUTORECONF): New variable, defaulting to `@am_AUTORECONF@'.
* doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Update.

13 years agoremake: behave better with non-GNU make in subdirectories
Stefano Lattarini [Sun, 29 May 2011 13:24:58 +0000 (15:24 +0200)]
remake: behave better with non-GNU make in subdirectories

Currently, with every decent make program, it is possible to
rebuild out-of-date autotools-generated files with a simple
"make Makefile" -- but for this to work reliably with non-GNU
make implementations, the command must be issued from the
top-level directory.  This patch removes such limitation.

* lib/am/configure.am (am--refresh): Depend on `%MAKEFILE%'.
* tests/defs.in (using_gmake): New function, backported from the
`master' branch (and simplified).
* tests/remake-subdir.test: New test.
* tests/remake-subdir2.test: Likewise.
* tests/remake-subdir-gnu.test: Likewise.
* tests/remake-subdir-from-subdir.test: Likewise.
* tests/Makefile.am (TESTS): Update.

13 years agotests/README: fix example about `make -e' usage
Ralf Wildenhues [Sun, 22 May 2011 17:02:27 +0000 (19:02 +0200)]
tests/README: fix example about `make -e' usage

* tests/README (Section "Writing test cases" subsection "Do"): When
some variable is never initialized in the Makefile, `-e' is not
necessary in order to override it.  DESTDIR is such a variable: we
ensure that we do not ever initialize it.  And as such, it is quite
portable to use:
  $ make DESTDIR=/foo/bar install
and in fact, quite widely used.
So our example about when `make -e' is required, which references
the `DESTDIR' variable, is poorly chosen, if not downright wrong.
Rewrite it to use `prefix' as the overridden variable instead.

13 years agotestsuite: avoid re-running few tests with 'parallel-tests' option
Stefano Lattarini [Fri, 20 May 2011 21:18:39 +0000 (23:18 +0200)]
testsuite: avoid re-running few tests with 'parallel-tests' option

Some tests in our testsuite use the 'simple-tests' driver only
marginally, or simply as a mean to conveniently check unrelated
invariants.  It makes little sense to force these tests to also
run with the 'parallel-tests' Automake option active, as doing so
offers no real gain in coverage, while often causing a measurable
overhead in execution time (for an already too-slow testsuite).

* tests/pr401.test (parallel_tests): Define to "no", to prevent
the generation of a sibling test script using the 'parallel-tests'
driver.
* tests/pr401b.test: Likewise.
* tests/pr401c.test: Likewise.

13 years agotestsuite: allow tests to avoid the use of 'parallel-tests' option
Stefano Lattarini [Fri, 20 May 2011 20:31:40 +0000 (22:31 +0200)]
testsuite: allow tests to avoid the use of 'parallel-tests' option

* tests/gen-parallel-tests: Do not generate "siblings" for tests
that explicitly define the `parallel_tests', whether to "yes" or
to any other value.  Extend heading comments to give a rationale
for this behaviour.
* tests/README: Update.

13 years agotests/README: update obsoleted advice
Stefano Lattarini [Fri, 20 May 2011 20:15:32 +0000 (22:15 +0200)]
tests/README: update obsoleted advice

* tests/README (Section "Writing test cases" subsection "Do"):
Do not suggest to use the `*-p.test' pattern for the names of
hand-written tests which use the `parallel-tests' Automake option.
Not only is this not respected by the existing tests, but it is
more likely to cause conflicts with auto-generated tests.
So, suggest to *avoid* using the `*-p.test' pattern in names
of hand-written tests instead.
(Section "Writing test cases" subsection "Do not"):  When
suggesting not to override Makefile variables using command
line arguments, do not use the badly outdated variables `U'
and 'ANSI2KNR' in the example; instead, use the more common
and typical `DESTDIR'.

13 years agotest defs: rename requirement 'non-cross' -> 'native'
Stefano Lattarini [Thu, 19 May 2011 19:48:27 +0000 (21:48 +0200)]
test defs: rename requirement 'non-cross' -> 'native'

* tests/defs.in (non-cross): Rename requirement ...
(native): ... to this, which is clearer and fits the
existing lingo better.

Suggestion by Ralf Wildenhues.

13 years agotestsuite: be more cross-compile friendly
Stefano Lattarini [Sun, 15 May 2011 12:30:43 +0000 (14:30 +0200)]
testsuite: be more cross-compile friendly

* tests/defs.in (cross_compiling): New subroutine.
(am__tool_prefix): New internal variable.
(gcc, g++, gcj): Force the use of the correct "tool prefix"
when cross compiling.
(gfortran, g77, non-cross): New requirements.

13 years agotests: fix spurious failure of txinfo21.test on FreeBSD
Stefano Lattarini [Sat, 7 May 2011 12:34:39 +0000 (14:34 +0200)]
tests: fix spurious failure of txinfo21.test on FreeBSD

* tests/txinfo21.test: Use the `is_newest' subroutine instead of
the `ls -t' hack to to determine whether a file has been updated.
This is required because at least FreeBSD `ls' do not sort files
with the same timestamp in alphabetical order when using the `-t'
option.

13 years agoChangeLog: various typofixes (and related reformatting)
Stefano Lattarini [Wed, 4 May 2011 20:42:19 +0000 (22:42 +0200)]
ChangeLog: various typofixes (and related reformatting)

13 years agotests defs: allow requirements for compilers (mostly dummy)
Stefano Lattarini [Wed, 4 May 2011 16:42:11 +0000 (18:42 +0200)]
tests defs: allow requirements for compilers (mostly dummy)

Most of the new requirements that are now accepted in `$required'
as consequence of this patch are still dummy.  They are planned
to be implemented only in master (or in some derived branch), but
having them here (even just as no-op) will allow for an easier
integration/backporting of potential new testcases.

* tests/defs.in (cc, c++, fortran, fortran77): New requirements,
still dummy.
(flex): New requirement, picking LEX for configure.
(lex): New requirement, alias for `flex'.  A more appropriate
implementation, looking for a generic `lex' program, will follow
in the future.
(yacc): New requirement, alias for `bison'.  A more appropriate
implementation, looking for a generic `yacc' program, will follow
in the future.

13 years agoMerge branch 'parallel-tests-testname-vpath-fix' into maint
Stefano Lattarini [Sun, 24 Apr 2011 08:26:58 +0000 (10:26 +0200)]
Merge branch 'parallel-tests-testname-vpath-fix' into maint

13 years agotests: fix spurious failure in a test on TESTS (VPATH-related)
Stefano Lattarini [Sun, 24 Apr 2011 08:22:05 +0000 (10:22 +0200)]
tests: fix spurious failure in a test on TESTS (VPATH-related)

* check-tests-in-builddir.test: When not using the parallel-tests
option, do not check that VPATH components are not present in the
displayed test name, since the simple-tests driver do not try to
strip them.

13 years agotest: self check subroutines for skipping/failing of tests
Stefano Lattarini [Sat, 23 Apr 2011 21:37:30 +0000 (23:37 +0200)]
test: self check subroutines for skipping/failing of tests

* tests/self-check-report.test: New test.
* tests/Makefile.am (TESTS): Update.

13 years agotest defs: new subroutines for test skipping/failing.
Jim Meyering [Sun, 16 Jan 2011 14:36:07 +0000 (15:36 +0100)]
test defs: new subroutines for test skipping/failing.

* tests/defs.in (Exit): Move definition of this function earlier.
(warn_, skip_, fail_, framework_failure_): New functions, inspired
to the homonyms in gnulib's tests/init.sh.
($stderr_fileno_): New global variable, used by the new functions
above.
* tests/README: Updated.

From a suggestion by Ralf Wildenhues.

13 years agotests: fix typo (copy & paste blunder) in heading comment
Stefano Lattarini [Sat, 23 Apr 2011 08:55:49 +0000 (10:55 +0200)]
tests: fix typo (copy & paste blunder) in heading comment

* tests/maintclean-vpath.test: Correctly refer to the sister test
as `maintclean.test', not as `maintclean-vpath.test'.

13 years agotests: remove redundant test `mclean.test'
Stefano Lattarini [Sat, 23 Apr 2011 08:48:34 +0000 (10:48 +0200)]
tests: remove redundant test `mclean.test'

* tests/mclean.test: Remove, it's a weak grepping test completely
superseded by the much more complete `maintclean.test'.
* tests/Makefile.am (TESTS): Update.

13 years agotestsuite: more environment sanitization
Stefano Lattarini [Fri, 22 Apr 2011 21:50:03 +0000 (23:50 +0200)]
testsuite: more environment sanitization

* tests/defs.in: Sanity check: abort if any of `parallel_tests'
or `required' is in the environment.
($sed_unindent_prog): Initialize to empty, to avoid interferences
from the environment.
* tests/self-check-me-in-env.test: Renamed to ...
* tests/self-check-env-sanitize.test: ... this, and extended.
* tests/Makefile.am (TESTS): Update.
(TESTS_ENVIRONMENT): Unset variables `parallel_tests' and
`required'.  Adjust comments.

13 years agoMerge branch 'me-override-fix' into maint
Stefano Lattarini [Tue, 19 Apr 2011 20:39:14 +0000 (22:39 +0200)]
Merge branch 'me-override-fix' into maint

13 years agotests: don't allow `$me' to be overridden from the environment
Stefano Lattarini [Sun, 17 Apr 2011 22:29:19 +0000 (00:29 +0200)]
tests: don't allow `$me' to be overridden from the environment

* tests/defs.in: Sanity check: abort if $me is in the environment.
* tests/self-check-me-in-env.test: New test.
* tests/Makefile.am (TESTS_ENVIRONMENT): Unset variable `me'.
(TESTS): Update.

Suggestion by Ralf Wildenhues.

13 years agotest defs: allow overriding of `$me'
Stefano Lattarini [Sun, 17 Apr 2011 15:58:45 +0000 (17:58 +0200)]
test defs: allow overriding of `$me'

* tests/defs.in ($me): Allow overriding by the including test
script.  Add some explicative comments.

13 years agoMerge branch 'tests-depcomp-extend' into maint
Stefano Lattarini [Sun, 17 Apr 2011 12:53:00 +0000 (14:53 +0200)]
Merge branch 'tests-depcomp-extend' into maint

13 years agodepcomp tests: don't reject slower dependency extractors
Stefano Lattarini [Sun, 17 Apr 2011 11:43:16 +0000 (13:43 +0200)]
depcomp tests: don't reject slower dependency extractors

* tests/depcomp8b.test: Add the `--enable-dependency-tracking'
option to the ./configure invocation, so that slower dependency
extractors are not rejects.
* tests/depcomp8b.test: Likewise.  Also ...
(foo.c): ... since we are at it, fix spacing to be consistent
with GNU coding standards.

13 years agom4: add missing serial numbers to a few files
Stefano Lattarini [Sun, 17 Apr 2011 09:21:49 +0000 (11:21 +0200)]
m4: add missing serial numbers to a few files

Related to automake bug#8483.

* m4/amversion.in: Add serial number.
* m4/auxdir.m4: Likewise.
* m4/gcj.m4: Likewise.
* m4/install-sh.m4: Likewise.
* m4/mkdirp.m4: Likewise.
* m4/python.m4: Likewise.
* m4/runlog.m4: Likewise.
* m4/strip.m4: Likewise.
* m4/upc.m4: Likewise.

13 years agoMerge branch 'fix-depcomp' into maint
Ralf Wildenhues [Sat, 16 Apr 2011 10:49:35 +0000 (12:49 +0200)]
Merge branch 'fix-depcomp' into maint

* fix-depcomp:
  depcomp: correct invalid sed invocation

13 years agodepcomp: correct invalid sed invocation
Jim Meyering [Sat, 16 Apr 2011 09:55:46 +0000 (11:55 +0200)]
depcomp: correct invalid sed invocation

* lib/depcomp: Insert missing -e before '/:$/d'.
Otherwise, that use of sed would treat '/:$/d' as a file name.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoMerge branch 'maintcheck-pathsep-fix' into maint
Stefano Lattarini [Fri, 15 Apr 2011 18:09:32 +0000 (20:09 +0200)]
Merge branch 'maintcheck-pathsep-fix' into maint

13 years agomaintainer check: quote literal `$' in Makefile rule
Stefano Lattarini [Fri, 15 Apr 2011 18:01:58 +0000 (20:01 +0200)]
maintainer check: quote literal `$' in Makefile rule

* Makefile.am (sc_tests_PATH_SEPARATOR): Escape literal `$'
character in double-quoted string.  Fix a bug in which the rule
emitted an erroneously empty substring in its error message.

13 years agoMerge branch 'expose-bug-8485' into maint
Stefano Lattarini [Fri, 15 Apr 2011 14:23:03 +0000 (16:23 +0200)]
Merge branch 'expose-bug-8485' into maint

13 years agocoverage: test for automake bug#8485 (known regression)
Stefano Lattarini [Tue, 12 Apr 2011 13:11:04 +0000 (15:11 +0200)]
coverage: test for automake bug#8485 (known regression)

* tests/yacc-dist-nobuild-subdir.test: New test.
* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.

Cherry-picked from 7ad822a39190682bc159c2f9c21c25a4273d037c.

13 years agotest defs: define default $distdir (help reducing duplication)
Stefano Lattarini [Tue, 12 Apr 2011 14:50:33 +0000 (16:50 +0200)]
test defs: define default $distdir (help reducing duplication)

* tests/defs.in ($distdir): New variable, might be used in
testcases checking distribution-related features.
* tests/pr9.test: Use it.
* tests/subdir9.test: Likewise.
* tests/vtexi3.test: Add comment explaining why we redefine
$distdir in this test.

13 years agoMerge branch 'fix-depcomp' into maint
Stefano Lattarini [Mon, 11 Apr 2011 15:06:05 +0000 (17:06 +0200)]
Merge branch 'fix-depcomp' into maint

13 years agodepcomp: fix bugs in tests and in the depcomp script
Stefano Lattarini [Mon, 11 Apr 2011 10:26:58 +0000 (12:26 +0200)]
depcomp: fix bugs in tests and in the depcomp script

* lib/depcomp (gcc): Remove duplicated `-e' from sed invocation.
* tests/depcomp10.test: Make it executable.  Fix a blunder that
has left part of an intended comment not prefixed by `#', thus
causing shell syntax errors.  In this same comment, break a
too-long reported error message on multiple lines, for clarity.
Add reference to the relevant bug report.  Add a comment which
explains why the test result 'skipped' if the first "make" call
fails.  Add other useful comments.
* tests/depcomp9.test: Slightly improve comments.

13 years agoFix hp depmode for VPATH builds with GNU make.
Ralf Wildenhues [Mon, 11 Apr 2011 05:06:08 +0000 (07:06 +0200)]
Fix hp depmode for VPATH builds with GNU make.

* lib/depcomp: Be sure to remove VPATH-prefixed object from
dependency output when creating stub rule.
* tests/depcomp10.test: New test.
* tests/Makefile.am (TESTS): Update.
* NEWS: Update.
Report by Bruno Haible.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agotest defs: fix 'javac' requirement for older JDK versions
Stefano Lattarini [Sun, 10 Apr 2011 11:38:47 +0000 (13:38 +0200)]
test defs: fix 'javac' requirement for older JDK versions

The Java compiler from JDK 1.5 (and presumably earlier versions)
cannot handle the `-version' option by itself; and while it does
print the version number, it then errors out with an usage error:
  $ javac -version
  javac 1.5.0_22
  javac: no source files
  Usage: javac <options> <source files>
  ...
Luckily, adding the `-help' option to the `javac' invocation
seems to fix this problem.

* tests/defs.in (javac): Pass also the `-help' option to the
`javac' program.  Add a comment explaining why it is needed.

Report from Ralf Wildenhues.

13 years agotest defs: new requirement for the default java compiler
Stefano Lattarini [Sun, 10 Apr 2011 07:01:37 +0000 (09:01 +0200)]
test defs: new requirement for the default java compiler

* tests/defs.in (for tool in $required): New requirement 'javac'.
* tests/java.test: Use it instead of ad-hoc configure check.
* tests/java-check.test: Likewise.
* tests/instfail-java.test: Likewise.
* tests/instdir-java.test: Likewise.

13 years agojava: check_JAVA does not cause compilation by "make all" anymore
Stefano Lattarini [Wed, 6 Apr 2011 16:49:44 +0000 (18:49 +0200)]
java: check_JAVA does not cause compilation by "make all" anymore

Fixes automake bug#8234.

* automake.in (handle_java): Make stamp of class files built from
java sources in $(check_JAVA) a dependency of `check' target, not
`all' target.
* tests/java-check.test: New test.
* tests/Makefile.am (TESTS): Update.
* NEWS: Update.
* THANKS: Update.

Report from Petteri Räty.

13 years agoClarify regex code in depcomp.
Ralf Wildenhues [Sat, 9 Apr 2011 10:38:11 +0000 (12:38 +0200)]
Clarify regex code in depcomp.

* lib/depcomp: Add comment why we don't need regex-escaping here.
Suggested by Stefano Lattarini.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoFix makedepend depmode for VPATH builds.
Ralf Wildenhues [Wed, 6 Apr 2011 20:17:01 +0000 (22:17 +0200)]
Fix makedepend depmode for VPATH builds.

* lib/depcomp [makedepend]: Remove any VPATH prefix from the
object file name, so a rebuild doesn't attempt to update the
.Po files in the source tree.
* tests/depcomp9.test: New test.
* tests/Makefile.am (TESTS): Update.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agotests: fix timestamp-related failures
Stefano Lattarini [Wed, 30 Mar 2011 16:06:29 +0000 (18:06 +0200)]
tests: fix timestamp-related failures

Fixes automake bug#8365.

* tests/aclocal6.test: Sleep before modifying m4 files that should
trigger remake rules.  Remove incorrect/obsoleted comments.
* tests/subdir5.test: Likewise, and extend a bit.
* tests/subdir8.test: Likewise.
* tests/pr8365-remake-timing.test: New xfailing test.
* tests/Makefile.am (TESTS): Update.

Report from Sam Steingold.

13 years agoCreate subdirs for generated sources even when not dep tracking.
Ralf Wildenhues [Sat, 2 Apr 2011 09:09:10 +0000 (11:09 +0200)]
Create subdirs for generated sources even when not dep tracking.

* automake.in (handle_single_transform): If $object is derived
and lands in subdir, be sure to output a dirstamp dependency.
* tests/yacc5.test: Avoid falsely matching the dirstamp
dependency when grepping for a rule.
* tests/lex-subobj-nodep.test: New test.
* tests/Makefile.am (TESTS): Update.
* THANKS: Update.
Report by Ignacy Gawedzki.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoMerge branch 'fix-check-exported-srcdir.test' into maint
Ralf Wildenhues [Sat, 2 Apr 2011 09:07:34 +0000 (11:07 +0200)]
Merge branch 'fix-check-exported-srcdir.test' into maint

* fix-check-exported-srcdir.test:
  Fix locale issue in check-exported-srcdir.test.

13 years agoFix locale issue in check-exported-srcdir.test.
Ralf Wildenhues [Sat, 2 Apr 2011 09:07:04 +0000 (11:07 +0200)]
Fix locale issue in check-exported-srcdir.test.

* tests/check-exported-srcdir.test: Reformulate glob to not fail
in a locale that ignores or interleaves character case.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agodocs: better visibility for aclocal in the index
Stefano Lattarini [Thu, 17 Mar 2011 10:13:29 +0000 (11:13 +0100)]
docs: better visibility for aclocal in the index

* doc/automake.texi (@menu): Rename title for entry 'configure'
from "Scanning configure.ac or configure.in" to the more precise
"Scanning configure.ac, using aclocal".
(@detailmenu): Adjust.
(@node configure): Adjust, and extend @cindex calls accordingly.
* THANKS: Update.

From a report by Maynard Johnson.

13 years agotests: improve tests on "maintainer-clean" target
Stefano Lattarini [Wed, 30 Mar 2011 10:48:42 +0000 (12:48 +0200)]
tests: improve tests on "maintainer-clean" target

* tests/aclocal6.test: Move checks related to "maintainer-clean"
functionalities into ...
* tests/maintclean-vpath.test: ... this new test.
* tests/maintclean.test: Update heading comments.  Extend to also
test subdirs.  Remove useless disabling of YACC.  Fix m4 quoting
in configure.in.  Add a trailing `:' command.
* tests/Makefile.am (TESTS): Update.

13 years agoMerge branch 'fix-unindent' into maint
Ralf Wildenhues [Mon, 21 Mar 2011 21:14:25 +0000 (22:14 +0100)]
Merge branch 'fix-unindent' into maint

* fix-unindent:
  tests: fix unindent to use printf not echo for script.

13 years agotests: fix unindent to use printf not echo for script.
Ralf Wildenhues [Mon, 21 Mar 2011 21:12:07 +0000 (22:12 +0100)]
tests: fix unindent to use printf not echo for script.

* tests/defs.in: Use printf rather than echo, as the latter may
interpret the backslashes in the sed script.  Fixes test
failures with dash as /bin/sh.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agomaintcheck: look for problematic names of testcases
Stefano Lattarini [Mon, 14 Mar 2011 11:44:53 +0000 (12:44 +0100)]
maintcheck: look for problematic names of testcases

The configure.in stub created by default by `tests/defs' obtains
the first argument of AC_INIT from the test name, and this can
cause some supported autoconf versions to fail with a spurious
error if that test name contains the name of an m4 or m4sugar
builtin or macro (e.g., `defn' or `m4_undefine').

See for example the bug fixed by commit v1.11-287-g1325a8a.

This change add a maintainer check that warns about test names
which are possibly problematic in this regard.

* Makefile.am (sc_test_names): New maintainer-check target.
(syntax_check_rules): Add it.
(m4_builtins): New helper variable.
(TESTS): Updated according to the following renamings.
* tests/include.test: Renamed ...
* tests/hdr-vars-defined-once.test: ... to this.
* tests/sinclude.test: Renamed ...
* tests/m4-inclusion.test: ... to this, and simplified
accordingly.
* tests/include2.test: Renamed ...
* tests/dist-included-parent-dir.test: ... to this, for
consistency.

13 years agotests: fix bug in alloca*.test
Stefano Lattarini [Sat, 5 Mar 2011 00:57:36 +0000 (01:57 +0100)]
tests: fix bug in alloca*.test

* tests/alloca.test: Make grepping of automake stderr stricter,
add a trailing `:' command; also, add AC_PROG_CC to configure.in,
and create a dummy alloca.c file, to ensure that we fail for the
proper reason.
* tests/alloca2.test: Likewise.  Also, look for LT_INIT, not
AC_PROG_LIBTOOL, in the error message (bug introduced with commit
v1.11-315-gd51e7b7 "libtool: suggest LT_INIT if LTLIBRARIES
primary is used").

From a report by Patrick Welche.

13 years agoMerge branch 'tests-texinfo' into maint
Stefano Lattarini [Fri, 4 Mar 2011 18:09:54 +0000 (19:09 +0100)]
Merge branch 'tests-texinfo' into maint

13 years agotests: fix bug (comments-in-var-defn.test + autoconf 2.62)
Stefano Lattarini [Thu, 3 Mar 2011 18:22:55 +0000 (19:22 +0100)]
tests: fix bug (comments-in-var-defn.test + autoconf 2.62)

* tests/comments-in-var-defn.test: The configure.in stub created
by default, which has the AC_INIT first argument obtained by the
test name, causes autoconf 2.62 to fail with a spurious error
message like: "configure.in:1: error: defn: undefined macro:".
Thus, to prevent this, the test is renamed to ...
* tests/comments-in-var-def.test: ... this.
* tests/Makefile.am (TESTS): Updated.

13 years agocosmetics: convert encoding from ISO-8859 to UTF-8
Stefano Lattarini [Fri, 4 Mar 2011 08:25:49 +0000 (09:25 +0100)]
cosmetics: convert encoding from ISO-8859 to UTF-8

* ChangeLog.03: Convert encoding to UTF-8.
* ChangeLog.96: Likewise.
* ChangeLog.98: Likewise.
* NEWS: Likewise.
* TODO: Likewise.

13 years agotest defs: unindent without temporary file
Peter Rosin [Tue, 1 Mar 2011 07:25:24 +0000 (08:25 +0100)]
test defs: unindent without temporary file

* tests/defs.in (commented_sed_unindent_prog): Commented Sed program
that strips the "proper" amount of leading whitespace.
(unindent): Lazily strip comments from the above program and use it
to unindent without using a temporary file.

Signed-off-by: Peter Rosin <peda@lysator.liu.se>
13 years agolibtool: suggest LT_INIT if LTLIBRARIES primary is used
Stefano Lattarini [Thu, 24 Feb 2011 09:21:19 +0000 (10:21 +0100)]
libtool: suggest LT_INIT if LTLIBRARIES primary is used

When the LTLIBRARIES primary was used, but $(LIBTOOL) wasn't
defined, automake suggested to add a call to AC_PROG_LIBTOOL
in configure.ac.  But that macro is deprecated since Libtool
version 1.9b (2004-08-29), in favor of the newer LT_INIT.  So
suggest the use of this latter macro instead.

* lib/Automake/Variable.pm (%_am_macro_for_var): Pair 'LIBTOOL'
with 'LT_INIT', not with 'AC_PROG_LIBTOOL'.
* libtool4.test: Adjust and extend.  Also, add a call to macro
AC_PROG_CC in configure.in, to help ensuring that automake does
not fail for the wrong reasons.
* ltinit.test: New test, ensure that automake's libtool support
works with LT_INIT-based interface.

Thanks to Jack Kelly for the suggestion.

13 years agotests: tempdirs with restrictive permissions are cleaned correctly
Stefano Lattarini [Wed, 16 Feb 2011 19:43:22 +0000 (20:43 +0100)]
tests: tempdirs with restrictive permissions are cleaned correctly

Before this change, the removal of a temporary test directory
containing subdirectories with restrictive permissions (such as
'r--r--r--') could fail.

* tests/defs: Ensure that all the subdirectories of a temporary
test directory have the 'read', 'write' and 'execute' bits set,
before trying to remove it with `rm -rf'.
* tests/Makefile.am (clean-local-check): Likewise.

13 years agotest defs: add subroutine for input unindenting
Stefano Lattarini [Tue, 15 Feb 2011 11:45:28 +0000 (12:45 +0100)]
test defs: add subroutine for input unindenting

* tests/defs.in (unindent): New subroutine.

13 years agopython: report the 'PYTHON' influential environment variable
Stefano Lattarini [Mon, 31 Jan 2011 20:24:02 +0000 (21:24 +0100)]
python: report the 'PYTHON' influential environment variable

* m4/python.m4 (AM_PATH_PYTHON): Call AC_ARG_VAR on PYTHON.
* doc/automake.texi (Python): Update and extend.
* tests/help-python.test: New test.
* tests/Makefile.am (TESTS): Update.
* THANKS (Jack Kelly): Update e-mail address.

Suggestion by Jack Kelly.

13 years agotests defs: clear TESTS_ENVIRONMENT variable
Stefano Lattarini [Thu, 10 Feb 2011 09:46:21 +0000 (10:46 +0100)]
tests defs: clear TESTS_ENVIRONMENT variable

* tests/defs.in (TESTS_ENVIRONMENT): Unset it, so that values
from environment won't interfere with the testcases.

Suggestion by Ralf Wildenhues.

13 years agotests: tweak few tests on simple and parallel test drivers
Stefano Lattarini [Sun, 6 Feb 2011 18:43:22 +0000 (19:43 +0100)]
tests: tweak few tests on simple and parallel test drivers

* tests/check-exported-srcdir.test: Improve heading comments.
* tests/check-tests-in-builddir.test: Likewise.  Also, unset the
`FOO_EXIT_STATUS' variable, so that any pre-existing value in the
environment won't risk to interfere with the test.

Suggestions by Ralf Wildenhues.

13 years agocoverage: more tests on simple and parallel test drivers
Stefano Lattarini [Mon, 24 Jan 2011 14:56:52 +0000 (15:56 +0100)]
coverage: more tests on simple and parallel test drivers

* tests/parallel-tests-subdir.test: New test.
* tests/check-exported-srcdir.test: Likewise.
* tests/check-tests-in-builddir.test: Likewise.
* tests/check-tests_environment.test: Likewise.
* tests/Makefile.am (TESTS): Update.

13 years agoMerge branch 'lflags-test-fixes' into maint
Stefano Lattarini [Sat, 29 Jan 2011 17:47:39 +0000 (18:47 +0100)]
Merge branch 'lflags-test-fixes' into maint

13 years agotests: fix spurious failures in lflags*.test
Stefano Lattarini [Sat, 29 Jan 2011 17:35:45 +0000 (18:35 +0100)]
tests: fix spurious failures in lflags*.test

* tests/lflags.test: Remove 'LEX' from the environment, so
that it won't be erroneously picked up by `make -e'.
* tests/lflags2.test: Likewise.

13 years agodocs: color-tests issues with parallel make
Stefano Lattarini [Mon, 24 Jan 2011 21:26:55 +0000 (22:26 +0100)]
docs: color-tests issues with parallel make

* doc/automake.texi (Simple Tests): Document that automatic
recognition of a capable terminal attached to stdout can fail
with some make implementation when running in parallel mode,
thus causing colored test output not to be automatically
activated when it should.

13 years agotests: avoid instspc.test failures due to make's whitespace trimming
Ralf Wildenhues [Sun, 23 Jan 2011 10:26:50 +0000 (11:26 +0100)]
tests: avoid instspc.test failures due to make's whitespace trimming

* tests/instspc.test: Prepend './' when passing the test
characters, to avoid leading whitespace characters to be trimmed
from macros set from environment variables.  Fixes testsuite
failures with HP-UX, IRIX, and Tru64/OSF make.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agocoverage: test semantics of "dummy" per-target flags
Stefano Lattarini [Sat, 22 Jan 2011 17:09:51 +0000 (18:09 +0100)]
coverage: test semantics of "dummy" per-target flags

* tests/specflg-dummy.test: New test, ensuring that even "dummy"
per-target flags triggers the use of renamed objects.
* tests/Makefile.am (TESTS): Update.

Suggestion by Ralf Wildenhues.

13 years agotests defs: sanitize IFS
Stefano Lattarini [Sun, 23 Jan 2011 11:54:35 +0000 (12:54 +0100)]
tests defs: sanitize IFS

* tests/defs.in ($IFS): Define to <space>, <tab>, <newline>.
($sp): New variable, holding a single whitespace character.
($tab): New variable, holding a tabulation character.
($nl): New variable, holding a newline character.

13 years agoMerge branch 'vpath-autoexp-fix-maint' into maint
Ralf Wildenhues [Sat, 22 Jan 2011 17:21:45 +0000 (18:21 +0100)]
Merge branch 'vpath-autoexp-fix-maint' into maint

* vpath-autoexp-fix-maint:
  tests: fix VPATH auto-expansion workarounds.

13 years agotests: fix VPATH auto-expansion workarounds.
Ralf Wildenhues [Sat, 22 Jan 2011 17:20:41 +0000 (18:20 +0100)]
tests: fix VPATH auto-expansion workarounds.

* tests/parallel-tests8.test, tests/suffix13.test:
Ensure $< is not surrounded by white space, to prevent Solaris
make from applying automatic VPATH text expansion.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoMerge branch 'yflags-test-fixes' into maint
Stefano Lattarini [Sat, 22 Jan 2011 13:50:20 +0000 (14:50 +0100)]
Merge branch 'yflags-test-fixes' into maint

13 years agotests: fix spurious failures in yflags*.test
Stefano Lattarini [Sat, 22 Jan 2011 12:32:14 +0000 (13:32 +0100)]
tests: fix spurious failures in yflags*.test

* tests/yflags.test: Remove 'YACC' from the environment, so
that it won't be erroneously picked up by `make -e'.
* tests/yflags2.test: Likewise.

13 years agotests: avoid fn99*.test failures due to buggy AIX 5.3 cp -R.
Ralf Wildenhues [Sat, 22 Jan 2011 12:46:27 +0000 (13:46 +0100)]
tests: avoid fn99*.test failures due to buggy AIX 5.3 cp -R.

* tests/fn99.test, tests/fn99subdir.test: Skip if an initial
`cp -R' of the subdir tree already fails; AIX 5.3 cp messes
up its internal memory when copying this tree.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoAdd comment to check-TESTS rule working around make 3.80 bug.
Ralf Wildenhues [Sat, 22 Jan 2011 10:16:06 +0000 (11:16 +0100)]
Add comment to check-TESTS rule working around make 3.80 bug.

* lib/am/check.am (check-TESTS): Update comment.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agotests: less strict double-colon spy.test again.
Ralf Wildenhues [Thu, 20 Jan 2011 20:29:42 +0000 (21:29 +0100)]
tests: less strict double-colon spy.test again.

* tests/spy.test: We know BSD make doesn't invoke more than one
double-colon rule, so no need to expose that failure.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoinstall-sh: avoid Tru64 sh `test' operator precedence issues.
Ralf Wildenhues [Wed, 19 Jan 2011 20:50:02 +0000 (21:50 +0100)]
install-sh: avoid Tru64 sh `test' operator precedence issues.

* lib/install-sh: Protect file names and directory components
that consist of `=', `(', `)', or `!'.  Move protection as early
as possible, to avoid errors such as with Tru64 sh `test -z ='.
* tests/instsh2.test: Extend test to cover more possibilities.
Fixes 1.12 instspc-equal-install.test failure on Tru64/OSF 5.1.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agodocs: automake testsuite doesn't use TESTS_ENVIRONMENT anymore
Stefano Lattarini [Wed, 19 Jan 2011 19:20:37 +0000 (20:20 +0100)]
docs: automake testsuite doesn't use TESTS_ENVIRONMENT anymore

* doc/automake.texi (Simple Tests): Do not claim Automake uses
TESTS_ENVIRONMENT for the perl driver.  Instead, point to the
parallel-tests driver.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoAllow _AM_DEPENDENCIES to be used later in configure.
Ralf Wildenhues [Wed, 19 Jan 2011 18:46:27 +0000 (19:46 +0100)]
Allow _AM_DEPENDENCIES to be used later in configure.

* m4/depend.m4 (_AM_DEPENDENCIES): Remove a previously existing
conftest.dir before recreating it.
Fixes bug#7864.
Report by Eric Blake, from report by Scott McCreary against M4.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agotests: avoid failure on w32 file systems.
Ralf Wildenhues [Tue, 18 Jan 2011 22:11:54 +0000 (23:11 +0100)]
tests: avoid failure on w32 file systems.

* tests/parallel-tests-unreadable-log.test: SKIP if file cannot
be turned unreadable.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agotests: allow double-colon spy.test to work with HP-UX make.
Ralf Wildenhues [Sun, 16 Jan 2011 21:27:37 +0000 (22:27 +0100)]
tests: allow double-colon spy.test to work with HP-UX make.

* tests/spy.test: Fix comment typos.  Ensure prerequisites we
do not want to depend on are strictly older than the target.
Also test with a target out of date wrt. more than one rule.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agotests: remove useless requirements from cond36.test
Stefano Lattarini [Sun, 16 Jan 2011 18:23:12 +0000 (19:23 +0100)]
tests: remove useless requirements from cond36.test

* tests/cond36.test ($required): Remove.
Since we are at it, add a trailing `:' command.

13 years agoparallel-tests: work around Tru64/OSF 5.1 sh read bugs.
Ralf Wildenhues [Sun, 16 Jan 2011 12:48:17 +0000 (13:48 +0100)]
parallel-tests: work around Tru64/OSF 5.1 sh read bugs.

* lib/am/check.am ($(TEST_SUITE_LOG), recheck, recheck-html):
Test file readability before redirecting input from it, to avoid
exiting Tru64/OSF 5.1 sh which treats read as special builtin.
* tests/parallel-tests-unreadable-log.test: New test.
* tests/Makefile.am (TESTS): Update.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years ago* NEWS, README: Update copyright years.
Ralf Wildenhues [Sun, 16 Jan 2011 12:54:57 +0000 (13:54 +0100)]
* NEWS, README: Update copyright years.

13 years agoFix parallel-tests.test failure with HP-UX make.
Ralf Wildenhues [Sun, 16 Jan 2011 11:12:51 +0000 (12:12 +0100)]
Fix parallel-tests.test failure with HP-UX make.

* tests/parallel-tests.test: Sleep inside inner tests, so logs
are newer than logs of tests they depend on, for HP-UX make.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoRevert "tests: avoid new failures due to nonexistent makeinfo."
Ralf Wildenhues [Sun, 16 Jan 2011 11:14:03 +0000 (12:14 +0100)]
Revert "tests: avoid new failures due to nonexistent makeinfo."

This reverts commit 7a42b52f626f3b713196b5946b9bfbb3e173226b.

13 years agoMerge branch 'tests-texinfo' into maint
Ralf Wildenhues [Sun, 16 Jan 2011 09:11:25 +0000 (10:11 +0100)]
Merge branch 'tests-texinfo' into maint

* tests-texinfo:
  tests: avoid new failures due to nonexistent makeinfo.

13 years agotests: avoid new failures due to nonexistent makeinfo.
Ralf Wildenhues [Sun, 16 Jan 2011 09:09:57 +0000 (10:09 +0100)]
tests: avoid new failures due to nonexistent makeinfo.

* tests/txinfo.test, tests/txinfo8.test: Create stub info files
so 'missing --run makeinfo' won't fail even if makeinfo is not
present.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agodocs: ensure example are separated with empty lines in the input
Ralf Wildenhues [Sat, 15 Jan 2011 13:54:51 +0000 (14:54 +0100)]
docs: ensure example are separated with empty lines in the input

* doc/automake.texi (Extending aclocal, Emacs Lisp, Rebuilding)
(API Versioning, Renamed Objects, Multiple Outputs): Add empty
lines before `@example' and after `@end example' lines, so info
output is rendered correctly, and a following @noindent honored.
Report by Stefano Lattarini.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agotests: fix comment typo
Jim Meyering [Thu, 14 Oct 2010 14:39:22 +0000 (16:39 +0200)]
tests: fix comment typo

* tests/substref.test: Fix grammar in a comment.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoMerge branch 'tests-texinfo' into maint
Stefano Lattarini [Thu, 13 Jan 2011 20:35:05 +0000 (21:35 +0100)]
Merge branch 'tests-texinfo' into maint

13 years agotests: fix spurious failures in two texinfo tests
Stefano Lattarini [Thu, 13 Jan 2011 19:56:04 +0000 (20:56 +0100)]
tests: fix spurious failures in two texinfo tests

* tests/txinfo.test ($required): Add 'makeinfo'.
* tests/txinfo8.test: Create a dummy 'textutils.info' file, so
that make won't try to run makeinfo (which could be unavailable)
to build it.
Found by NixOS Hydra, reported by Ralf Wildenhues.

13 years agoAvoid testsuite failures due to Autoconf Fortran change.
Ralf Wildenhues [Thu, 13 Jan 2011 19:21:39 +0000 (20:21 +0100)]
Avoid testsuite failures due to Autoconf Fortran change.

Autoconf v2.68-21-g727ce95 causes AC_F77_LIBRARY_LDFLAGS to
require computing the canonical host name.  Ensure config.guess
and config.sub files are present for respective checks.

* tests/compile_f_c_cxx.test: Add stub files.
* tests/flibs.test: Likewise.
* tests/fort4.test: Use $AUTOMAKE -a for installing files.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13 years agoMerge branch 'doc-yacc-d-improve' into maint
Stefano Lattarini [Wed, 12 Jan 2011 22:44:02 +0000 (23:44 +0100)]
Merge branch 'doc-yacc-d-improve' into maint