automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.11b-106-g99d3c8a
Date: Wed, 18 Apr 2012 13:17:26 +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=99d3c8ae43a45a820024407dd7c4a6ab6733b530

The branch, ng/master has been updated
       via  99d3c8ae43a45a820024407dd7c4a6ab6733b530 (commit)
       via  127adfb531be729e9747b81cbb4bce243bcc6dd3 (commit)
       via  f46359b42790945e42e78a620e651ce66c2b8833 (commit)
       via  0c2cc2c9d171ef21ef54c87569837ff41cd09a9d (commit)
       via  bee76ca37d0883404302661671567404d9c92917 (commit)
       via  1153b2be217e6acdb547b8c163ba8a3d150353de (commit)
       via  789a7723530968f4da48ed9438961b691cf48cc6 (commit)
       via  36f9451ee076f8e42159b3f6daed972deb60fa9e (commit)
       via  e31e6b51150cc46bcfdcfb7b05e43a6ec7e0f848 (commit)
       via  6f12912a2b1c207e8fb3d45d993cc81edc51be47 (commit)
       via  e0ce774e6927c4e2121fe92ae47a72a24e470d5e (commit)
      from  52ea488d39541b4d3b6618464caf4493878ba3f0 (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 99d3c8ae43a45a820024407dd7c4a6ab6733b530
Merge: 52ea488 127adfb
Author: Stefano Lattarini <address@hidden>
Date:   Wed Apr 18 14:11:22 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      maintainer-check: do not hang
      parallel-tests: 'recheck' must depend on 'all'
      vala tests: building libraries, and more on '.vapi' files
      automake: fix botched call to 'check_user_variables'
      vala: cleanup rules are better and more complete now
      vala tests: check headers generation
      vala tests: remove redundant libtool requirements and usages
      vala tests: some enhancements
      vala tests: few adjustments and improvements
      build: use latest help2man, but without locale support

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

Summary of changes:
 NEWS                                       |    7 +
 THANKS                                     |    2 +-
 automake.in                                |   27 ++--
 doc/help2man                               |  247 ++++++++++++++++------------
 lib/am/check.am                            |    3 +-
 syntax-checks.mk                           |    2 +-
 t/list-of-tests.mk                         |    4 +-
 t/parallel-tests-recheck-depends-on-all.sh |   93 +++++++++++
 t/{vala2.sh => vala-headers.sh}            |   70 ++++----
 t/vala-libs.sh                             |  100 +++++++++++
 t/vala-vpath.sh                            |   33 +++-
 t/vala1.sh                                 |   52 ------
 t/vala2.sh                                 |   33 +++-
 t/vala3.sh                                 |   14 +-
 t/vala4.sh                                 |    3 -
 t/vala5.sh                                 |   20 +++
 16 files changed, 477 insertions(+), 233 deletions(-)
 create mode 100755 t/parallel-tests-recheck-depends-on-all.sh
 copy t/{vala2.sh => vala-headers.sh} (60%)
 create mode 100755 t/vala-libs.sh
 delete mode 100755 t/vala1.sh

diff --git a/NEWS b/NEWS
index 9b487a0..bb2480f 100644
--- a/NEWS
+++ b/NEWS
@@ -92,6 +92,10 @@ New in 1.11c:
     testsuite harness.  This is still the default at the moment, but it
     might change in future versions.
 
+  - The 'recheck' target (provided by the parallel testsuite harness) now
+    depends on the 'all' target.  This allows for a better user-experience
+    in test-driven development.  See automake bug#11252.
+
   - Test scripts that exit with status 99 to signal an "hard error" (e.g.,
     and unexpected or internal error, or a failure to set up the test case
     scenario) have their outcome reported as an 'ERROR' now.  Previous
@@ -236,6 +240,9 @@ Bugs fixed in 1.11c:
 
   - Automake's own build system finally have a real "installcheck" target.
 
+  - Vala-related cleanup rules are now more complete, and work better in
+    a VPATH setup.
+
   - Files listed with the AC_REQUIRE_AUX_FILE macro in configure.ac are
     now automatically distributed also if the directory of the auxiliary
     files coincides with the top-level directory.
diff --git a/THANKS b/THANKS
index e2b65b2..16367e1 100644
--- a/THANKS
+++ b/THANKS
@@ -47,7 +47,7 @@ Bob Proulx            address@hidden
 Bob Rossi              address@hidden
 Bobby Jack             address@hidden
 Braden N. McDaniel     address@hidden
-Brendan O'Dea          address@hidden
+Brendan O'Dea          address@hidden
 Brian Cameron          address@hidden
 Brian Ford             address@hidden
 Brian Gough            address@hidden
diff --git a/automake.in b/automake.in
index bb47528..6ace052 100644
--- a/automake.in
+++ b/automake.in
@@ -5731,12 +5731,16 @@ sub lang_vala_finish_target ($$)
   foreach my $vala_file (@vala_sources)
     {
       my $c_file = $vala_file;
-      $output_rules .= "\$(srcdir)/$c_file: \$(srcdir)/${derived}_vala.stamp\n"
-        . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
-        . "address@hidden test -f \$@; then :; else \\\n"
-        . "\t  \$(MAKE) \$(srcdir)/${derived}_vala.stamp; \\\n"
-        . "\tfi\n"
-        if $c_file =~ s/(.*)\.vala$/$1.c/;
+      if ($c_file =~ s/(.*)\.vala$/$1.c/)
+        {
+          $c_file = "\$(srcdir)/$c_file";
+          $output_rules .= "$c_file: \$(srcdir)/${derived}_vala.stamp\n"
+            . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
+            . "address@hidden test -f \$@; then :; else \\\n"
+            . "\t  \$(MAKE) \$(srcdir)/${derived}_vala.stamp; \\\n"
+            . "\tfi\n";
+         $clean_files{$c_file} = MAINTAINER_CLEAN;
+        }
     }
 
   # Add rebuild rules for generated header and vapi files
@@ -5749,8 +5753,8 @@ sub lang_vala_finish_target ($$)
          if (grep (/$lastflag/, ('-H', '-h', '--header', '--internal-header',
                                  '--vapi', '--internal-vapi', '--gir')))
            {
-             my $headerfile = $flag;
-             $output_rules .= "\$(srcdir)/$headerfile: 
\$(srcdir)/${derived}_vala.stamp\n"
+             my $headerfile = "\$(srcdir)/$flag";
+             $output_rules .= "$headerfile: \$(srcdir)/${derived}_vala.stamp\n"
                . "address@hidden test -f \$@; then :; else rm -f 
\$(srcdir)/${derived}_vala.stamp; fi\n"
                . "address@hidden test -f \$@; then :; else \\\n"
                . "\t  \$(MAKE) \$(srcdir)/${derived}_vala.stamp; \\\n"
@@ -5775,7 +5779,7 @@ sub lang_vala_finish_target ($$)
 
   # VALAFLAGS is a user variable (per GNU Standards),
   # it should not be overridden in the Makefile...
-  check_user_variables ['VALAFLAGS'];
+  check_user_variables 'VALAFLAGS';
 
   my $dirname = dirname ($name);
 
@@ -5784,6 +5788,7 @@ sub lang_vala_finish_target ($$)
 
   my $verbose = verbose_flag ('VALAC');
   my $silent = silent_flag ();
+  my $stampfile = "\$(srcdir)/${derived}_vala.stamp";
 
   $output_rules .=
     "\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
@@ -5797,9 +5802,9 @@ sub lang_vala_finish_target ($$)
     "\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
     "\t${silent}mv -f address@hidden address@hidden";
 
-  push_dist_common ("${derived}_vala.stamp");
+  push_dist_common ($stampfile);
 
-  $clean_files{"${derived}_vala.stamp"} = MAINTAINER_CLEAN;
+  $clean_files{$stampfile} = MAINTAINER_CLEAN;
 }
 
 # Add output rules to invoke valac and create stamp file as a witness
diff --git a/doc/help2man b/doc/help2man
index 01e690b..45cb182 100755
--- a/doc/help2man
+++ b/doc/help2man
@@ -1,12 +1,12 @@
 #!/usr/bin/perl -w
 
 # Generate a short man page from --help and --version output.
-# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 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)
+# the Free Software Foundation; either version 3, or (at your option)
 # any later version.
 
 # This program is distributed in the hope that it will be useful,
@@ -15,65 +15,46 @@
 # 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, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
 
 # Written by Brendan O'Dea <address@hidden>
 # Available from ftp://ftp.gnu.org/gnu/help2man/
 
-use 5.005;
+use 5.006;
 use strict;
 use Getopt::Long;
 use Text::Tabs qw(expand);
 use POSIX qw(strftime setlocale LC_ALL);
-use locale;
 
 my $this_program = 'help2man';
-my $this_version = '1.36';
+my $this_version = '1.40.8';
 
-my $have_gettext;
-BEGIN {
-    eval {
-       require Locale::gettext;
-       Locale::gettext->import;
-       $have_gettext = 1;
-    };
-
-    unless ($have_gettext)
-    {
-       *gettext = sub { $_[0] };
-       *textdomain = sub {};
-    }
+sub _ { $_[0] }
+sub configure_locale
+{
+    my $locale = shift;
+    die "$this_program: no locale support (Locale::gettext required)\n"
+       unless $locale eq 'C';
 }
 
-sub _ { gettext @_ }
+sub dec { $_[0] }
+sub enc { $_[0] }
+sub enc_user { $_[0] }
+sub kark { die +(sprintf shift, @_), "\n" }
 sub N_ { $_[0] }
 
-textdomain $this_program;
-{
-    my ($user_locale) = grep defined && length,
-       (map $ENV{$_}, qw(LANGUAGE LC_ALL LC_MESSAGES LANG)), 'C';
-
-    sub kark # die with message formatted in the invoking user's locale
-    {
-       setlocale LC_ALL, $user_locale;
-       my $fmt = gettext shift;
-       die +(sprintf $fmt, @_), "\n";
-    }
-}
-
-my $version_info = sprintf _(<<'EOT'), $this_program, $this_version;
+my $version_info = enc_user sprintf _(<<'EOT'), $this_program, $this_version;
 GNU %s %s
 
-Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free
-Software Foundation, Inc.
+Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010,
+2011, 2012 Free Software Foundation, Inc.
 This is free software; see the source for copying conditions.  There is NO
 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 Written by Brendan O'Dea <address@hidden>
 EOT
 
-my $help_info = sprintf _(<<'EOT'), $this_program, $this_program;
+my $help_info = enc_user sprintf _(<<'EOT'), $this_program, $this_program;
 `%s' generates a man page out of `--help' and `--version' output.
 
 Usage: %s [OPTION]... EXECUTABLE
@@ -88,14 +69,17 @@ Usage: %s [OPTION]... EXECUTABLE
  -o, --output=FILE       send output to `FILE'
  -p, --info-page=TEXT    name of Texinfo manual
  -N, --no-info           suppress pointer to Texinfo manual
+ -l, --libtool           exclude the `lt-' from the program name
      --help              print this help, then exit
      --version           print version number, then exit
 
-EXECUTABLE should accept `--help' and `--version' options although
-alternatives may be specified using:
+EXECUTABLE should accept `--help' and `--version' options and produce output on
+stdout although alternatives may be specified using:
 
  -h, --help-option=STRING     help option string
  -v, --version-option=STRING  version option string
+ --version-string=STRING      version string
+ --no-discard-stderr          include stderr when parsing option output
 
 Report bugs to <address@hidden>.
 EOT
@@ -103,44 +87,35 @@ EOT
 my $section = 1;
 my $manual = '';
 my $source = '';
-my $locale = 'C';
 my $help_option = '--help';
 my $version_option = '--version';
-my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info);
+my $discard_stderr = 1;
+my ($opt_name, @opt_include, $opt_output, $opt_info, $opt_no_info, 
$opt_libtool,
+    $version_text);
 
 my %opt_def = (
     'n|name=s'          => \$opt_name,
     's|section=s'       => \$section,
     'm|manual=s'        => \$manual,
     'S|source=s'        => \$source,
-    'L|locale=s'        => \$locale,
+    'L|locale=s'        => sub { configure_locale pop },
     'i|include=s'       => sub { push @opt_include, [ pop, 1 ] },
     'I|opt-include=s'   => sub { push @opt_include, [ pop, 0 ] },
     'o|output=s'        => \$opt_output,
     'p|info-page=s'     => \$opt_info,
     'N|no-info'                 => \$opt_no_info,
+    'l|libtool'                 => \$opt_libtool,
+    'help'              => sub { print $help_info; exit },
+    'version'           => sub { print $version_info; exit },
     'h|help-option=s'   => \$help_option,
     'v|version-option=s' => \$version_option,
+    'version-string=s'  => \$version_text,
+    'discard-stderr!'   => \$discard_stderr,
 );
 
 # Parse options.
 Getopt::Long::config('bundling');
-GetOptions (%opt_def,
-    help    => sub { print $help_info; exit },
-    version => sub { print $version_info; exit },
-) or die $help_info;
-
-die $help_info unless @ARGV == 1;
-
-die "$this_program: no locale support (Locale::gettext required)\n"
-    unless $locale eq 'C' or $have_gettext;
-
-# Add default territory to locale.
-$locale .= "_\U$locale" if $locale =~ /^[a-z]{2}$/;
-
-# Set localisation of date and executable's ouput.
-delete @ENV{qw(LANGUAGE LC_MESSAGES LANG)};
-setlocale LC_ALL, $ENV{LC_ALL} = $locale;
+die $help_info unless GetOptions %opt_def and @ARGV == 1;
 
 my %include = ();
 my %append = ();
@@ -170,8 +145,12 @@ while (@opt_include)
 
     while (<INC>)
     {
+       # Convert input to internal Perl format, so that multibyte
+       # sequences are treated as single characters.
+       $_ = dec $_;
+
        # [section]
-       if (/^\[([^]]+)\]/)
+       if (/^\[([^]]+)\]\s*$/)
        {
            $key = uc $1;
            $key =~ s/^\s+//;
@@ -182,7 +161,7 @@ while (@opt_include)
        }
 
        # /pattern/
