automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1750


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1750-g9928ea5
Date: Tue, 17 Jan 2012 09:16:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=9928ea5c84889026f5800fe4270013791d47f16a

The branch, master has been updated
       via  9928ea5c84889026f5800fe4270013791d47f16a (commit)
       via  3d6197fe647445ecbcfaac6c004449246471d5b6 (commit)
       via  8fec2399264ee4822ecf2c0d9275d890edbc8e50 (commit)
       via  12dc0ec5e3c7e1a12569d5cfdbb8ceaa5a5f5f58 (commit)
       via  3da9c4c757ff0b6b1df0daf36a8a12274292a9e1 (commit)
       via  d9a7182ed15654aebdd049857282106e84962813 (commit)
       via  20f2ac90d14d04caef07c6e445e7b3e582374701 (commit)
       via  20d99e05c9286ded040131e89c0c90a70334ed05 (commit)
       via  068b2f53579c55365b67619dce4685066cd70a60 (commit)
       via  27f1a1c967bc6af59cc940ba42114d795fb458d5 (commit)
       via  48c9d57f1769789dfd6cb876bd3e82d2252d1e59 (commit)
       via  3b594a8cc0fa3e8835e4f79b68515fe4e7b72a78 (commit)
       via  8856653ec87c826ec5f7f7c577e01afaa64c3ed5 (commit)
       via  9d9f00ed0e3a21b4537c21280b81f6b9f0ae15bd (commit)
      from  083a75be98d83517afdaa3da9ada22adb106cb1a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9928ea5c84889026f5800fe4270013791d47f16a
Merge: 083a75b 3d6197f
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jan 16 20:06:08 2012 +0100

    Merge branch 'maint'
    
    * maint:
      recheck: fix interaction with "make -n"
      vala: avoid potential useless remakes (minor bugfix)
      vala: enhance tests
      recheck: behave better with non-GNU make
      check: separate .log -> .html conversion from core testsuite harness
      docs: deprecate .log -> .html conversion by parallel-tests
      tests: list some forgotten test cases in $(TESTS)
      maintcheck: consistency of list of test scripts
      build: explicitly declare some targets as .PHONY
      maint: remove obsolete/broken maintainer targets
      build: improve silencing of automake build system
      tests: move list of tests in its own Makefile fragment
    
    + Extra non-trivial edits:
    
    * tests/parallel-tests2.test: Obvious edits to merge the slightly
    inconsistent enhancements to coverage done in master with those
    done in maint.
    * lib/am/check.am (check-TESTS, recheck): Sweeping and rather
    complex changes to merge the considerable divergences between
    maint and master in a way that is meaningful and, where possible,
    retains the semantic changes from both maint and master.

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                      |   37 ++--------
 automake.in                      |   15 +++-
 doc/automake.texi                |   16 ++---
 lib/Automake/Makefile.am         |    7 +-
 lib/Automake/tests/Makefile.am   |    2 +-
 lib/am/Makefile.am               |    3 +-
 lib/am/check-html.am             |   61 +++++++++++++++++
 lib/am/check.am                  |  133 +++++++++++++++++---------------------
 tests/check.test                 |    2 +-
 tests/list-of-tests.mk           |    1 +
 tests/parallel-tests-dryrun.test |   93 ++++++++++++++++++++++++++
 tests/parallel-tests2.test       |   40 ++++++++++-
 tests/vala-mix.test              |  116 +++++++++++++++++++++++++++++++++
 tests/vala.test                  |   54 ++++++++++++----
 tests/vala5.test                 |   47 +++++++++-----
 15 files changed, 469 insertions(+), 158 deletions(-)
 create mode 100644 lib/am/check-html.am
 create mode 100755 tests/parallel-tests-dryrun.test
 create mode 100755 tests/vala-mix.test

diff --git a/Makefile.am b/Makefile.am
index 00ed606..ab57068 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -93,11 +93,9 @@ do_subst = sed \
 automake: automake.in
 aclocal: aclocal.in
 automake aclocal: Makefile
-       $(AM_V_GEN)rm -f $@ address@hidden
-       $(AM_V_at)$(do_subst) $(srcdir)/address@hidden >address@hidden
-       $(AM_V_at)chmod +x address@hidden
-       $(AM_V_at)chmod a-w address@hidden
-       $(AM_V_at)mv -f address@hidden $@
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN)$(do_subst) $(srcdir)/address@hidden >address@hidden
+       $(AM_V_at)chmod a+x,a-w address@hidden && mv -f address@hidden $@
 
 ## The master location for INSTALL is lib/INSTALL.
 ## This is where `make fetch' will install new versions.
