]> git.ipfire.org Git - thirdparty/automake.git/log
thirdparty/automake.git
13 years agotests: relax a grepping check on configure output
Stefano Lattarini [Mon, 23 Jul 2012 14:20:49 +0000 (16:20 +0200)] 
tests: relax a grepping check on configure output

* t/subpkg.sh: Here: do not expect the C compiler to be simply
named 'cc'.  This was causing spurious failures when $CC was
overridden at configure time or though config.site.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/many-tests' into ng/master
Stefano Lattarini [Mon, 23 Jul 2012 12:47:05 +0000 (14:47 +0200)] 
Merge branch 'ng/many-tests' into ng/master

* ng/many-tests:
  [ng] check: in recipes, don't use pipe when redirection suffices
  [ng] recheck: don't exceed command line limits, even with many failed tests
  [ng] coverage: recheck with many failed tests
  [ng] check: refactor for less duplication and better performances
  [ng] check: use awk rather than grep+xargs to count test results
  [ng] parallel-tests: do not exceed command line length limits
  [ng] coverage: testing with lots of test scripts

13 years ago[ng] news: remove duplicated header
Stefano Lattarini [Mon, 23 Jul 2012 10:28:16 +0000 (12:28 +0200)] 
[ng] news: remove duplicated header

* NG-NEWS (Obsolete Features Removed): This.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: ACLOCAL_M4 -> am.remake.aclocal-m4
Stefano Lattarini [Sun, 22 Jul 2012 16:26:55 +0000 (18:26 +0200)] 
[ng] rename: ACLOCAL_M4 -> am.remake.aclocal-m4

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__configure_deps -> am.remake.configure-deps
Stefano Lattarini [Sun, 22 Jul 2012 16:14:48 +0000 (18:14 +0200)] 
[ng] rename: am__configure_deps -> am.remake.configure-deps

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__aclocal_m4_deps -> am.remake.aclocal-m4-deps
Stefano Lattarini [Sun, 22 Jul 2012 16:10:04 +0000 (18:10 +0200)] 
[ng] rename: am__aclocal_m4_deps -> am.remake.aclocal-m4-deps

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__config_aux_dir -> am.conf.aux-dir
Stefano Lattarini [Sun, 22 Jul 2012 15:59:13 +0000 (17:59 +0200)] 
[ng] rename: am__config_aux_dir -> am.conf.aux-dir

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] yacc, lex: avoid extra forks in non-VPATH builds
Stefano Lattarini [Sun, 22 Jul 2012 12:44:10 +0000 (14:44 +0200)] 
[ng] yacc, lex: avoid extra forks in non-VPATH builds

* lib/am/yacc.am, lib/am/lex.am: Use $(am__ensure_dir_exists) instead
of hand-rolled poor-man equivalent to ensure the directory of the
target exists.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__skiplex -> am.lex.maybe-skip
Stefano Lattarini [Sun, 22 Jul 2012 12:00:46 +0000 (14:00 +0200)] 
[ng] rename: am__skiplex -> am.lex.maybe-skip

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__skipyacc -> am.yacc.maybe-skip
Stefano Lattarini [Sun, 22 Jul 2012 11:57:25 +0000 (13:57 +0200)] 
[ng] rename: am__skipyacc -> am.yacc.maybe-skip

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__yacc_c2h -> am.yacc.c2h
Stefano Lattarini [Sun, 22 Jul 2012 11:55:09 +0000 (13:55 +0200)] 
[ng] rename: am__yacc_c2h -> am.yacc.c2h

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] fixup: remove an obsolete "FIXME" comment
Stefano Lattarini [Sun, 22 Jul 2012 11:43:39 +0000 (13:43 +0200)] 
[ng] fixup: remove an obsolete "FIXME" comment

* lib/am/clean.am: In here, about the need to break too long lists
of files to be cleaned in order to avoid exceeding command line
limits.  We already do that successfully!

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] typofix: fixed typos in comments and README
Stefano Lattarini [Sun, 22 Jul 2012 11:34:29 +0000 (13:34 +0200)] 
[ng] typofix: fixed typos in comments and README

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: enhance spy tests on pattern rulesn
Stefano Lattarini [Sun, 22 Jul 2012 06:53:14 +0000 (08:53 +0200)] 
[ng] tests: enhance spy tests on pattern rulesn

* t/spy-pattern-rules.sh : Fix heading comments to be more faithful
about what the test really checks.  Add more tests checking that, in
case of overlapping pattern rules, the one "more specific", i.e.,
with the shortest target stem, wins.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: in recipes, don't use pipe when redirection suffices
Stefano Lattarini [Sun, 22 Jul 2012 09:31:32 +0000 (11:31 +0200)] 
[ng] check: in recipes, don't use pipe when redirection suffices

Instead of the botched idiom:

    while read c; do echo $c; done <file | command

use the simpler and much better one:

    command <file

Not only the latter is simpler and marginally more efficient, but is also
better at catching possible unexpected I/O errors; while in the former,
the exit status of the while loop (which might have revealed such errors)
was lost in the pipeline.

* lib/am/parallel-tests.am ($(TEST_SUITE_LOG), recheck): Use the better
idiom.