-       if (m!^/(.*)/([ims]*)!)
+       if (m!^/(.*)/([ims]*)\s*$!)
        {
            my $pat = $2 ? "(?$2)$1" : $1;
 
@@ -229,14 +208,17 @@ for my $hash (\(%include, %append))
     for (keys %$hash) { $hash->{$_} =~ s/\n+$/\n/ }
 }
 
-# Grab help and version info from executable.
-my ($help_text, $version_text) = map {
-    join '', map { s/ +$//; expand $_ } `$ARGV[0] $_ 2>/dev/null`
-       or kark N_("%s: can't get `%s' info from %s"), $this_program,
-           $_, $ARGV[0]
-} $help_option, $version_option;
+sub get_option_value;
 
-my $date = strftime "%B %Y", localtime;
+# Grab help and version info from executable.
+my $help_text   = get_option_value $ARGV[0], $help_option;
+$version_text ||= get_option_value $ARGV[0], $version_option;
+
+# Translators: the following message is a strftime(3) format string, which in
+# the English version expands to the month as a word and the full year.  It
+# is used on the footer of the generated manual pages.  If in doubt, you may
+# just use %x as the value (which should be the full locale-specific date).
+my $date = enc strftime _("%B %Y"), localtime;
 (my $program = $ARGV[0]) =~ s!.*/!!;
 my $package = $program;
 my $version;
@@ -259,9 +241,9 @@ if ($opt_output)
 #   <program> ({GNU,Free} <package>) <version>
 #   <program> - {GNU,Free} <package> <version>
 #
-# and seperated from any copyright/author details by a blank line.
+# and separated from any copyright/author details by a blank line.
 
-($_, $version_text) = split /\n+/, $version_text, 2;
+($_, $version_text) = ((split /\n+/, $version_text, 2), '');
 
 if (/^(\S+) +\(((?:GNU|Free) +[^)]+)\) +(.*)/ or
     /^(\S+) +- *((?:GNU|Free) +\S+) +(.*)/)