@@ -271,14 +269,15 @@ sc_unquoted_DESTDIR \
 sc_tabs_in_texi \
 sc_at_in_texi
 
-.PHONY: $(syntax_check_rules)
 $(syntax_check_rules): automake aclocal
+maintainer-check: $(syntax_check_rules)
+.PHONY: maintainer-check $(syntax_check_rules)
 
 ## Check that the list of tests given in the Makefile is equal to the
 ## list of all test scripts in the Automake testsuite.
 .PHONY: maintainer-check-list-of-tests
 maintainer-check-list-of-tests:
-       @failcom='exit 1'; \
+       @fail= failcom='exit 1'; \
        for f in x $$MAKEFLAGS; do \
          case $$f in \
            *=* | --[!k]*);; \
@@ -290,7 +289,7 @@ maintainer-check-list-of-tests:
        done; \
        test -z "$$fail"
 
-maintainer-check: $(syntax_check_rules) maintainer-check-list-of-tests
+maintainer-check: maintainer-check-list-of-tests
 
 ## Look for test whose names can cause spurious failures when used as
 ## first argument to AC_INIT (chiefly because they might contain an
@@ -814,27 +813,6 @@ git-release: git-dist
        $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) \
          --to $$dest.gnu.org:automake $(DIST_ARCHIVES)
 
-git-diff:
-       $(AM_V_GEN):; \
-       thisver="v$(VERSION)"; \
-       if test -z "$$OLDVERSION"; then \
-         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
-       else prevno="$$OLDVERSION"; fi; \
-       prevver=v$$prevno; \
-       git diff $$prevver..$$thisver $(PACKAGE) \
-           > $(PACKAGE)-$$prevno-$(VERSION).diff
-
-## Check our path lengths.
-path-check: distdir
-       $(AM_V_GEN)($(am__cd) $(distdir) && \
-## FIXME there's got to be a better way!  pathchk should take the list
-## of files on stdin, at least.
-         find . -print | xargs pathchk -p); \
-         estatus=$$?; \
-         find $(distdir) -type d '!' -perm -200 -exec chmod u+w {} ';'; \
-         rm -rf $(distdir); \
-         exit $$estatus
-
 ## Visually comparing differences between the Makefile.in files in
 ## automake's own build system as generated in two different branches
 ## might help to catch bugs and blunders.  This has already happened a
@@ -952,6 +930,7 @@ fetch:
        test $$stat = 0 || \
          echo "See Fetchdir/update.patch for a log of the changes."; \
        exit $$stat
+.PHONY: fetch
 
 ## Generate release statistics, for the table in automake.texi.
 ## This has to be run in an up to date build tree, but there must
diff --git a/automake.in b/automake.in
index 086e217..bf9f0c0 100644
--- a/automake.in
+++ b/automake.in
@@ -4897,9 +4897,11 @@ sub handle_tests
   if (var ('TESTS'))
     {
       push (@check_tests, 'check-TESTS');
+      my $check_deps = "@check";
       $output_rules .= &file_contents ('check', new Automake::Location,
                                       COLOR => !! option 'color-tests',
-                                      PARALLEL_TESTS => !! option 
'parallel-tests');
+                                      PARALLEL_TESTS => !! option 
'parallel-tests',
+                                       CHECK_DEPS => $check_deps);
 
       # Tests that are known programs should have $(EXEEXT) appended.
       # For matching purposes, we need to adjust XFAIL_TESTS as well.
@@ -4910,7 +4912,6 @@ sub handle_tests
       if (my $parallel_tests = option 'parallel-tests')
         {
          define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
-         define_variable ('TEST_SUITE_HTML', '$(TEST_SUITE_LOG:.log=.html)', 
INTERNAL);
          my $suff = '.test';
          my $at_exeext = '';
          my $handle_exeext = exists $configure_vars{'EXEEXT'};
@@ -5008,7 +5009,6 @@ sub handle_tests
          $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_LOGS:.log=.trs)'} = MOSTLY_CLEAN;
          $clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
