Merge branch 'maint' into java-work
authorStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Jun 2011 15:10:54 +0000 (17:10 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Thu, 16 Jun 2011 15:10:54 +0000 (17:10 +0200)
* maint:
  news: update w.r.t. introduction of AM_DISTCHECK_CONFIGURE_FLAGS
  tests: optimize tests on primary/prefix mismatch for speed
  Warnings about primary/prefix mismatch fixed and extended.
  maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
  distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
  docs: better documentation for silent make rules

1  2 
ChangeLog
automake.in
tests/Makefile.am
tests/Makefile.in
tests/defs.in

diff --combined ChangeLog
+++ b/ChangeLog
@@@ -1,3 -1,88 +1,88 @@@
+ 2011-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests: optimize tests on primary/prefix mismatch for speed
+       * tests/primary-prefix-invalid-couples.test: Partial rewrite, in
+       order to use just a single automake invocation rather than one
+       invocation for each invalid primary/prefix couple.  This improves
+       the test script execution time by an order of magnitude.
+       Since we are at it, throw in some other improvements to avoid
+       unrelated automake warnings and failures that could potentially
+       cause false positives w.r.t. the automake exit status.
+ 2011-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       news: update w.r.t. introduction of AM_DISTCHECK_CONFIGURE_FLAGS
+       * NEWS (Miscellaneous changes): Update.
+ 2011-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       maintcheck: DISTCHECK_CONFIGURE_FLAGS can be defined on make cmdline
+       * Makefile.am (sc_tests_overriding_macros_on_cmdline): It's now
+       acceptable that the test scripts override DISTCHECK_CONFIGURE_FLAGS
+       on the make command line.  Update comments accordingly.  Since we
+       are at it, make the relevant grepping rules slightly tighter.
+ 2011-06-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       distcheck: add support for AM_DISTCHECK_CONFIGURE_FLAGS
+       * doc/automake.texi (Checking the Distribution): Suggest to use
+       AM_DISTCHECK_CONFIGURE_FLAGS, not DISTCHECK_CONFIGURE_FLAGS, to
+       define (in the top-level Makefile.am) extra flags to be passed
+       to configure at "make distcheck" time; DISTCHECK_CONFIGURE_FLAGS
+       should be reserved for the user.  Add proper `@vindex' directive.
+       Document that AM_DISTCHECK_CONFIGURE_FLAGS is not honoured in a
+       subpackage Makefile.am, but the flags in it are passed down to
+       the configure script of the subpackage.
+       * lib/am/distdir.am (distcheck): Also pass the flags in
+       $(AM_DISTCHECK_CONFIGURE_FLAGS) to the configure invocation.
+       Update comments.
+       * tests/defs.in.test (AM_DISTCHECK_CONFIGURE_FLAGS,
+       DISTCHECK_CONFIGURE_FLAGS): Unset in case they are exported in
+       the environment, they might improperly influence our testsuite.
+       * tests/distcheck-configure-flags.test: New test.
+       * tests/distcheck-configure-flags-am.test: Likewise.
+       * tests/distcheck-configure-flags-subpkg.test: Likewise.
+       * distcheck-hook.test: Likewise.
+       * distcheck-hook2.test: Likewise.
+       * tests/Makefile.am (TESTS): Update.
+       Closes automake bug#8784.
+ 2010-06-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       docs: better documentation for silent make rules
+       * doc/automake.texi (Options): Detailed description of the
+       automake option `silent-rules' moved from here ...
+       (Silent Make): ... into this new chapter, expanded, improved,
+       and subdivided into ...
+       (Make verbosity, Tricks For Silencing Make,
+       Automake silent-rules Option): ... these new sections.
+       (@menu, @detailmenu): Update.
+       * tests/silent-configsite.test: New test, checking that the
+       user can control default mode of silent-rules from config.site,
+       as is documented in the manual.
+       * tests/Makefile.am (TESTS): Updated.
+ 2011-06-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       Warnings about primary/prefix mismatch fixed and extended.
+       * automake.in (%standard_prefix): Add `doc' and `locale'.
+       Rename `pkgdatadir' to `pkgdata'.  Similarly for`pkglibdir',
+       `pkgincludedir' and `pkglibexecdir'.
+       (handle_programs): List `pkglibexec', not `pkglib', among the
+       prefixes valid for the `PROGRAMS' primary.
+       (handle_data): List also `doc' among the prefixes valid for
+       the `DATA' primary.  This is required by automake's own build
+       system.
+       * tests/dirforbid.test: Test removed, superseded by ...
+       * tests/primary-prefix-invalid-couples.test: ... this new test.
+       * tests/primary-prefix-valid-couples.test: New test.
+       * tests/primary-prefix-couples-documented-valid.test: Likewise.
+       * tests/primary-prefix-couples-force-valid.test: Likewise.
+       * tests/java3.test: Adjusted, and extended a bit.
+       * tests/Makefile.am (TESTS): Updated.
+       * NEWS: Updated.
+       From a report by Eric Blake.
  2011-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        test defs: new function 'fatal_', for hard errors
        driver.
        * tests/pr401b.test: Likewise.
        * tests/pr401c.test: Likewise.
 +      * tests/java-flat.test: Likewise, and properly update heading
 +      comments.
 +      * tests/java-nested.test: Likewise, but defining `parallel_tests'
 +      to "yes" instead, for improved coverage in conjunction with the
 +      sister test `java-flat.test'.
  
  2011-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
  
  2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
 +      tests defs: use `skip_' for skipping java-related tests
 +      * tests/defs.in (java, javac): Use `skip_' to signal test
 +      skipping.
 +
 +2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
        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
        superseded by the much more complete `maintclean.test'.
        * tests/Makefile.am (TESTS): Update.
  
 +2011-05-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java tests: use $PATH_SEPARATOR where appropriate
 +      * tests/java-compile-run-nested.test: Use `$PATH_SEPARATOR', not
 +      `:', to separate entries of extended PATH and CLASSPATH variables.
 +      * tests/java-compile-run-flat.test: Likewise.
 +
 +2011-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java coverage: test JAVACFLAGS and AM_JAVACFLAGS
 +      * tests/javaflags.test: New test.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java coverage: test rebuild rules for java
 +      * tests/java-rebuild.test: New test.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-04-26  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java coverage: try to build and run a java program
 +      * tests/java-compile-run-flat.test: New test, try to build and run
 +      a "UNIX-style" java program (complete with wrapper shell script
 +      and the like) with a "flat" source-tree setup (i.e., everything in
 +      the top-level directory).
 +      * tests/java-compile-nested.test: Likewise, but using a more
 +      typical "nested" source-tree setup.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-04-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      test defs: new requirement for the default java interpreter
 +      * tests/defs.in (for tool in $required): New requirement 'java'.
 +
 +2011-04-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java tests: tweak and make stricter a couple of tests
 +      * tests/javasubst.test: Use proper m4 quoting.  Add trailing `:'
 +      command.  Enable `errexit' shell flag, and related changes.
 +      Prefer cat + here-doc over echo to append to configure.in.
 +      Make grepping of Makefile.in stricter.  Add debugging output.
 +      Improve heading comments.
 +      * tests/javaprim.test: Likewise.
 +
 +2011-04-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java coverage: add test on uninstall with JAVA primary
 +      * tests/java-uninstall.test: New test.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-04-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java tests: require java compiler more properly
 +      * tests/java-extra.test: Use "required=javac" instead of ad-hoc
 +      configure check.
 +      * tests/java-noinst.test: Likewise.
 +
 +2011-04-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java: allow both JAVA and nobase_JAVA in the same Makefile.am
 +      * automake.in (handle_java): Also strip `nobase_' from the given
 +      prefix, when needed.
 +      * tests/java-clean.test: Update and extend.
 +      * tests/java-compile-install.test: Likewise.
 +      * tests/java-no-duplicate.test: Likewise.
 +      * tests/java-sources.test: Likewise.
 +      * tests/java-noinst.test: Likewise.
 +      * tests/java-mix-dist-nodist.test: Renamed to ...
 +      * tests/java-mix.test: ... this, and extended.
 +      * tests/java-nobase.test: New test, still xfailing due to
 +      unrelated issues.
 +      * tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
 +
  2011-04-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        testsuite: more environment sanitization
        * NEWS: Update.
        Report by Bruno Haible.
  
 +2011-04-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      java: allow both dist_JAVA and nodist_JAVA in the same Makefile.am
 +      Fixes automake bug#8434.
 +      * automake.in (handle_java): Strip `dist_' and `nodist_' from
 +      the given prefix.  Define a new internal Makefile variable
 +      `am__java_sources'.  Related adjustments.
 +      * lib/am/java.am (JAVAC, JAVAROOT, CLASSPATH_ENV): Define only the
 +      first time this am file is processed.
 +      (class%DIR%.stamp): Stamp file renamed ...
 +      (class%NDIR%.stamp): ... to this, so that the `dist_' and `nodist_'
 +      prefixes are stripped from the name of the stampfile.  Adjust
 +      declaration of dependencies by using the new automake-generated
 +      internal variable `$(am__java_sources)'.  In the rule, use `$@'
 +      as the name of the target, rather than hard-coding it.
 +      * tests/java.test: Update and extend.
 +      * tests/java-no-duplicate.test: New test.
 +      * tests/java-mix-dist-nodist.test: Likewise.
 +      * tests/java-compile-and-install.test: Likewise.
 +      * tests/java-clean.test: Likewise.
 +      * tests/java-sources.test: Likewise.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-04-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      coverage: more on java support EXTRA_ and noinst_ prefixes
 +      * tests/java-extra.test: New test, checking support for the
 +      prefix `EXTRA_' with the JAVA primary.
 +      * tests/java-noinst.test: New test, checking support for the
 +      prefix `noinst_' with the JAVA primary.
 +      * tests/Makefile.am (TESTS): Update.
 +
  2011-04-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        test defs: fix 'javac' requirement for older JDK versions
diff --combined automake.in
@@@ -249,11 -249,11 +249,11 @@@ my @common_sometimes 
  # Standard directories from the GNU Coding Standards, and additional
  # pkg* directories from Automake.  Stored in a hash for fast member check.
  my %standard_prefix =
-     map { $_ => 1 } (qw(bin data dataroot dvi exec html include info
-                       lib libexec lisp localstate man man1 man2 man3
-                       man4 man5 man6 man7 man8 man9 oldinclude pdf
-                       pkgdatadir pkgincludedir pkglibdir pkglibexecdir
-                       ps sbin sharedstate sysconf));
+     map { $_ => 1 } (qw(bin data dataroot doc dvi exec html include info
+                       lib libexec lisp locale localstate man man1 man2
+                       man3 man4 man5 man6 man7 man8 man9 oldinclude pdf
+                       pkgdata pkginclude pkglib pkglibexec ps sbin
+                       sharedstate sysconf));
  
  # Copyright on generated Makefile.ins.
  my $gen_copyright = "\
@@@ -2636,7 -2636,7 +2636,7 @@@ sub handle_libtoo
  sub handle_programs
  {
    my @proglist = &am_install_var ('progs', 'PROGRAMS',
-                                 'bin', 'sbin', 'libexec', 'pkglib',
+                                 'bin', 'sbin', 'libexec', 'pkglibexec',
                                  'noinst', 'check');
    return if ! @proglist;
  
@@@ -3746,8 -3746,8 +3746,8 @@@ sub handle_man_page
  sub handle_data
  {
      &am_install_var ('-noextra', '-candist', 'data', 'DATA',
-                    'data', 'dataroot', 'dvi', 'html', 'pdf', 'ps',
-                    'sysconf', 'sharedstate', 'localstate',
+                    'data', 'dataroot', 'doc', 'dvi', 'html', 'pdf',
+                    'ps', 'sysconf', 'sharedstate', 'localstate',
                     'pkgdata', 'lisp', 'noinst', 'check');
  }
  
@@@ -5107,32 -5107,20 +5107,32 @@@ sub handle_jav
                                      'java', 'noinst', 'check');
      return if ! @sourcelist;
  
 -    my @prefix = am_primary_prefixes ('JAVA', 1,
 +    my @prefixes = am_primary_prefixes ('JAVA', 1,
                                      'java', 'noinst', 'check');
  
      my $dir;
 -    foreach my $curs (@prefix)
 +    my @java_sources = ();
 +    foreach my $prefix (@prefixes)
        {
 +        (my $curs = $prefix) =~ s/^(?:nobase_)?(?:dist_|nodist_)?//;
 +
        next
          if $curs eq 'EXTRA';
  
 -      err_var "${curs}_JAVA", "multiple _JAVA primaries in use"
 -        if defined $dir;
 +        push @java_sources, '$(' . $prefix . '_JAVA' . ')';
 +
 +      if (defined $dir)
 +        {
 +          err_var "${curs}_JAVA", "multiple _JAVA primaries in use"
 +           unless $curs eq $dir;
 +        }
 +
        $dir = $curs;
        }
  
 +    define_pretty_variable ('am__java_sources', TRUE, INTERNAL,
 +                            "@java_sources");
 +
      if ($dir eq 'check')
        {
          push (@check, "class$dir.stamp");
diff --combined tests/Makefile.am
@@@ -21,7 -21,6 +21,7 @@@ all.test 
  auxdir2.test \
  cond17.test \
  gcj6.test \
 +java-nobase.test \
  pr8365-remake-timing.test \
  yacc-dist-nobuild-subdir.test \
  txinfo5.test
@@@ -298,7 -297,6 +298,6 @@@ depend4.test 
  depend5.test \
  depend6.test \
  destdir.test \
- dirforbid.test \
  dirlist.test \
  dirlist2.test \
  discover.test \
@@@ -314,6 -312,11 +313,11 @@@ distdir.test 
  distlinks.test \
  distlinksbrk.test \
  distname.test \
+ distcheck-configure-flags.test \
+ distcheck-configure-flags-am.test \
+ distcheck-configure-flags-subpkg.test \
+ distcheck-hook.test \
+ distcheck-hook2.test \
  dmalloc.test \
  dollar.test \
  dollarvar.test \
@@@ -434,21 -437,8 +438,21 @@@ java.test 
  java2.test \
  java3.test \
  java-check.test \
 +java-clean.test \
  javaprim.test \
  javasubst.test \
 +javaflags.test \
 +java-extra.test \
 +java-noinst.test \
 +java-nobase.test \
 +java-compile-install.test \
 +java-compile-run-flat.test \
 +java-compile-run-nested.test \
 +java-sources.test \
 +java-no-duplicate.test \
 +java-mix.test \
 +java-uninstall.test \
 +java-rebuild.test \
  ldadd.test \
  ldflags.test \
  lex.test \
@@@ -646,6 -636,10 +650,10 @@@ prefix.test 
  primary.test \
  primary2.test \
  primary3.test \
+ primary-prefix-invalid-couples.test \
+ primary-prefix-valid-couples.test \
+ primary-prefix-couples-force-valid.test \
+ primary-prefix-couples-documented-valid.test \
  proginst.test \
  python.test \
  python2.test \
@@@ -697,6 -691,7 +705,7 @@@ silent-lex-gcc.test 
  silent-lex-generic.test \
  silent-yacc-gcc.test \
  silent-yacc-generic.test \
+ silent-configsite.test \
  srcsub.test \
  srcsub2.test \
  space.test \
diff --combined tests/Makefile.in
@@@ -280,7 -280,6 +280,7 @@@ all.test 
  auxdir2.test \
  cond17.test \
  gcj6.test \
 +java-nobase.test \
  pr8365-remake-timing.test \
  yacc-dist-nobuild-subdir.test \
  txinfo5.test
@@@ -569,7 -568,6 +569,6 @@@ depend4.test 
  depend5.test \
  depend6.test \
  destdir.test \
- dirforbid.test \
  dirlist.test \
  dirlist2.test \
  discover.test \
@@@ -585,6 -583,11 +584,11 @@@ distdir.test 
  distlinks.test \
  distlinksbrk.test \
  distname.test \
+ distcheck-configure-flags.test \
+ distcheck-configure-flags-am.test \
+ distcheck-configure-flags-subpkg.test \
+ distcheck-hook.test \
+ distcheck-hook2.test \
  dmalloc.test \
  dollar.test \
  dollarvar.test \
@@@ -705,21 -708,8 +709,21 @@@ java.test 
  java2.test \
  java3.test \
  java-check.test \
 +java-clean.test \
  javaprim.test \
  javasubst.test \
 +javaflags.test \
 +java-extra.test \
 +java-noinst.test \
 +java-nobase.test \
 +java-compile-install.test \
 +java-compile-run-flat.test \
 +java-compile-run-nested.test \
 +java-sources.test \
 +java-no-duplicate.test \
 +java-mix.test \
 +java-uninstall.test \
 +java-rebuild.test \
  ldadd.test \
  ldflags.test \
  lex.test \
@@@ -917,6 -907,10 +921,10 @@@ prefix.test 
  primary.test \
  primary2.test \
  primary3.test \
+ primary-prefix-invalid-couples.test \
+ primary-prefix-valid-couples.test \
+ primary-prefix-couples-force-valid.test \
+ primary-prefix-couples-documented-valid.test \
  proginst.test \
  python.test \
  python2.test \
@@@ -968,6 -962,7 +976,7 @@@ silent-lex-gcc.test 
  silent-lex-generic.test \
  silent-yacc-gcc.test \
  silent-yacc-generic.test \
+ silent-configsite.test \
  srcsub.test \
  srcsub2.test \
  space.test \
diff --combined tests/defs.in
        # telling that source files are missing.  Adding also the `-help'
        # option seems to solve the problem.
        echo "$me: running javac -version -help"
 -      javac -version -help || exit 77
 +      javac -version -help || skip_ "java compiler not found"
 +      ;;
 +    java)
 +      # See the comments above about `javac' for why we use also `-help'.
 +      echo "$me: running java -version -help"
 +      java -version -help || skip_ "java interpreter not found"
        ;;
      makedepend)
        echo "$me: running makedepend -f-"
@@@ -431,6 -426,8 +431,8 @@@ unset DESTDI
  unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
  unset htmldir includedir infodir libdir libexecdir localedir mandir
  unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+ # Unset variables that might change the "make distcheck" behaviour.
+ unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS
  # Also unset variables that control our test driver.  While not
  # conceptually independent, they cause some changed semantics we
  # need to control (and test for) in some of the tests to ensure