@@ -286,6 +268,9 @@ $program =~ s!.*/!!;
 # No info for `info' itself.
 $opt_no_info = 1 if $program eq 'info';
 
+# Translators: "NAME", "SYNOPSIS" and other one or two word strings in all
+# upper case are manual page section headings.  The man(1) manual page in your
+# language, if available should provide the conventional translations.
 for ($include{_('NAME')})
 {
     if ($opt_name) # --name overrides --include contents.
@@ -312,13 +297,19 @@ unless ($manual)
 {
     for ($section)
     {
-       if (/^(1[Mm]|8)/) { $manual = _('System Administration Utilities') }
-       elsif (/^6/)      { $manual = _('Games') }
-       else              { $manual = _('User Commands') }
+       if (/^(1[Mm]|8)/) { $manual = enc _('System Administration Utilities') }
+       elsif (/^6/)      { $manual = enc _('Games') }
+       else              { $manual = enc _('User Commands') }
     }
 }
 
 # Extract usage clause(s) [if any] for SYNOPSIS.
+# Translators: "Usage" and "or" here are patterns (regular expressions) which
+# are used to match the usage synopsis in program output.  An example from cp
+# (GNU coreutils) which contains both strings:
+#  Usage: cp [OPTION]... [-T] SOURCE DEST
+#    or:  cp [OPTION]... SOURCE... DIRECTORY
+#    or:  cp [OPTION]... -t DIRECTORY SOURCE...
 my $PAT_USAGE = _('Usage');
 my $PAT_USAGE_CONT = _('or');
 if ($help_text =~ s/^($PAT_USAGE):( +(\S+))(.*)((?:\n(?: {6}\1| 
*($PAT_USAGE_CONT): +\S).*)*)//om)
@@ -336,6 +327,7 @@ if ($help_text =~ s/^($PAT_USAGE):( +(\S+))(.*)((?:\n(?: 
{6}\1| *($PAT_USAGE_CON
     {
        $synopsis .= ".br\n" if $synopsis;
        s!^\S*/!!;
+       s/^lt-// if $opt_libtool;
        s/^(\S+) *//;
        $synopsis .= ".B $1\n";
        s/\s+$//;
@@ -372,14 +364,28 @@ s/^\./\x80/mg;
 s/^'/\x81/mg;
 s/\\/\x82/g;
 
-my $PAT_BUGS           = _('Report +bugs|Email +bug +reports +to');
+# Translators: patterns are used to match common program output. In the source
+# these strings are all of the form of "my $PAT_something = _('...');" and are
+# regular expressions.  If there is more than one commonly used string, you
+# may separate alternatives with "|".  Spaces in these expressions are written
+# as " +" to indicate that more than one space may be matched.  The string
+# "(?:[\\w-]+ +)?" in the bug reporting pattern is used to indicate an
+# optional word, so that either "Report bugs" or "Report _program_ bugs" will
+# be matched.
+my $PAT_BUGS           = _('Report +(?:[\w-]+ +)?bugs|Email +bug +reports 
+to');
 my $PAT_AUTHOR         = _('Written +by');
 my $PAT_OPTIONS                = _('Options');
+my $PAT_ENVIRONMENT    = _('Environment');
+my $PAT_FILES          = _('Files');
 my $PAT_EXAMPLES       = _('Examples');
 my $PAT_FREE_SOFTWARE  = _('This +is +free +software');
 
 # Start a new paragraph (if required) for these.
-s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR)/$1\n\n$2/og;
+s/([^\n])\n($PAT_BUGS|$PAT_AUTHOR) /$1\n\n$2 /og;
+
+# Convert iso-8859-1 copyright symbol or (c) to nroff
+# character.
+s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
 
 sub convert_option;
 
@@ -391,6 +397,16 @@ while (length)
        $sect = _('OPTIONS');
        next;
     }
+    if (s/^($PAT_ENVIRONMENT): *\n//o)
+    {
+       $sect = _('ENVIRONMENT');
+       next;
+    }
+    if (s/^($PAT_FILES): *\n//o)
+    {
+       $sect = _('FILES');
+       next;
+    }
     elsif (s/^($PAT_EXAMPLES): *\n//o)
     {
        $sect = _('EXAMPLES');
@@ -398,36 +414,13 @@ while (length)
     }
 
     # Copyright section
-    if (/^Copyright +[(\xa9]/)
+    if (/^Copyright /)
     {
        $sect = _('COPYRIGHT');
-       $include{$sect} ||= '';
-       $include{$sect} .= ".PP\n" if $include{$sect};
-
-       my $copy;
-       ($copy, $_) = split /\n\n/, $_, 2;
-
-       for ($copy)
-       {
-           # Add back newline
-           s/\n*$/\n/;
-
-           # Convert iso9959-1 copyright symbol or (c) to nroff
-           # character.
-           s/^Copyright +(?:\xa9|\([Cc]\))/Copyright \\(co/mg;
-
-           # Insert line breaks before additional copyright messages
-           # and the disclaimer.
-           s/(.)\n(Copyright |$PAT_FREE_SOFTWARE)/$1\n.br\n$2/og;
-       }
-
-       $include{$sect} .= $copy;
-       $_ ||= '';
-       next;
     }
 
-    # Catch bug report text.
-    if (/^($PAT_BUGS) /o)
+    # Bug reporting section.
+    elsif (/^($PAT_BUGS) /o)
     {
        $sect = _('REPORTING BUGS');
     }
@@ -518,7 +511,7 @@ while (length)
     while ($indent ? s/^ {$indent}(\S.*)\n// : s/^(\S.*)\n//)
     {
        $matched .= $& if %append;
-       $content .= "\x84$1\n"
+       $content .= "\x84$1\n";
     }
 
     # Move to next paragraph.
@@ -536,6 +529,22 @@ while (length)
 
        # Escape remaining hyphens
        s/-/\x83/g;
+
+       if ($sect eq 'COPYRIGHT')
+       {
+           # Insert line breaks before additional copyright messages
+           # and the disclaimer.
+           s/\n(Copyright |$PAT_FREE_SOFTWARE)/\n.br\n$1/og;
+       }
+       elsif ($sect eq 'REPORTING BUGS')
+       {
+           # Handle multi-line bug reporting sections of the form:
+           #
+           #   Report <program> bugs to <addr>
+           #   GNU <package> home page: <url>
+           #   ...
+           s/\n([[:upper:]])/\n.br\n$1/g;
+       }
     }
 
     # Check if matched paragraph contains /pat/.
@@ -585,7 +594,7 @@ EOT
 
 # Section ordering.
 my @pre = (_('NAME'), _('SYNOPSIS'), _('DESCRIPTION'), _('OPTIONS'),
-    _('EXAMPLES'));
+    _('ENVIRONMENT'), _('FILES'), _('EXAMPLES'));
 
 my @post = (_('AUTHOR'), _('REPORTING BUGS'), _('COPYRIGHT'), _('SEE ALSO'));
 my $filter = join '|', @pre, @post;
@@ -595,9 +604,8 @@ for my $sect (@pre, (grep ! /^($filter)$/o, @include), 
@post)
 {
     if ($include{$sect})
     {
-       my $lsect = gettext $sect;
-       my $quote = $lsect =~ /\W/ ? '"' : '';
-       print ".SH $quote$lsect$quote\n";
+       my $quote = $sect =~ /\W/ ? '"' : '';
+       print enc ".SH $quote$sect$quote\n";
 
        for ($include{$sect})
        {
@@ -611,7 +619,7 @@ for my $sect (@pre, (grep ! /^($filter)$/o, @include), 
@post)
            # Convert some latin1 chars to troff equivalents
            s/\xa0/\\ /g; # non-breaking space
 
-           print;
+           print enc $_;
        }
     }
 }
@@ -621,6 +629,29 @@ close STDOUT or kark N_("%s: error writing to %s (%s)"), 
$this_program,
 
 exit;
 
+# Call program with given option and return results.
+sub get_option_value
+{
+    my ($prog, $opt) = @_;
+    my $stderr = $discard_stderr ? '/dev/null' : '&1';
+    my $value = join '',
+       map { s/ +$//; expand $_ }
+       map { dec $_ }
+       `$prog $opt 2>$stderr`;
+
+    unless ($value)
+    {
+       my $err = N_("%s: can't get `%s' info from %s%s");
+       my $extra = $discard_stderr
+           ? "\n" . N_("Try `--no-discard-stderr' if option outputs to stderr")
+           : '';
+
+       kark $err, $this_program, $opt, $prog, $extra;
+    }
+
+    return $value;
+}
+
 # Convert option dashes to \- to stop nroff from hyphenating 'em, and
 # embolden.  Option arguments get italicised.
 sub convert_option
diff --git a/lib/am/check.am b/lib/am/check.am
index abdbd01..395f8d2 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -337,7 +337,8 @@ check-TESTS recheck:
        $(MAKE) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"
 
 ## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
-recheck: %CHECK_DEPS%
+## It must also depend on the 'all' target.  See automake bug#11252.
+recheck: all %CHECK_DEPS%
 
 AM_RECURSIVE_TARGETS += check recheck
 
diff --git a/syntax-checks.mk b/syntax-checks.mk
index 930d2b2..755c1ba 100644
--- a/syntax-checks.mk
+++ b/syntax-checks.mk
@@ -33,7 +33,7 @@ xtests := $(shell \
 
 xdefs = $(srcdir)/defs $(srcdir)/defs-static.in
 
-ams := $(shell find $(srcdir) '(' -name '*.dir' -prune ')' -a -name '*.am')
+ams := $(shell find $(srcdir) '(' -name '*.dir' -prune ')' -o -name '*.am')
 
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index 30538e1..9e82e1f 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -736,6 +736,7 @@ t/parallel-tests6.sh \
 t/parallel-tests8.sh \
 t/parallel-tests9.sh \
 t/parallel-tests10.sh \
+t/parallel-tests-recheck-depends-on-all.sh \
 t/parallel-tests-exeext.sh \
 t/parallel-tests-suffix.sh \
 t/parallel-tests-suffix-prog.sh \
@@ -1183,12 +1184,13 @@ t/upc.sh \
 t/upc2.sh \
 t/upc3.sh \
 t/vala.sh \
-t/vala1.sh \
 t/vala2.sh \
 t/vala3.sh \
 t/vala4.sh \
 t/vala5.sh \
 t/vala-vapi.sh \
+t/vala-headers.sh \
+t/vala-libs.sh \
 t/vala-vpath.sh \
 t/vala-mix.sh \
 t/vala-mix2.sh \
diff --git a/t/parallel-tests-recheck-depends-on-all.sh 
b/t/parallel-tests-recheck-depends-on-all.sh
new file mode 100755
index 0000000..cec66ae
--- /dev/null
+++ b/t/parallel-tests-recheck-depends-on-all.sh
@@ -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/>.
+
+# The parallel-tests 'recheck' target must depend on the 'all' target.
+# See automake bug#11252.
+
+am_parallel_tests=yes
+required=cc
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+all-local:
+       test ! -f status || echo okokok > status
+bin_PROGRAMS = foo
+TESTS = a.test b.test c.test
+END
+
+cat > foo.c << 'END'
+#include <stdio.h>
+int main (void)
+{
+  printf ("failure :-(" "\n");
+  return 1;
+}
+END
+
+cat > a.test << 'END'
+#!/bin/sh
+exit 0
+END
+
+cat > b.test << 'END'
+#!/bin/sh
+grep okokok status
+END
+
+cat > c.test << 'END'
+#!/bin/sh
+./foo
+END
+
+chmod a+x *.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+
+$MAKE check >stdout && { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=3 pass=1 fail=2 skip=0 xfail=0 xpass=0 error=0
+test ! -f status
+
+$sleep
+: > status
+cat > foo.c << 'END'
+#include <stdio.h>
+int main (void)
+{
+  printf ("success :-)" "\n");
+  return 0;
+}
+END
+
+$MAKE recheck >stdout || { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=2 pass=2 fail=0 skip=0 xfail=0 xpass=0 error=0
+grep '^PASS: b\.test$' stdout
+grep '^PASS: c\.test$' stdout
+
+$MAKE recheck >stdout || { cat stdout; Exit 1; }
+cat stdout
+count_test_results total=0 pass=0 fail=0 skip=0 xfail=0 xpass=0 error=0
+
+:
diff --git a/t/vala2.sh b/t/vala-headers.sh
similarity index 60%
copy from t/vala2.sh
copy to t/vala-headers.sh
index 199c294..ffb66d9 100755
--- a/t/vala2.sh
+++ b/t/vala-headers.sh
@@ -16,36 +16,41 @@
 
 # Test to make sure compiling Vala code really works with recursive make.
 
-required="libtool libtoolize pkg-config valac gcc"
+required="pkg-config valac gcc GNUmake"
 . ./defs || Exit 1
 
-mkdir src
-
-cat >> 'configure.ac' << 'END'
+cat >> configure.ac << '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.4])
-AC_CONFIG_FILES([src/Makefile])
 AC_OUTPUT
 END
 
-cat > 'Makefile.am' <<'END'
-SUBDIRS = src
-END
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz quux
 
-cat > 'src/Makefile.am' <<'END'
-bin_PROGRAMS = zardoz
-zardoz_VALAFLAGS = -H zardoz.h
-zardoz_CFLAGS = $(GOBJECT_CFLAGS)
-zardoz_LDADD = $(GOBJECT_LIBS)
 zardoz_SOURCES = zardoz.vala
+quux_SOURCES = quux.vala
+quux.vala: zardoz.vala
+       sed 's/Zardoz/Quux/' <zardoz.vala >quux.vala
+
+quux_VALAFLAGS = \
+  --header HDR.h \
+  --vapi hello.vapi
+
+zardoz_VALAFLAGS = \
+  -H foo.h \
+  --internal-header foo2.h \
+  --internal-vapi foo3.vapi
+
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+LDADD = $(GOBJECT_LIBS)
 END
 
-cat > 'src/zardoz.vala' <<'END'
-using GLib;
+headers='HDR.h hello.vapi foo.h foo2.h foo3.vapi'
 
+cat > zardoz.vala << 'END'
+using GLib;
 public class Zardoz {
   public static void main () {
     stdout.printf ("Zardoz!\n");
@@ -53,8 +58,6 @@ public class Zardoz {
 }
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -63,25 +66,20 @@ $AUTOMAKE -a
 $MAKE
 
 # Test rebuild rules.
-rm -f src/zardoz.h
-$MAKE -C src zardoz.h
 
-$MAKE distcheck
-$MAKE distclean
-mkdir build
-cd build
-../configure
-$MAKE
+for h in $headers; do
+  rm -f $h
+  $MAKE $h
+  test -f $h
+done
+
+rm -f $headers
+$MAKE $headers
+for h in $headers; do test -f $h; done
+
 $MAKE distcheck
 
-# Test rebuild rules from builddir.
-rm -f ../src/zardoz.c
-$MAKE
-grep 'Zardoz!' ../src/zardoz.c
-sed 's/Zardoz!/FooBar!/' ../src/zardoz.c > t
-mv -f t ../src/zardoz.c
-$MAKE
-grep 'FooBar!' ../src/zardoz.c
-grep 'Zardoz!' ../src/zardoz.c && Exit 1
+$MAKE maintainer-clean
+for h in $headers; do test ! -f $h; done
 
 :
diff --git a/t/vala-libs.sh b/t/vala-libs.sh
new file mode 100755
index 0000000..fa1d21b
--- /dev/null
+++ b/t/vala-libs.sh
@@ -0,0 +1,100 @@
+#! /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/>.
+
+# Building libraries (libtool and static) from Vala sources.
+# And use of vapi files to call C code from Vala.
+
+required="valac cc pkg-config libtoolize GNUmake"
+. ./defs || Exit 1
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AM_PROG_AR
+AC_PROG_RANLIB
+AC_PROG_LIBTOOL
+AM_PROG_VALAC([0.7.3])
+PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.4])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+lib_LIBRARIES = libmu.a
+lib_LTLIBRARIES = src/libzardoz.la
+libmu_a_SOURCES = mu.vala mu2.c mu.vapi mu2.h
+libmu_a_CPPFLAGS = -DOKOKIMDEFINED=1
+libmu_a_VALAFLAGS = --profile=posix --vapidir=$(srcdir)
+AM_CFLAGS = $(GOBJECT_CFLAGS)
+src_libzardoz_la_LIBADD = $(GOBJECT_LIBS)
+src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
+src/zardoz-bar.vala: src/zardoz-foo.vala
+       sed 's/Foo/Bar/g' $< >$@
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure || skip_ "configure failed"
+
+cat > mu2.c << 'END'
+#include "mu2.h"
+int mu2 (void)
+{
+  return OKOKIMDEFINED;
+}
+END
+
+cat > mu2.h << 'END'
+int mu2 (void);
+END
+
+cat > mu.vapi <<'END'
+[CCode (cheader_filename = "mu2.h", cname = "mu2")]
+public int c_mu2 ();
+END
+
+cat > mu.vala << 'END'
+int main ()
+{
+  stdout.printf ("mumumu\n");
+  return c_mu2 ();
+}
+END
+
+mkdir src
+cat > src/zardoz-foo.vala << 'END'
+using GLib;
+public class Foo {
+  public static void zap () {
+    stdout.printf ("FooFooFoo!\n");
+  }
+}
+END
+
+$MAKE
+test -f libmu.a
+test -f src/libzardoz.la
+$FGREP "mumumu" mu.c
+$FGREP "FooFooFoo" src/zardoz-foo.c
+$FGREP "BarBarBar" src/zardoz-bar.c
+test -f libmu_a_vala.stamp
+test -f src_libzardoz_la_vala.stamp
+
+$MAKE distcheck
+
+:
diff --git a/t/vala-vpath.sh b/t/vala-vpath.sh
index d863c8e..2670cb9 100755
--- a/t/vala-vpath.sh
+++ b/t/vala-vpath.sh
@@ -17,7 +17,7 @@
 # Test to make sure vala support handles from-scratch VPATH builds.
 # See automake bug#8753.
 
-required=valac
+required="cc valac"
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
@@ -28,9 +28,11 @@ AC_OUTPUT
 END
 
 cat > Makefile.am <<'END'
-bin_PROGRAMS = foo
-foo_VALAFLAGS = --profile=posix
+bin_PROGRAMS = foo bar
+AM_VALAFLAGS = --profile=posix
 foo_SOURCES = hello.vala
+bar_VALAFLAGS = $(AM_VALAFLAGS) -H zardoz.h
+bar_SOURCES = goodbye.vala
 END
 
 cat > hello.vala <<'END'
@@ -39,19 +41,24 @@ void main ()
   stdout.printf ("foofoofoo\n");
 }
 END
+cp hello.vala goodbye.vala
 
-$ACLOCAL  || framework_failure_ "aclocal error"
-$AUTOCONF || framework_failure_ "autoconf error"
-$AUTOMAKE || framework_failure_ "automake error"
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
 
 mkdir build
 cd build
 ../configure || Exit 77
 $MAKE
+test -f ../foo_vala.stamp
+test -f ../bar_vala.stamp
 grep foofoofoo ../hello.c
+test -f ../zardoz.h
 $MAKE distcheck
 
 # Rebuild rules work also in VPATH builds.
+
 cat > ../hello.vala <<'END'
 int main ()
 {
@@ -61,10 +68,24 @@ int main ()
 END
 
 $MAKE
+test -f ../foo_vala.stamp
+test -f ../bar_vala.stamp
 grep barbarbar ../hello.c
 
 # Rebuild rules are not uselessly triggered.
 $MAKE -q
 $MAKE -n | grep '\.stamp' && Exit 1
 
+# Cleanup rules work also in VPATH builds.
+$MAKE clean
+test -f ../foo_vala.stamp
+test -f ../bar_vala.stamp
+test -f ../zardoz.h
+test -f ../hello.c
+$MAKE maintainer-clean
+test ! -f ../zardoz.h
+test ! -f ../hello.c
+test ! -f ../foo_vala.stamp
+test ! -f ../bar_vala.stamp
+
 :
diff --git a/t/vala1.sh b/t/vala1.sh
deleted file mode 100755
index 9aca0fb..0000000
--- a/t/vala1.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996-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/>.
-
-# Test to make sure intermediate .c files are built from vala sources
-# in non-recursive automake mode.
-
-required="libtool"
-. ./defs || Exit 1
-
-cat >> 'configure.ac' << 'END'
-AC_PROG_CC
-AM_PROG_AR
-AC_PROG_LIBTOOL
-AM_PROG_VALAC
-AC_OUTPUT
-END
-
-cat > 'Makefile.am' <<'END'
-bin_PROGRAMS = src/zardoz
-src_zardoz_SOURCES = src/zardoz.vala
-
-lib_LTLIBRARIES = src/libzardoz.la
-src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
-END
-
-: > ltmain.sh
-: > config.sub
-: > config.guess
-
-$ACLOCAL
-$AUTOMAKE -a
-
-grep 'VALAC' Makefile.in
-grep 'src_zardoz_OBJECTS' Makefile.in
-grep 'src_libzardoz_la_OBJECTS' Makefile.in
-grep 'src_zardoz_vala.stamp' Makefile.in
-grep 'src_libzardoz_la_vala.stamp' Makefile.in
-grep 'zardoz\.c' Makefile.in
-grep 'src/zardoz-foo\.c' Makefile.in
diff --git a/t/vala2.sh b/t/vala2.sh
index 199c294..407ccac 100755
--- a/t/vala2.sh
+++ b/t/vala2.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure compiling Vala code really works with recursive make.
 
-required="libtool libtoolize pkg-config valac gcc"
+required="pkg-config valac gcc"
 . ./defs || Exit 1
 
 mkdir src
@@ -24,7 +24,6 @@ mkdir src
 cat >> 'configure.ac' << '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.4])
 AC_CONFIG_FILES([src/Makefile])
@@ -53,8 +52,6 @@ public class Zardoz {
 }
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -63,11 +60,28 @@ $AUTOMAKE -a
 $MAKE
 
 # Test rebuild rules.
+
 rm -f src/zardoz.h
 $MAKE -C src zardoz.h
+test -f src/zardoz.h
+rm -f src/zardoz.c
+$MAKE -C src
+test -f src/zardoz.c
+
+echo am--error > src/zardoz.h
+echo am--error > src/zardoz.c
+$sleep
+touch src/zardoz.vala
+$MAKE
+grep 'am--error' src/zardoz.[ch] && Exit 1
+
+# Check the distribution.
 
 $MAKE distcheck
 $MAKE distclean
+
+# Tru a VPATH setup.
+
 mkdir build
 cd build
 ../configure
@@ -75,11 +89,18 @@ $MAKE
 $MAKE distcheck
 
 # Test rebuild rules from builddir.
+
+rm -f ../src/zardoz.h
+$MAKE -C src ../../src/zardoz.h
+test -f ../src/zardoz.h
+
 rm -f ../src/zardoz.c
 $MAKE
 grep 'Zardoz!' ../src/zardoz.c
-sed 's/Zardoz!/FooBar!/' ../src/zardoz.c > t
-mv -f t ../src/zardoz.c
+
+$sleep
+sed 's/Zardoz!/FooBar!/' ../src/zardoz.vala > t
+mv -f t ../src/zardoz.vala
 $MAKE
 grep 'FooBar!' ../src/zardoz.c
 grep 'Zardoz!' ../src/zardoz.c && Exit 1
diff --git a/t/vala3.sh b/t/vala3.sh
index 641268f..b2de400 100755
--- a/t/vala3.sh
+++ b/t/vala3.sh
@@ -16,7 +16,7 @@
 
 # Test to make sure compiling Vala code really works with non-recursive make.
 
-required="libtool libtoolize pkg-config valac gcc"
+required="pkg-config valac gcc"
 . ./defs || Exit 1
 
 mkdir src
@@ -24,7 +24,6 @@ mkdir src
 cat >> 'configure.ac' << '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.4])
 AC_OUTPUT
@@ -47,16 +46,19 @@ src_zardoz_LDADD = $(GOBJECT_LIBS)
 src_zardoz_SOURCES = src/zardoz.vala
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
 ./configure || skip_ "configure failure"
 $MAKE
+test -f src/zardoz.c
+test -f src_zardoz_vala.stamp
 $MAKE distcheck
-$MAKE distclean
+$MAKE maintainer-clean
+test ! -f src/zardoz.c
+test ! -f src_zardoz_vala.stamp
+
 mkdir build
 cd build
 ../configure
@@ -77,8 +79,6 @@ src_zardoz_LDADD = $(GOBJECT_LIBS)
 src_zardoz_SOURCES = src/zardoz.vala
 END
 
-libtoolize
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
diff --git a/t/vala4.sh b/t/vala4.sh
index 2e776ed..067ea3f 100755
--- a/t/vala4.sh
+++ b/t/vala4.sh
@@ -16,12 +16,10 @@
 
 # Test AM_PROG_VALAC.
 
-required=libtoolize
 . ./defs || Exit 1
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
-AC_PROG_LIBTOOL
 AM_PROG_VALAC([0.0.1])
 AC_OUTPUT
 END
@@ -42,7 +40,6 @@ cwd=`pwd`
 # Use $cwd instead of `pwd` in the && list below to avoid a bug in
 # the way Solaris/Heirloom Sh handles 'set -e'.
 
-libtoolize
 $ACLOCAL
 $AUTOMAKE -a
 $AUTOCONF
diff --git a/t/vala5.sh b/t/vala5.sh
index 164fa6e..8a274ff 100755
--- a/t/vala5.sh
+++ b/t/vala5.sh
@@ -80,4 +80,24 @@ if cross_compiling; then :; else
   test `./src/bar` = bar
 fi
 
+# Test clean rules.
+
+cp config.status config.sav
+
+$MAKE clean
+test -f src/xfoo.c
+test -f src/xbar.c
+
+$MAKE distclean
+test -f src/xfoo.c
+test -f src/xbar.c
+
+# Re-create Makefile.
+mv config.sav config.status
+./config.status
+
+$MAKE maintainer-clean
+test ! -f src/xfoo.c
+test ! -f src/xbar.c
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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