Co-authored-by: Akim Demaille <akim@lrde.epita.fr>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] recheck: don't exceed command line limits, even with many failed tests
Stefano Lattarini [Sat, 21 Jul 2012 08:13:58 +0000 (10:13 +0200)] 
[ng] recheck: don't exceed command line limits, even with many failed tests

Related to automake bug#7868.

* lib/am/parallel-tests.sh (recheck): Arrange recursive make invocation
to pass the list of tests to be rechecked in the make standard input
rather than on the make command line.
(am__test_bases): Only define if not already set, to make the new idiom
referenced above work as expected.
* Makefile.am (XFAIL_TESTS): Remove 't/parallel-tests-many.sh' once
again.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: recheck with many failed tests
Stefano Lattarini [Fri, 20 Jul 2012 18:53:57 +0000 (20:53 +0200)] 
[ng] coverage: recheck with many failed tests

* t/parallel-tests-many.sh: Extend to check that the 'recheck' target
works even when a huge number of tests (~ 30k) have failed in the
previous testsuite run.  Currently this doesn't work, and causes the
test to fail, so list it ...
* Makefile.am (XFAIL_TESTS): ... in here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: refactor for less duplication and better performances
Stefano Lattarini [Fri, 20 Jul 2012 17:38:20 +0000 (19:38 +0200)] 
[ng] check: refactor for less duplication and better performances

* lib/am/parallel-tests.am (am__count_test_results): Adjust this awk
program to emit a shell snippet to be executed by the calling recipe ...
($(TEST_SUITE_LOG)): ... here.  This avoid the need to call the program
in $(am__count_test_results) once for each valid test result.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] check: use awk rather than grep+xargs to count test results
Stefano Lattarini [Fri, 20 Jul 2012 14:37:50 +0000 (16:37 +0200)] 
[ng] check: use awk rather than grep+xargs to count test results

* lib/am/parallel-tests.am ($(TEST_SUITE_LOG)): Here, with the help
of ...
(am__count_test_results): ... this new internal variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] parallel-tests: do not exceed command line length limits
Stefano Lattarini [Fri, 20 Jul 2012 10:28:46 +0000 (12:28 +0200)] 
[ng] parallel-tests: do not exceed command line length limits

Fixes automake bug#7868.

Two things worth noting:

 + a "make recheck" issued after a huge number of tests have failed
   can still hit command-line length issues;

 + the check-recipes now contain (first among the Automake-generated
   recipes) a use of the 'xargs' utility.

These issues will likely be tackled by later patches.

* Makefile.am (XFAIL_TESTS): Remove 't/parallel-tests-many.sh'.
* lib/am/clean.am (.am.clean-cmd.f, .am.clean-cmd.d, .am.rm-f,
.am.rm-rf): Move their definitions ...
* lib/am/header-vars.am: ... here, because we need to use them ...
* lib/am/parallel-tests.am: ... here as well.
(am.test-harness.workdir, am.setup-test-harness-workdir,
am.test-harness.append-to-list-of-bases): New internal variables.
Use them to avoid hitting command-line length limits ...
($(TEST_SUITE_LOG), recheck): ... in this rules ...
(am__remove_if_not_lazy_check): ... and in the shell code defined
by this internal variable.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: testing with lots of test scripts
Stefano Lattarini [Thu, 19 Jul 2012 11:42:19 +0000 (13:42 +0200)] 
[ng] coverage: testing with lots of test scripts

See long-standing automake bug#7868.

* t/parallel-tests-many.sh: Simplify and enhance.  Among other things,
this test now tries running ~ 30k tests.  Currently fails on several
systems (e.g., Linux 2.6.30 on i686, Solaris 10 on i86pc).

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] maintcheck: fix a spurious failure
Stefano Lattarini [Sat, 21 Jul 2012 17:50:54 +0000 (19:50 +0200)] 
[ng] maintcheck: fix a spurious failure

* t/clean-many2.sh: Add redundant quoting to 'rm', to avoid triggering
a failure in the 'sc_rm_minus_f' maintainer check.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/renames' into ng/master
Stefano Lattarini [Sat, 21 Jul 2012 16:56:42 +0000 (18:56 +0200)] 
Merge branch 'ng/renames' into ng/master

* ng/renames: (33 commits)
  [ng] rename: am__relativize -> am.dist.relativize-path
  [ng] rename: am__canon -> am.util.canon
  [ng] rename: am__toupper -> am.util.toupper
  [ng] rename: am__tolower -> am.util.tolower
  [ng] rename: am__using_parallel_tests -> am.conf.using-parallel-tests
  [ng] rename: am__vpath_rewrite -> am.vpath.rewrite
  [ng] rename: am__handle_exeext -> am.conf.handle-exeext
  [ng] rename: am__private_suffix -> am.hack.private-suffix
  [ng] rename: am__strip_suffixes -> am.util.strip-suffixes
  [ng] am__strip_suffixes: use $0 for recursive invocations
  [ng] rename: am__uniq -> am.util.uniq
  [ng] am__uniq: use $0 for recursive invocations
  [ng] rename: am__strip_lastword -> am.util.strip-last-word
  [ng] rename: am__strip_firstword -> am.util.strip-first-word
  [ng] rename: am__make_dryrun -> am.make.dry-run
  [ng] rename: am__empty -> am.chars.empty
  [ng] cosmetics: fix an imprecise comment
  [ng] rename: am__squote -> am.chars.squote
  [ng] rename: am__dquote -> am.chars.dquote
  [ng] rename: am__bquote -> am.chars.bquote
  ...

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: inline '&handle_install'
Stefano Lattarini [Sat, 21 Jul 2012 13:52:07 +0000 (15:52 +0200)] 
[ng] automake: inline '&handle_install'