-         $clean_files{'$(TEST_SUITE_HTML)'} = MOSTLY_CLEAN;
        }
     }
 }
@@ -5901,8 +5901,15 @@ sub lang_vala_finish_target ($$)
 
   $output_rules .=
     "\$(srcdir)/${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
+# Since the C files generated from the vala sources depend on the
+# ${derived}_vala.stamp file, we must ensure its timestamp is older than
+# those of the C files generated by the valac invocation below (this is
+# especially important on systems with sub-second timestamp resolution).
+# Thus we need to create the stamp file *before* invoking valac, and to
+# move it to its final location only after valac has been invoked.
+    "\t${silent}rm -f \$@ && echo stamp > address@hidden".
     "\t${verbose}\$(am__cd) \$(srcdir) && ${compile} \$(${derived}_SOURCES)\n".
-    "\t${silent}touch address@hidden";
+    "\t${silent}mv -f address@hidden address@hidden";
 
   push_dist_common ("${derived}_vala.stamp");
 
diff --git a/doc/automake.texi b/doc/automake.texi
index 9e2a989..3c8bf0e 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -9115,17 +9115,14 @@ LOG_COMPILER = $(PERL)
 AM_LOG_FLAGS = -Mstrict -w
 @end example
 
address@hidden mostlyclean
 @trindex check-html
 @vindex RST2HTML
 @vindex TEST_SUITE_HTML
 @noindent
-With @code{make check-html}, the log files may be converted from RST
-(reStructuredText, see @uref{http://docutils.sourceforge.net/@/rst.html})
-to HTML using @samp{RST2HTML}, which defaults to @command{rst2html} or
address@hidden  The variable @samp{TEST_SUITE_HTML} contains the
-set of converted log files.  The log and HTML files are removed upon
address@hidden mostlyclean}.
+Previous versions of automake used to provide a @code{check-html} target
+to convert the log files to HTML.  This feature is now deprecated, and
address@hidden be removed} in the next major Automake release, so don't rely
+on it anymore.
 
 By default, the test suite harness will run all tests, but there are
 several ways to limit the set of tests that are run:
@@ -9186,13 +9183,10 @@ env RECHECK_LOGS= make -e check
 
 @item
 @trindex recheck
address@hidden recheck-html
 You can ensure that all tests are rerun which have failed or passed
 unexpectedly, by running @code{make recheck} in the test directory.
 This convenience target will set @code{RECHECK_LOGS} appropriately
-before invoking the main test harness.  The @code{recheck-html} target
-does the same as @code{recheck} but again converts the resulting
address@hidden file in HTML format, like the @code{check-html} target.
+before invoking the main test harness.
 @end itemize
 
 @noindent
diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am
index e4c2572..cfc7272 100644
--- a/lib/Automake/Makefile.am
+++ b/lib/Automake/Makefile.am
@@ -64,9 +64,8 @@ do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
 ## $(datadir) or other do_subst'ituted variables change.
 ## Use chmod a-w to prevent people from editing the wrong file by accident.
 Config.pm: Config.in Makefile
-       $(AM_V_GEN)rm -f Config.tmp Config.pm
-       $(AM_V_at)$(do_subst) $(srcdir)/Config.in >Config.tmp
-       $(AM_V_at)chmod a-w Config.tmp
-       $(AM_V_at)mv -f Config.tmp Config.pm
+       $(AM_V_at)rm -f $@ address@hidden
+       $(AM_V_GEN)$(do_subst) $(srcdir)/Config.in >address@hidden
+       $(AM_V_at)chmod a+x,a-w address@hidden && mv -f address@hidden $@
 
 EXTRA_DIST = Config.in
diff --git a/lib/Automake/tests/Makefile.am b/lib/Automake/tests/Makefile.am
index 2c33a76..42b1e54 100644
--- a/lib/Automake/tests/Makefile.am
+++ b/lib/Automake/tests/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-# Copyright (C) 2002, 2003, 2008, 2009, 2010, 2011 Free Software
+# Copyright (C) 2002, 2003, 2008, 2009, 2010, 2011, 2012 Free Software
 # Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index e09a370..52dbe1a 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -3,7 +3,7 @@
 ## Makefile for Automake lib/am.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2008,
-# 2009, 2011 Free Software Foundation, Inc.
+# 2009, 2011, 2012 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
 
 dist_am_DATA = \
 check.am \