* automake.in (handle_install): Delete, inlined ...
(generate_makefile): ... in here, as it had become a
trivial one-liner.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] automake: new function &almost_verbatim (small refactoring)
Stefano Lattarini [Sat, 21 Jul 2012 13:49:25 +0000 (15:49 +0200)] 
[ng] automake: new function &almost_verbatim (small refactoring)

* automake.in (almost_verbatim): New function, thin wrapper around
'&preprocess_file'.  It requires just the name of the fragment to
preprocess (assuming it is one provided by automake, and thus taking
care to prepend the "$libdir/am/" path and append the ".am" extension
automatically), and then automatically append the processed content
to the '$output_verbatim' global variable.
(handle_all_and_check, handle_install, handle_texinfo): Adjust to use
'&almost_verbatim' instead of '&preprocess_file'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__relativize -> am.dist.relativize-path
Stefano Lattarini [Sat, 21 Jul 2012 12:43:14 +0000 (14:43 +0200)] 
[ng] rename: am__relativize -> am.dist.relativize-path

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__canon -> am.util.canon
Stefano Lattarini [Sat, 21 Jul 2012 12:35:02 +0000 (14:35 +0200)] 
[ng] rename: am__canon -> am.util.canon

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__toupper -> am.util.toupper
Stefano Lattarini [Sat, 21 Jul 2012 12:33:02 +0000 (14:33 +0200)] 
[ng] rename: am__toupper -> am.util.toupper

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__tolower -> am.util.tolower
Stefano Lattarini [Sat, 21 Jul 2012 12:31:20 +0000 (14:31 +0200)] 
[ng] rename: am__tolower -> am.util.tolower

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__using_parallel_tests -> am.conf.using-parallel-tests
Stefano Lattarini [Sat, 21 Jul 2012 12:27:39 +0000 (14:27 +0200)] 
[ng] rename: am__using_parallel_tests -> am.conf.using-parallel-tests

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__vpath_rewrite -> am.vpath.rewrite
Stefano Lattarini [Sat, 21 Jul 2012 12:22:49 +0000 (14:22 +0200)] 
[ng] rename: am__vpath_rewrite -> am.vpath.rewrite

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__handle_exeext -> am.conf.handle-exeext
Stefano Lattarini [Sat, 21 Jul 2012 12:15:40 +0000 (14:15 +0200)] 
[ng] rename: am__handle_exeext -> am.conf.handle-exeext

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__private_suffix -> am.hack.private-suffix
Stefano Lattarini [Sat, 21 Jul 2012 12:13:10 +0000 (14:13 +0200)] 
[ng] rename: am__private_suffix -> am.hack.private-suffix

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__strip_suffixes -> am.util.strip-suffixes
Stefano Lattarini [Sat, 21 Jul 2012 12:10:37 +0000 (14:10 +0200)] 
[ng] rename: am__strip_suffixes -> am.util.strip-suffixes

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] am__strip_suffixes: use $0 for recursive invocations
Stefano Lattarini [Sat, 21 Jul 2012 12:08:26 +0000 (14:08 +0200)] 
[ng] am__strip_suffixes: use $0 for recursive invocations

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__uniq -> am.util.uniq
Stefano Lattarini [Sat, 21 Jul 2012 12:06:38 +0000 (14:06 +0200)] 
[ng] rename: am__uniq -> am.util.uniq

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] am__uniq: use $0 for recursive invocations
Stefano Lattarini [Sat, 21 Jul 2012 11:57:15 +0000 (13:57 +0200)] 
[ng] am__uniq: use $0 for recursive invocations

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__strip_lastword -> am.util.strip-last-word
Stefano Lattarini [Sat, 21 Jul 2012 11:53:50 +0000 (13:53 +0200)] 
[ng] rename: am__strip_lastword -> am.util.strip-last-word

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__strip_firstword -> am.util.strip-first-word
Stefano Lattarini [Sat, 21 Jul 2012 11:51:47 +0000 (13:51 +0200)] 
[ng] rename: am__strip_firstword -> am.util.strip-first-word

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__make_dryrun -> am.make.dry-run
Stefano Lattarini [Sat, 21 Jul 2012 11:47:26 +0000 (13:47 +0200)] 
[ng] rename: am__make_dryrun -> am.make.dry-run

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__empty -> am.chars.empty
Stefano Lattarini [Sat, 21 Jul 2012 11:44:28 +0000 (13:44 +0200)] 
[ng] rename: am__empty -> am.chars.empty

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: fix an imprecise comment
Stefano Lattarini [Sat, 21 Jul 2012 10:16:51 +0000 (12:16 +0200)] 
[ng] cosmetics: fix an imprecise comment