+check-html.am \
 check2.am \
 clean-hdr.am \
 clean.am \
diff --git a/lib/am/check-html.am b/lib/am/check-html.am
new file mode 100644
index 0000000..13f0a47
--- /dev/null
+++ b/lib/am/check-html.am
@@ -0,0 +1,61 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+## Free Software Foundation, Inc.
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+## Makefile.am fragment to produce HTML output from RST-formatted
+## log files produced by the parallel-tests output.
+## This fragment was part of the automake core in the 1.11.x release
+## series, but is to be moved out in the 1.12 release.
+
+TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+
+mostlyclean-am: am--mostlyclean-test-html
+.PHONY: am--mostlyclean-test-html
+am--mostlyclean-test-html:
+## Expand $(TEST_LOGS) only once, to avoid exceeding line length limits.
+       list='$(TEST_LOGS:.log=.html)'; test -z "$$list" || rm -f $$list
+       rm -f $(TEST_SUITE_HTML)
+
+.log.html:
+       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
+       for r2h in $$list; do                                           \
+         if ($$r2h --version) >/dev/null 2>&1; then                    \
+           R2H=$$r2h;                                                  \
+         fi;                                                           \
+       done;                                                           \
+       if test -z "$$R2H"; then                                        \
+         echo >&2 "cannot find rst2html, cannot create $@";            \
+         exit 2;                                                       \
+       fi;                                                             \
+       $$R2H $< >address@hidden
+       @mv address@hidden $@
+
+# Be sure to run check first, and then to convert the result.
+# Beware of concurrent executions.  Run "check" not "check-TESTS", as
+# check-SCRIPTS and other dependencies are rebuilt by the former only.
+# And expect check to fail.
+check-html recheck-html:
+       @target=`echo $@ | sed 's/-html$$//'`; \
+       rv=0; $(MAKE) $(AM_MAKEFLAGS) $$target || rv=$$?; \
+## The nullification of $(TEST_LOGS) is required to ensure that
+## "make recheck-html" do not try to uselessly re-run tests.
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) TEST_LOGS= || exit 4; \
+       exit $$rv
+
+AM_RECURSIVE_TARGETS += check-html recheck-html
+
+.PHONY: check-html recheck-html
+.MAKE: check-html recheck-html
diff --git a/lib/am/check.am b/lib/am/check.am
index 16be0c3..4ed3f7e 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011 Free
-## Software Foundation, Inc.
+## Copyright (C) 2001, 2003, 2006, 2007, 2008, 2009, 2010, 2011, 2012
+## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -114,8 +114,11 @@ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
 am__set_TESTS_bases = \
   bases='$(TEST_LOGS)'; \
   bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
-## Trim away any extra whitespace.  This has already proved useful in
-## avoiding weird bug on lesser make implementations.
+## Trim away any extra whitespace.  This has already proved useful
+## in avoiding weird bug on lesser make implementations.  It also
+## works around the GNU make 3.80 bug where trailing whitespace in
+## "TESTS = foo.test $(empty)" causes $(TESTS_LOGS)  to erroneously
+## expand to "foo.log .log".
   bases=`echo $$bases`
 
 # Recover from deleted `.trs' file; this should ensure that
@@ -305,83 +308,45 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 
 RECHECK_LOGS = $(TEST_LOGS)
 
-# Run all the tests.
-check-TESTS:
-## Expand $(RECHECK_LOGS) only once, to avoid exceeding line length limits.
-       @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
-       @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
+## ------------------------------------------ ##
+## Running all tests, or rechecking failures. ##
+## ------------------------------------------ ##
+
+check-TESTS recheck:
+## If we are running "make recheck", it's not the user which can decide
+## which tests to consider for re-execution, so we must ignore the value
+## of $(RECHECK_LOGS).
+## Here and below, we expand $(RECHECK_LOGS) only once, to avoid exceeding
+## line length limits.
+       @if test $@ != recheck; then \
+          list='$(RECHECK_LOGS)'; \
+          test -z "$$list" || rm -f $$list; \
+        fi
+       @if test $@ != recheck; then \
+          list='$(RECHECK_LOGS:.log=.trs)'; \
+          test -z "$$list" || rm -f $$list; \
+        fi
 ## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
-## or a prior run plus reruns all happen within the same timestamp
-## (can happen with a prior `make TESTS=<subset>'),
-## then we get no log output.
+## or a prior run plus reruns all happen within the same timestamp (can
+## happen with a prior `make TESTS=<subset>'), then we get no log output.
 ## OTOH, this means that, in the rule for `$(TEST_SUITE_LOG)', we
 ## cannot use `$?' to compute the set of lazily rerun tests, lest
 ## we rely on .PHONY to work portably.
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
-       @list='' list2='$(TEST_LOGS)'; for i in $$list2; do \
-## Trailing whitespace in `TESTS = foo.test $(empty)' causes GNU make
-## 3.80 to erroneously expand $(TESTS_LOGS) to `foo.log .log'.
-## Work around this bug.
-         test .log = $$i && continue; \
-## Be careful to avoid extra whitespace in the definition of $list.  See
-## comments in `recheck' below for why this might be useful.
-         if test -z "$$list"; then list=$$i; else list="$$list $$i"; fi; \
-       done; \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
-
-AM_RECURSIVE_TARGETS += check
-
-## -------------- ##
-## Produce HTML.  ##
-## -------------- ##
-
-.log.html:
-       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
-       for r2h in $$list; do                                           \
-         if ($$r2h --version) >/dev/null 2>&1; then                    \
-           R2H=$$r2h;                                                  \
-         fi;                                                           \
-       done;                                                           \
-       if test -z "$$R2H"; then                                        \
-         echo >&2 "cannot find rst2html, cannot create $@";            \
-         exit 2;                                                       \
-       fi;                                                             \
-       $$R2H $< >address@hidden
-       @mv address@hidden $@
-
-# Be sure to run check first, and then to convert the result.
-# Beware of concurrent executions.  Run "check" not "check-TESTS", as
-# check-SCRIPTS and other dependencies are rebuilt by the former only.
-# And expect check to fail.
-check-html:
-       @if $(MAKE) $(AM_MAKEFLAGS) check; then                 \
-         rv=0; else rv=$$?;                                    \
-       fi;                                                     \
-       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;   \
-       exit $$rv
-
-.PHONY: check-html
-.MAKE: check-html
-
-AM_RECURSIVE_TARGETS += check-html
-
-## -------------------- ##
-## Rechecking failures. ##
-## -------------------- ##
-
-## Rerun all tests that experienced an error or an unexpected failure.
-recheck recheck-html:
        @ws='[  ]'; \
-       target=`echo $@ | sed 's,^re,,'`; \
        list=''; $(am__set_TESTS_bases); \
        for i in $$bases; do \
-## Skip tests that haven't been run, but recover gracefully from deleted
+## If running a "make recheck", we must only consider tests that had an
+## unexpected outcome (FAIL or XPASS) in the earlier run.  In particular,
+## skip tests that haven't been run.  But recover gracefully from deleted
 ## `.trs' files.
-         test -f $$i.trs || test -f $$i.log || continue; \
+         if test $@ = recheck; then \
+           test -f $$i.trs || test -f $$i.log || continue; \
 ## FIXME: one fork per test -- this is horrendously inefficient!
-         grep "^$$ws*:recheck:$$ws*no$$ws*$$" $$i.trs \
-           >/dev/null 2>&1 && continue; \
+           grep "^$$ws*:recheck:$$ws*no$$ws*$$" $$i.trs \
+             >/dev/null 2>&1 && continue; \
+         else :; fi; \
 ## Be careful to avoid extra whitespace in the definition of $list, since
 ## its value will be passed to the recursive make invocation below through
 ## the TEST_LOGS macro, and leading/trailing white space in a make macro
@@ -390,12 +355,32 @@ recheck recheck-html:
 ## <http://lists.gnu.org/archive/html/bug-automake/2010-08/msg00004.html>
          if test -z "$$list"; then list=$$i.log; else list="$$list $$i.log"; 
fi; \
        done; \
-       $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) 
TEST_LOGS="'"$$list"'"'
+## Under "make recheck", remove the .log and .trs files associated
+## with the files to recheck, so that those will be rerun by the
+## "make test-suite.log" recursive invocation below.  But use a proper
+## hack to avoid extra files removal when running under "make -n".
+       if test $@ = recheck && test -n "$$list"; then \
+         { \
+          echo 'am--clean: am--clean-log am--clean-trs'; \
+          echo 'am--clean-log: ; rm -f $$(am__logs)'; \
+          echo 'am--clean-trs: ; rm -f $$(am__logs:.log=.trs)'; \
+         } | $(MAKE) $(AM_MAKEFLAGS) -f - am--clean am__logs="$$list" \
+           || exit 1; \
+       fi; \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+
+## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
+recheck: %CHECK_DEPS%
+
+AM_RECURSIVE_TARGETS += check recheck
+
+.PHONY: recheck
 