* lib/am/header-vars.am (am__empty): About this.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__squote -> am.chars.squote
Stefano Lattarini [Sat, 21 Jul 2012 10:16:04 +0000 (12:16 +0200)] 
[ng] rename: am__squote -> am.chars.squote

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__dquote -> am.chars.dquote
Stefano Lattarini [Sat, 21 Jul 2012 10:15:43 +0000 (12:15 +0200)] 
[ng] rename: am__dquote -> am.chars.dquote

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__bquote -> am.chars.bquote
Stefano Lattarini [Sat, 21 Jul 2012 10:15:10 +0000 (12:15 +0200)] 
[ng] rename: am__bquote -> am.chars.bquote

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__rparen -> am.chars.rparen
Stefano Lattarini [Sat, 21 Jul 2012 10:14:26 +0000 (12:14 +0200)] 
[ng] rename: am__rparen -> am.chars.rparen

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__lparen -> am.chars.lparen
Stefano Lattarini [Sat, 21 Jul 2012 10:13:32 +0000 (12:13 +0200)] 
[ng] rename: am__lparen -> am.chars.lparen

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__pound -> am.chars.hash
Stefano Lattarini [Sat, 21 Jul 2012 10:12:37 +0000 (12:12 +0200)] 
[ng] rename: am__pound -> am.chars.hash

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__dollar -> am.chars.dollar
Stefano Lattarini [Sat, 21 Jul 2012 10:11:51 +0000 (12:11 +0200)] 
[ng] rename: am__dollar -> am.chars.dollar

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__comma -> am.chars.comma
Stefano Lattarini [Sat, 21 Jul 2012 10:10:52 +0000 (12:10 +0200)] 
[ng] rename: am__comma -> am.chars.comma

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__bslash -> am.chars.bslash
Stefano Lattarini [Sat, 21 Jul 2012 10:10:15 +0000 (12:10 +0200)] 
[ng] rename: am__bslash -> am.chars.bslash

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__seen_error -> am.error.seen
Stefano Lattarini [Sat, 21 Jul 2012 10:00:19 +0000 (12:00 +0200)] 
[ng] rename: am__seen_error -> am.error.seen

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] cosmetics: improve a comment
Stefano Lattarini [Sat, 21 Jul 2012 09:57:44 +0000 (11:57 +0200)] 
[ng] cosmetics: improve a comment

* automake.in (generate_makefile): In here, about the generated
Makefile baling out if '$(am__seen_error)' has been set by some
previous function call.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__error -> am.error
Stefano Lattarini [Sat, 21 Jul 2012 09:52:49 +0000 (11:52 +0200)] 
[ng] rename: am__error -> am.error

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__all_ltlibs -> am.all-ltlibs
Stefano Lattarini [Sat, 21 Jul 2012 09:49:28 +0000 (11:49 +0200)] 
[ng] rename: am__all_ltlibs -> am.all-ltlibs

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__all_libs -> am.all-libs
Stefano Lattarini [Sat, 21 Jul 2012 09:48:17 +0000 (11:48 +0200)] 
[ng] rename: am__all_libs -> am.all-libs

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__all_progs -> am.all-progs
Stefano Lattarini [Sat, 21 Jul 2012 09:47:27 +0000 (11:47 +0200)] 
[ng] rename: am__all_progs -> am.all-progs

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] rename: am__dist_* -> am.dist.*
Stefano Lattarini [Sat, 21 Jul 2012 09:38:23 +0000 (11:38 +0200)] 
[ng] rename: am__dist_* -> am.dist.*

Here is the complete list of renames:

    am__dist_common        ->   am.dist.common-files
    am__dist_sources       ->   am.dist.sources
    am__dist_files         ->   am.dist.all-files
    am__dist_files_1       ->   am.dist.files-tmp1
    am__dist_files_2       ->   am.dist.files-tmp2
    am__dist_files_cooked  ->   am.dist.files-cooked
    am__dist_parent_dirs   ->   am.dist.parent-dirs

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] tests: fix unportable $((...)) usage
Stefano Lattarini [Sat, 21 Jul 2012 11:18:02 +0000 (13:18 +0200)] 
[ng] tests: fix unportable $((...)) usage

* t/longline.sh: Use "$i", not bare "i", to reference the value of
the shell variable 'i' in a $((...)) expression.  Issue revealed by
a failure with dash 0.5.2.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] fixup: imprecise comment in a test
Stefano Lattarini [Sat, 21 Jul 2012 08:53:25 +0000 (10:53 +0200)] 
[ng] fixup: imprecise comment in a test

* t/dist-many2.sh: We don't fake the command line length for the shell
at "max 2000 chars", but at at "max 4000 chars". Adjust heading comment
accordingly.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] fixup: remove deleted test from XFAIL_TESTS
Stefano Lattarini [Fri, 20 Jul 2012 11:34:14 +0000 (13:34 +0200)] 
[ng] fixup: remove deleted test from XFAIL_TESTS

* Makefile.am (XFAIL_TESTS): Here, the test 't/txinfo5.sh'.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] vars: names for internal make variables: 'am.foo' and 'am.foo.bar-baz'
Stefano Lattarini [Wed, 18 Jul 2012 18:26:41 +0000 (20:26 +0200)] 
[ng] vars: names for internal make variables: 'am.foo' and 'am.foo.bar-baz'