-.PHONY: recheck recheck-html
-.MAKE: recheck recheck-html
+## ----------------------------------------------- ##
+## Produce HTML.  To be removed in automake 1.12.  ##
+## ----------------------------------------------- ##
 
-AM_RECURSIVE_TARGETS += recheck recheck-html
+include check-html.am
 
 else !%?PARALLEL_TESTS%
 
diff --git a/tests/check.test b/tests/check.test
index fc81903..ae6be67 100755
--- a/tests/check.test
+++ b/tests/check.test
@@ -29,7 +29,7 @@ test x"$am_parallel_tests" != x"yes" || : > test-driver
 $ACLOCAL
 $AUTOMAKE
 
-grep '^check-TESTS:' Makefile.in
+grep 'check-TESTS.*:' Makefile.in
 grep 'check-DEJAGNU' Makefile.in && Exit 1
 
 # 'check-TESTS' is phony.
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index cf1fae2..2df25d1 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -686,6 +686,7 @@ parallel-tests-suffix-prog.test \
 parallel-tests-log-compiler-1.test \
 parallel-tests-log-compiler-2.test \
 parallel-tests-dry-run.test \
+parallel-tests-dryrun.test \
 parallel-tests-fd-redirect.test \
 parallel-tests-extra-programs.test \
 parallel-tests-unreadable.test \
diff --git a/tests/parallel-tests-dryrun.test b/tests/parallel-tests-dryrun.test
new file mode 100755
index 0000000..532a012
--- /dev/null
+++ b/tests/parallel-tests-dryrun.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check parallel-tests interactions with "make -n".
+
+am_parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+TESTS = foo.test bar.test
+$(TESTS):
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+# Avoid confusion with test logs.
+rm -f config.log
+
+log_files='test-suite.log foo.log bar.log'
+html_files='test-suite.html foo.html bar.html'
+the_files="$log_files $html_files"
+
+all_exist ()
+{
+  st=0
+  for i in $*; do
+    test -f $i || { echo File $i not found; st=1; }
+  done
+  test $st -eq 0
+}
+
+none_exist ()
+{
+  st=0
+  for i in $*; do
+    { test -r $i || test -f $i; } && { echo File $i found; st=1; }
+  done
+  test $st -eq 0
+}
+
+for targ in check recheck check-html recheck-html $the_files; do
+  $MAKE -n "$targ"
+  none_exist $the_files
+done
+
+touch $the_files
+
+$MAKE -n mostlyclean
+all_exist $the_files
+$MAKE -n clean
+all_exist $the_files
+
+cat > foo.test <<'END'
+#! /bin/sh
+exit 0
+END
+
+cat > bar.test <<'END'
+#! /bin/sh
+exit 1
+END
+
+chmod a+x foo.test bar.test
+
+$MAKE check && Exit 1
+
+for targ in recheck recheck-html clean mostlyclean distclean; do
+  $MAKE -n "$targ"
+  all_exist $the_files
+done
+
+:
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index d2abc8b..23e1d42 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -83,18 +83,50 @@ rm -f mylog.html
 env TESTS=foo.test $MAKE -e recheck-html
 test -f mylog.html
 
-# check-html should cause check_SCRIPTS to be created.
+# Create HTML output for an individual test.
+$MAKE foo.html
+grep 'this is .*foo\.test' foo.html
+test ! -f bar.html
+test ! -f baz.html
+
+# Create HTML output for individual tests.  Since the pre-existing log
+# files are expected to be used for the HTML conversion, this should
+# go smoothly even for failed tests.
+$MAKE bar.html baz.html
+grep 'this is .*bar\.test' bar.html
+grep 'this is .*baz\.test' baz.html
+
+# HTML output removed by mostlyclean.
+$MAKE mostlyclean
+test ! -f foo.html
+test ! -f bar.html
+test ! -f baz.html
+test ! -f mylog.html
+
+# check-html and recheck-html should cause check_SCRIPTS to be created,
+# and recheck-html should rerun no tests if check has not been run.
+
 $MAKE clean