That is the new preferred naming scheme: 'am.foo' where we would
have previously used something like 'am__foo', and 'am.foo.bar-baz'
where we would have previously used something like 'am__foo_bar_baz'
or 'am__foo__bar_baz'.

We should start using the new naming to do so in future commits.  But
we should also avid a sweeping rename for now, to minimize conflicts
with the mainline Automake codebases, which (for portability reason)
must still limit itself to the use of the 'am__' prefix.

* HACKING: Adjust.  Also, remove now-irrelevant advice about the
problem of an old vendor make (NEWS-OS 4.2R) with variables whose
name start with an underscore.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'ng/dist-many' into ng/master
Stefano Lattarini [Mon, 16 Jul 2012 09:49:15 +0000 (11:49 +0200)] 
Merge branch 'ng/dist-many' into ng/master

* ng/dist-many:
  [ng] dist: do not exceed command line length limits, even with many files
  [ng] coverage: distributing lots of files
  [ng] dist: memoize some internal variables

13 years ago[ng] fixup: tests on Bison skeletons are now passing
Stefano Lattarini [Mon, 16 Jul 2012 09:39:53 +0000 (11:39 +0200)] 
[ng] fixup: tests on Bison skeletons are now passing

* Makefile.am (XFAIL_TESTS): So remove them from here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master
Stefano Lattarini [Mon, 16 Jul 2012 09:27:35 +0000 (11:27 +0200)] 
Merge branch 'master' into ng/master