+test ! -f mylog.html
 env TEST_LOGS=foo.log $MAKE -e check-html
 test -f bla
 test -f foo.log
+test ! -f bar.log
+test ! -f baz.log
 test -f mylog.html
-# recheck-html should cause check_SCRIPTS to be created, and should rerun
-# no tests if it appears that check has not been run.
+
 $MAKE clean
 env TESTS=foo.test $MAKE -e recheck-html
 test -f bla
 test ! -f foo.log
 test -f mylog.html
 
+$MAKE clean
+$MAKE recheck-html
+test -f bla
+test ! -f foo.log
+test ! -f bar.log
+test ! -f baz.log
+test -f mylog.html
+
 :
diff --git a/tests/vala-mix.test b/tests/vala-mix.test
new file mode 100755
index 0000000..f597a7f
--- /dev/null
+++ b/tests/vala-mix.test
@@ -0,0 +1,116 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Vala sources and C sources in the same program.  Functional test.
+
+required='cc GNUmake'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_VALAC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz mu
+AM_VALAFLAGS = --profile=posix
+zardoz_SOURCES = foo.vala bar.c
+mu_SOURCES = 1.vala 2.c
+mu_VALAFLAGS = $(AM_VALAFLAGS) --main=run
+mu_CFLAGS = -DHAVE_MU
+END
+
+if cross_compiling; then :; else
+  unindent >> Makefile.am <<'END'
+    check-local:
+       ./zardoz
+       ./mu
+       ./zardoz | grep "foo is alive"
+       ./mu | grep "Howdy, World!"
+END
+fi
+
+cat > foo.vala <<'END'
+int main ()
+{
+  stdout.printf ("foo is alive\n");
+  return 0;
+}
+END
+
+echo 'extern int i = 0;' > bar.c
+
+cat > 1.vala <<'END'
+int run ()
+{
+  stdout.printf ("Howdy, World!\n");
+  return 0;
+}
+END
+
+cat > 2.c <<'END'
+#ifdef HAVE_MU
+int all_is_ok = 1;
+#else
+#error "HAVE_MU no defined"
+chocke me
+#endif
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+$AUTOCONF
+
+./configure
+
+$MAKE all
+ls -l # For debugging.
+$MAKE check
+
+have_generated_files ()
+{
+  test -f mu_vala.stamp
+  test -f zardoz_vala.stamp
+  test -f foo.c
+  test -f 1.c
+}
+
+# Our vala-related rules must create stamp files and intermediate
+# C files.
+have_generated_files
+
+$MAKE -q
+$MAKE -n | grep stamp && Exit 1
+
+# Check the distribution.
+$MAKE distcheck
+
+# Stamp files and intermediate C files should *not* be removed
+# by "make clean".
+$MAKE clean
+have_generated_files
+
+# But stamp files should be removed by "maintainer-clean" (the
+# behaviour w.r.t. intermediate C files is still unclear, and
+# better left undefined for the moment).
+$MAKE maintainer-clean
+ls *vala*.stamp | grep . && Exit 1
+
+:
diff --git a/tests/vala.test b/tests/vala.test
index 959990a..e1d2676 100755
--- a/tests/vala.test
+++ b/tests/vala.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011, 2012 Free
+# Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -15,20 +15,29 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure intermediate .c files are built from vala source.
+# Basic "grepping" test on vala support.
 
-required="libtool"
 . ./defs || Exit 1
 
+# So that we won't require libtool macros.
+cat > acinclude.m4 <<'END'
+AC_DEFUN([AC_PROG_LIBTOOL],
+         [AC_SUBST([LIBTOOL], [:])])
+END
+
 cat >> 'configure.in' << 'END'
 AC_PROG_CC
-AM_PROG_AR
+AC_PROG_CXX
 AC_PROG_LIBTOOL
+AM_PROG_AR
 AM_PROG_VALAC
+AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
 
-cat > 'Makefile.am' <<'END'
+cat > Makefile.am <<'END'
+SUBDIRS = sub
+
 bin_PROGRAMS = zardoz
 zardoz_SOURCES = zardoz.vala
 zardoz_VALAFLAGS = --debug
@@ -37,6 +46,13 @@ lib_LTLIBRARIES = libzardoz.la
 libzardoz_la_SOURCES = zardoz-foo.vala zardoz-bar.vala
 END
 
+mkdir sub
+
+cat > sub/Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = bar.vala baz.vala mu.c zap.cxx
+END
+
 : > ltmain.sh
 : > config.sub
 : > config.guess
@@ -44,11 +60,23 @@ END
 $ACLOCAL
 $AUTOMAKE -a
 
-grep 'VALAC' Makefile.in
-grep 'am_zardoz_OBJECTS' Makefile.in
-grep 'am_libzardoz_la_OBJECTS' Makefile.in
-grep 'zardoz_vala.stamp' Makefile.in
-grep 'libzardoz_la_vala.stamp' Makefile.in
-grep 'zardoz\.c' Makefile.in
-grep 'zardoz-foo\.c' Makefile.in
+grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' Makefile.in
+grep '\$(VALAC).* \$(zardoz_VALAFLAGS) \$(VALAFLAGS) ' Makefile.in
+$FGREP 'am_zardoz_OBJECTS' Makefile.in
+$FGREP 'am_libzardoz_la_OBJECTS' Makefile.in
+$FGREP 'zardoz_vala.stamp:' Makefile.in
+$FGREP 'libzardoz_la_vala.stamp:' Makefile.in
+test `$FGREP -c '.stamp:' Makefile.in` -eq 2
+$FGREP 'zardoz.c' Makefile.in
+$FGREP 'zardoz-foo.c' Makefile.in
+$FGREP 'zardoz-bar.c' Makefile.in
+
+grep '\$(VALAC).* \$(AM_VALAFLAGS) \$(VALAFLAGS) ' sub/Makefile.in
+$FGREP 'foo_VALAFLAGS' sub/Makefile.in && Exit 1
+$FGREP 'am_foo_OBJECTS' sub/Makefile.in
+$FGREP 'bar.c' sub/Makefile.in
+$FGREP 'baz.c' sub/Makefile.in
+$FGREP 'foo_vala.stamp:' sub/Makefile.in
+test `$FGREP -c '.stamp:' sub/Makefile.in` -eq 1
 
+:
diff --git a/tests/vala5.test b/tests/vala5.test
index f3062e7..7633d48 100755
--- a/tests/vala5.test
+++ b/tests/vala5.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011 Free Software
-# Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009, 2011, 2012 Free
+# Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -17,53 +17,68 @@
 
 # Test per-target flags.
 
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="pkg-config valac gcc GNUmake"
 . ./defs || Exit 1
 
 mkdir src
 
-cat >> 'configure.in' << 'END'
+cat >> configure.in <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_PROG_LIBTOOL
 AM_PROG_VALAC([0.7.0])
-PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.10])
 AC_CONFIG_FILES([src/Makefile])
 AC_OUTPUT
 END
 
-cat > 'Makefile.am' <<'END'
+cat > Makefile.am <<'END'
 SUBDIRS = src
 END
 
-cat > 'src/Makefile.am' <<'END'
+cat > src/Makefile.am <<'END'
 bin_PROGRAMS = foo bar
 foo_CFLAGS = $(GOBJECT_CFLAGS)
 foo_LDADD = $(GOBJECT_LIBS)
-foo_SOURCES = baz.vala
-bar_SOURCES = baz.vala
+foo_SOURCES = xfoo.vala
+bar_SOURCES = xbar.vala
 bar_VALAFLAGS = -D BAR
 bar_CFLAGS = $(GOBJECT_CFLAGS)
 bar_LDADD = $(GOBJECT_LIBS)
 END
 
-cat > 'src/baz.vala' <<'END'
-void main () {
+cat > src/xfoo.vala <<'END'
+int main ()
+{
+  stdout.printf ("foo\n");
+  return 0;
+}
+END
+
+cat > src/xbar.vala <<'END'
+void main ()
+{
 #if BAR
   stdout.printf ("bar\n");
 #else
-  stdout.printf ("foo\n");
+  stdout.oops_an_invalid_method ();
 #endif
 }
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure || skip_ "configuration step failure"
+grep PKG_CHECK_MODULES configure && skip_ "pkg-config m4 macros not found"
+
+./configure
 $MAKE
 
+if cross_compiling; then :; else
+  ./src/foo
+  ./src/bar
+  test `./src/foo` = foo
+  test `./src/bar` = bar
+fi
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]