* master: (23 commits)
  fixup: delete "# serial" line in m4/amversion.in
  news: update about recent ylwrap changes and fixes
  m4: get rid of "# serial" lines
  configure: ${#param} must be supported by the shell for the testsuite
  yacc tests: fix a spurious failure with parallel make
  ylwrap: use proper quoting inside a `...` substitution
  ylwrap: don't uselessly reset the exit status in case of failure
  ylwrap: fix C++ support for Bison
  ylwrap: refactor: move loop invariant
  ylwrap: refactoring: don't rely on the file order
  tests: upgrade and fix Bison test case
  tests: fix bison input file
  ylwrap: comment changes
  ylwrap: modernize idioms
  ylwrap: rename header inclusion in generated parsers
  ylwrap: simplify the list of renamings
  ylwrap: refactor: less duplication
  news: mention fixed testsuite weaknesses
  news: bump, for future 1.12.3
  tests: verify the shell test scripts are syntactically valid
  tests: don't use C instead of C++ compiler on case-insensitive platforms
  tests: avoid spurious TAP errors on Mac OS X 10.7
  tests: fix spurious failure in aclocal7.sh on fast machines

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint'
Stefano Lattarini [Mon, 16 Jul 2012 09:16:15 +0000 (11:16 +0200)] 
Merge branch 'maint'

* maint:
  fixup: delete "# serial" line in m4/amversion.in
  news: update about recent ylwrap changes and fixes
  m4: get rid of "# serial" lines
  configure: ${#param} must be supported by the shell for the testsuite
  yacc tests: fix a spurious failure with parallel make
  ylwrap: use proper quoting inside a `...` substitution
  ylwrap: don't uselessly reset the exit status in case of failure
  ylwrap: fix C++ support for Bison
  ylwrap: refactor: move loop invariant
  ylwrap: refactoring: don't rely on the file order
  tests: upgrade and fix Bison test case
  tests: fix bison input file
  ylwrap: comment changes
  ylwrap: modernize idioms
  ylwrap: rename header inclusion in generated parsers
  ylwrap: simplify the list of renamings
  ylwrap: refactor: less duplication

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agofixup: delete "# serial" line in m4/amversion.in
Stefano Lattarini [Mon, 16 Jul 2012 09:11:34 +0000 (11:11 +0200)] 
fixup: delete "# serial" line in m4/amversion.in

Otherwise, when m4/amversion.m4 is regenerated, it will contain a
serial line as well.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'yacc-work' into maint
Stefano Lattarini [Mon, 16 Jul 2012 08:57:41 +0000 (10:57 +0200)] 
Merge branch 'yacc-work' into maint

* yacc-work:
  news: update about recent ylwrap changes and fixes
  yacc tests: fix a spurious failure with parallel make
  ylwrap: use proper quoting inside a `...` substitution
  ylwrap: don't uselessly reset the exit status in case of failure
  ylwrap: fix C++ support for Bison
  ylwrap: refactor: move loop invariant
  ylwrap: refactoring: don't rely on the file order
  tests: upgrade and fix Bison test case
  tests: fix bison input file
  ylwrap: comment changes
  ylwrap: modernize idioms
  ylwrap: rename header inclusion in generated parsers
  ylwrap: simplify the list of renamings
  ylwrap: refactor: less duplication

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: update about recent ylwrap changes and fixes
Akim Demaille [Sun, 15 Jul 2012 09:23:59 +0000 (11:23 +0200)] 
news: update about recent ylwrap changes and fixes

* NEWS: In ylwrap, renamings are properly propagated, and unknown
files are preserved.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agom4: get rid of "# serial" lines
Stefano Lattarini [Sat, 14 Jul 2012 16:49:25 +0000 (18:49 +0200)] 
m4: get rid of "# serial" lines

The "#serial" lines are only considered by aclocal for the system-wide
third-party '.m4' files, not for the Automake-provided ones.  So they
serve no real purpose in the Automake '.m4' files.

In addition, now that we use git and topic branches, and that we are also
writing the Automake-NG fork, the "#serial" lines are becoming more and
more unreliable (e.g., different version of the same file in different
branches can easily end up having the same serial numbers).

So let's just nuke all the "#serial" lines.  See also automake bug#11932.

* m4/*.m4: All "# serial" lines removed.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoconfigure: ${#param} must be supported by the shell for the testsuite
Stefano Lattarini [Sat, 14 Jul 2012 16:38:31 +0000 (18:38 +0200)] 
configure: ${#param} must be supported by the shell for the testsuite

This will be required at least by the Automake-NG branch.

* configure.ac: Require the $AM_TEST_RUNNER_SHELL supports ${#param} as
a way to obtain the length of the expansion of the variable $param.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoyacc tests: fix a spurious failure with parallel make
Stefano Lattarini [Sat, 14 Jul 2012 10:31:19 +0000 (12:31 +0200)] 
yacc tests: fix a spurious failure with parallel make

* t/yacc-bison-skeleton.sh (Makefile.am): Add 'zardoz.h'
to BUILT_SOURCES.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoylwrap: use proper quoting inside a `...` substitution
Stefano Lattarini [Sat, 14 Jul 2012 09:07:34 +0000 (11:07 +0200)] 
ylwrap: use proper quoting inside a `...` substitution

* lib/ylwrap ($target): Here, when redefining this to a temporary file.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoylwrap: don't uselessly reset the exit status in case of failure
Stefano Lattarini [Sat, 14 Jul 2012 09:04:42 +0000 (11:04 +0200)] 
ylwrap: don't uselessly reset the exit status in case of failure

* lib/ylwrap: Here.  In case of a failure in the wrapped yacc/lex
invocation, '$ret' (holding the final exit status of ylwrap) was
being uselessly reset to '1' in the later if/else.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoylwrap: fix C++ support for Bison
Akim Demaille [Sat, 14 Jul 2012 14:57:02 +0000 (16:57 +0200)] 
ylwrap: fix C++ support for Bison

Fixes automake bug#7648.

The current logic of ylwrap is to call yacc in a sub directory, and
pull out of it all the files that were requested on its command line.
Reverse this approach: export *all* the files created in the
subdirectory, but rename them according to what the command says.
This way, extra files, such as position.hh, location.hh and stack.hh
for C++ parsers, but also parser.xml or parser.dot if XML or Dot
output is enabled, will be preserved.

* lib/ylwrap (pairlist): Remove.
(main loop): Don't loop over pairlist, but over the files in the
temporary directory.
* t/list-of-tests.mk (XFAIL_TESTS): Fixes t/yacc-bison-skeleton-cxx.sh.
* THANKS (James Bostock): Add, he reported bug#7648.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoylwrap: refactor: move loop invariant
Akim Demaille [Sat, 14 Jul 2012 08:09:15 +0000 (10:09 +0200)] 
ylwrap: refactor: move loop invariant

* lib/ylwrap (input_rx): Move its definition next to its sibling's,
outside of the main loop.

13 years agoylwrap: refactoring: don't rely on the file order
Akim Demaille [Sat, 14 Jul 2012 08:08:52 +0000 (10:08 +0200)] 
ylwrap: refactoring: don't rely on the file order

Forthcoming changes will make us iterate over the files in a different
order.

lib/ylwrap (first): Remove, replaced by...
(parser): this.

13 years agotests: upgrade and fix Bison test case
Akim Demaille [Sat, 14 Jul 2012 08:01:40 +0000 (10:01 +0200)] 
tests: upgrade and fix Bison test case

* t/yacc-bison-skeleton-cxx.sh: Request locations, to be
even more stressful.
Use %union to make sure the %{...%} is inserted where appropriate.
Fix some indentation/coding style issues.

13 years agotests: fix bison input file
Akim Demaille [Sat, 14 Jul 2012 07:07:52 +0000 (09:07 +0200)] 
tests: fix bison input file

Do not provide implementations in the %{...%} section, especially if the
header is included elsewhere, since then the linker will complain about
multiple definitions.

Reported by Stefano Lattarini,
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00126.html>.

* t/yacc-bison-skeleton.sh (zardoz.y): Define yylex and yyerror in the
epilogue.

13 years agoylwrap: comment changes
Akim Demaille [Fri, 13 Jul 2012 11:14:44 +0000 (13:14 +0200)] 
ylwrap: comment changes

* lib/ylwrap: Improve some comments.

13 years agoylwrap: modernize idioms
Akim Demaille [Fri, 13 Jul 2012 12:33:38 +0000 (14:33 +0200)] 
ylwrap: modernize idioms

* lib/ylwrap: Prefer printf to echo when special characters may
occur.
Replace the historical ',' sed separator with '|'.

13 years agoylwrap: rename header inclusion in generated parsers
Akim Demaille [Fri, 13 Jul 2012 12:32:22 +0000 (14:32 +0200)] 
ylwrap: rename header inclusion in generated parsers

Some types of Bison parsers, such as the GLR ones, generate a header
file that they include.  ylwrap, which renames the generated files,
does not rename the included file.  Fix this shortcoming, reported
for instance here:
<http://lists.gnu.org/archive/html/bug-bison/2012-06/msg00033.html>.
Fixes t/yacc-bison-skeleton.sh, see Automake bug#7648 and PR automake/491.

* lib/ylwrap (quote_for_sed): Accept arguments.
Catch more special characters.
(rename_sed): New.
Improve the previous renaming sed commands using quote_for_sed.
Suggested by Stefano Lattarini here:
<http://lists.gnu.org/archive/html/automake-patches/2012-07/msg00095.html>.
(main loop): Use rename_sed to rename the dependencies to other files.
* t/yacc-d-basic.sh: Exercise this case, even if bison/yacc was
not issuing such an include.
* t/list-of-tests.mk (XFAIL_TESTS): Adjust.

13 years agoylwrap: simplify the list of renamings
Akim Demaille [Thu, 12 Jul 2012 13:13:29 +0000 (15:13 +0200)] 
ylwrap: simplify the list of renamings

* lib/ylwrap (pairwise): Instead of being a straightforward copy from
the command line arguments, and having to deal with y.tab vs. y_tab
later, let pairwise store the real file names to process, y_tab
conversion included when needed.
(main loop): Use $to instead of $2, for symmetry with $from.

13 years agoylwrap: refactor: less duplication
Akim Demaille [Thu, 12 Jul 2012 12:52:44 +0000 (14:52 +0200)] 
ylwrap: refactor: less duplication

* lib/ylwrap (guard): New function.
Move functions before actual code.

13 years agoMerge branch 'maint'
Stefano Lattarini [Fri, 13 Jul 2012 12:58:17 +0000 (14:58 +0200)] 
Merge branch 'maint'

* maint:
  news: mention fixed testsuite weaknesses
  news: bump, for future 1.12.3
  tests: verify the shell test scripts are syntactically valid
  tests: don't use C instead of C++ compiler on case-insensitive platforms
  tests: avoid spurious TAP errors on Mac OS X 10.7
  tests: fix spurious failure in aclocal7.sh on fast machines

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: mention fixed testsuite weaknesses
Stefano Lattarini [Fri, 13 Jul 2012 12:47:54 +0000 (14:47 +0200)] 
news: mention fixed testsuite weaknesses

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: bump, for future 1.12.3
Stefano Lattarini [Fri, 13 Jul 2012 12:43:36 +0000 (14:43 +0200)] 
news: bump, for future 1.12.3

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branches 'fix-pr11898' and 'fix-pr-11893-and-10766' into maint
Stefano Lattarini [Fri, 13 Jul 2012 11:55:58 +0000 (13:55 +0200)] 
Merge branches 'fix-pr11898' and 'fix-pr-11893-and-10766' into maint

* fix-pr11898:
  tests: verify the shell test scripts are syntactically valid

* fix-pr-11893-and-10766:
  tests: don't use C instead of C++ compiler on case-insensitive platforms

13 years agotests: verify the shell test scripts are syntactically valid
Stefano Lattarini [Wed, 11 Jul 2012 08:51:15 +0000 (10:51 +0200)] 
tests: verify the shell test scripts are syntactically valid

Fixes automake bug#11898.

This measure of extra safety is mostly motivated by the fact that some
shells (at least some versions of Bash in the 3.x release series, one
of which serves as /bin/sh on Mac OS X 10.7, as well as Bash 4.0 and the
/usr/xpg4/bin/sh shell from Solaris 10) erroneously exit with exit status
0 upon encountering a syntax error, if an exit trap is sett (as it is in
our test scripts).

* Makefile.am (check-tests-syntax): New, check that the shell test
scripts listed in $(TESTS) are syntactically correct.
(.PHONY, check-local): Depend on it.
* t/self-check-exit.tap : Remove checks verifying that a script exits
with non-zero status upon encountering a syntax error; as explained
above, we can't depend on that.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] dist: do not exceed command line length limits, even with many files
Stefano Lattarini [Fri, 13 Jul 2012 08:32:33 +0000 (10:32 +0200)] 
[ng] dist: do not exceed command line length limits, even with many files

* lib/am/distdir.am (am.mkdir-for-dist, am.write-list-of-distfiles): New
internal functions.
(distdir): Using them and the 'am.xargs-map' function, in a way that
should prevent failures due to excessive command line lengths.

With this, the tests 'dist-many.sh' and 'dist-many2.sh' pass on the
systems where we verified they were previously failing.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] coverage: distributing lots of files
Stefano Lattarini [Thu, 12 Jul 2012 22:49:39 +0000 (00:49 +0200)] 
[ng] coverage: distributing lots of files

* t/dist-many.sh: New test, try distributing ~ 30 thousands files.
Currently fails on several systems (e.g., Linux 2.6.30 on i686,
Solaris 10 on i86pc).
* t/dist-many2.sh: New test, check that our distribution rules do not
hit errors due to an exceeded command line length when there are
many files to distribute; it does so by faking  a very low command
line length limit for 'mkdir' (max 50 arguments) and the shell (max
4000 characters).  Currently failing.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years ago[ng] dist: memoize some internal variables
Stefano Lattarini [Thu, 12 Jul 2012 13:58:25 +0000 (15:58 +0200)] 
[ng] dist: memoize some internal variables

* lib/am/distdir.am: Here, so that we will be able to use them several
times with no performance impact.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: don't use C instead of C++ compiler on case-insensitive platforms
Stefano Lattarini [Wed, 11 Jul 2012 12:36:13 +0000 (14:36 +0200)] 
tests: don't use C instead of C++ compiler on case-insensitive platforms

This change fixes automake bug#11893 and bug#10766.

On at least Cygwin and Mac OS X 10.7, the file system where the system
compilers are located can be case-insensitive, so that looking for a
program named 'CC' might actually find the C compiler in /usr/bin/cc.

Now, the Automake configure script looks for a C++ compiler named 'CC'
before looking for more obvious names like c++ or g++ (that is done to
increase testsuite "coverage in the wild", e.g., preferring, on Solaris,
the Sun Studio C++ compiler /usr/bin/CC over the GNU C++ compiler).

Since the checks done in AC_PROG_CXX are apparently not strict enough
to rule out C compilers like those from GCC or Clang (which are smart
enough to recognize if a file has a C++ extension, passing it to the
C++ front end) the testsuite might end up using a C compiler where a
C++ one is expected, with some subtle bad consequences.

* configure.ac: Don't look for a C++ compiler named 'CC' if the
"top-level" file system(s) (where /bin and /usr/bin are) are detected
to be case-insensitive.

Reported-by: Peter Rosin <peda@lysator.liu.se>
Reported-by: Max Horn <max@quendi.de>
Helped-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: avoid spurious TAP errors on Mac OS X 10.7
Stefano Lattarini [Tue, 10 Jul 2012 13:29:57 +0000 (15:29 +0200)] 
tests: avoid spurious TAP errors on Mac OS X 10.7

Fixes automake bug#1897.  Reported by Max Horn.

* t/suffix8.tap: The libtool bug#11895 was causing the ./configure script
to output a stray "ok" string on a line of its own, confusing the TAP
driver into thinking this was an extra test result (which resulted in the
next, real test results being flagged as "OUT-OF-ORDER").  Fix this by
protecting configure output.
* t/suffix10.tap: Likewise, and for the "make distcheck" output as well.
* THANKS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agotests: fix spurious failure in aclocal7.sh on fast machines
Adam Sampson [Tue, 10 Jul 2012 13:08:15 +0000 (15:08 +0200)] 
tests: fix spurious failure in aclocal7.sh on fast machines

Fixes automake bug#11896.  Issue introduced in commit v1.12.1-46-g13dd512.

* t/aclocal7.sh: Since aclocal rewrites aclocal.m4 unless the input files
are all older than the existing aclocal.m4, so we must sleep to ensure
somedefs.m4 has an older timestamp than the aclocal.m4 the next aclocal
call will generate.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'master' into ng/master (with fix for CVE-2012-3386)
Stefano Lattarini [Mon, 9 Jul 2012 17:50:45 +0000 (19:50 +0200)] 
Merge branch 'master' into ng/master (with fix for CVE-2012-3386)

This makes the fix for a locally-exploitable security vulnerability
(CVE-2012-3386) available to the Automake master branch.

* master:
  sync: update files from upstream with "make fetch"
  news: improve wording in entry about CVE-2012-3386
  maint: post-release minor version bump
  release: stable release 1.12.2
  distcheck: never make part of $(distdir) world-writable
  compat: automake should substitute @mkdir_p@, for backward compatibility
  fixup: t/README: it's ./runtest, not ./t/ax/runtest

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agoMerge branch 'maint' (with fix for CVE-2012-3386)
Stefano Lattarini [Mon, 9 Jul 2012 17:33:03 +0000 (19:33 +0200)] 
Merge branch 'maint' (with fix for CVE-2012-3386)

This makes the fix for a locally-exploitable security vulnerability
(CVE-2012-3386) available to the Automake master branch.

* maint:
  sync: update files from upstream with "make fetch"
  news: improve wording in entry about CVE-2012-3386
  maint: post-release minor version bump
  release: stable release 1.12.2
  distcheck: never make part of $(distdir) world-writable
  compat: automake should substitute @mkdir_p@, for backward compatibility
  fixup: t/README: it's ./runtest, not ./t/ax/runtest

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agosync: update files from upstream with "make fetch"
Stefano Lattarini [Mon, 9 Jul 2012 16:26:56 +0000 (18:26 +0200)] 
sync: update files from upstream with "make fetch"

* lib/config.guess, lib/gitlog-to-changelog, lib/texinfo.tex: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agonews: improve wording in entry about CVE-2012-3386
Stefano Lattarini [Mon, 9 Jul 2012 16:20:33 +0000 (18:20 +0200)] 
news: improve wording in entry about CVE-2012-3386

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
13 years agomaint: post-release minor version bump
Stefano Lattarini [Mon, 9 Jul 2012 16:19:55 +0000 (18:19 +0200)] 
maint: post-release minor version bump

* configure.ac (AC_INIT): Bump version number to 1.12.2a.
* m4/amversion.m4: Likewise (automatically regenerated by
"make bootstrap").

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>