automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.13.1d-13


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.13.1d-135-g9f21b55
Date: Fri, 10 May 2013 23:24:43 +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=9f21b55d38e8983090ce169969a2f8f1f6645583

The branch, maint has been updated
       via  9f21b55d38e8983090ce169969a2f8f1f6645583 (commit)
       via  421f0ad97b4344e7ed35321850df1ae896ed7298 (commit)
       via  74be388e1871d54940ef5d3f8650efec37215ef0 (commit)
       via  90ec3fe5aa8aed2a1c42751f91ffaa438cf04867 (commit)
       via  9a0d4868528e29af16877568a2da664ef640b7fe (commit)
       via  117ddf8d25420691edbd065a85f64cd8a283e1c0 (commit)
       via  f7ef16feb40d3ea8b126ec29b31dae5cec31faf0 (commit)
       via  6e486c5db436b0145280806655b17a462d2f827b (commit)
       via  b636268a12d1a0fdee3eb4ac0f8e9a1eaf45da80 (commit)
       via  efa6880fa10ce8ccc0e0c34c6603fd15169501a0 (commit)
       via  b602d99c9a85f00067553458d8ed2fd96b8d5bb7 (commit)
       via  7a2ff99d85c7abcd2753e9815fc8fdac4b13e38f (commit)
       via  0fd44c9b41405cf3d9580de77b5242cdae37c637 (commit)
       via  ebadaac0d292c6f6c0fded6074d54c3eedca02bc (commit)
       via  0709f52fabeb1f4bbab46a8349471ced111a716e (commit)
       via  c0e30c4f1a7dc7c983a0621dabbd7682eed06e96 (commit)
       via  cfba5c03994cf6784de1c68f92c0d3d3f5cae7bc (commit)
       via  05703b1ad6ae8728d360d28e385cc6187dbe2102 (commit)
       via  780299d96327ac43de44e38173c0162ed2c10474 (commit)
      from  0736c67c71d2d8611d48abb253a9058736bd18bd (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 NEWS                                    |   12 ++++++-
 PLANS/obsolete-removed/configure.in.txt |    6 ++--
 PLANS/rm-f-without-args.txt             |    4 +-
 PLANS/texi/drop-split-info-files.txt    |    6 ++--
 THANKS                                  |    2 +-
 bin/automake.in                         |   14 +++----
 doc/automake.texi                       |   19 ++++++----
 lib/Automake/Options.pm                 |   54 ++++++++++++++++++++--------
 lib/am/distdir.am                       |    6 +++
 maintainer/syntax-checks.mk             |    4 +-
 t/dist-formats.tap                      |   50 ++++++++++----------------
 t/{lzma.sh => dist-lzma.sh}             |    4 +-
 t/{lzma.sh => dist-shar.sh}             |   26 ++++++++-----
 t/dist-tarZ.sh                          |   59 +++++++++++++++++++++++++++++++
 t/list-of-tests.mk                      |    4 ++-
 15 files changed, 185 insertions(+), 85 deletions(-)
 copy t/{lzma.sh => dist-lzma.sh} (95%)
 rename t/{lzma.sh => dist-shar.sh} (66%)
 create mode 100755 t/dist-tarZ.sh

diff --git a/NEWS b/NEWS
index 8cb006d..7f9f6fc 100644
--- a/NEWS
+++ b/NEWS
@@ -95,6 +95,16 @@ New in 1.14:
     <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35>
     <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44>
 
+  - The next major Automake version (2.0) will unconditionally turn on
+    the 'subdir-objects' option.  In order to smooth out the transition,
+    we now give a warning (in the category 'unsupported') whenever a
+    source file is present in a subdirectory but the 'subdir-object' is
+    not enabled.  For example, the following usage will trigger such a
+    warning (of course, assuming the 'subdir-objects' option is off):
+
+        bin_PROGRAMS = sub/foo
+        sub_foo_SOURCES = sub/main.c sub/bar.c
+
   - Automake will automatically enhance the AC_PROG_CC autoconf macro
     to make it check, at configure time, that the C compiler supports
     the combined use of both the "-c -o" options.  This "rewrite" of
@@ -135,7 +145,7 @@ New in 1.14:
     Now that we have the 'info-in-builddir' option that explicitly causes
     generated '.info' files to be placed in the builddir, this hack should
     be longer necessary, so we deprecate it with runtime warnings.  It will
-    likely be removed altogether in Automake 1.14.
+    likely be removed altogether in Automake 2.0.
 
 * Relative directory in Makefile fragments:
 
diff --git a/PLANS/obsolete-removed/configure.in.txt 
b/PLANS/obsolete-removed/configure.in.txt
index 180f92c..d3f6da7 100644
--- a/PLANS/obsolete-removed/configure.in.txt
+++ b/PLANS/obsolete-removed/configure.in.txt
@@ -1,5 +1,5 @@
-In Automake 1.13.x
-------------------
+In Automake 1.13.x (once planned, then dropped)
+-----------------------------------------------
 
 We are already warning about 'configure.in' used as the name for the
 Autoconf input file ('configure.ac' should be used instead); we've
@@ -24,5 +24,5 @@ that Autoconf will actually have started deprecating 
'configure.in'
 by the time Automake 2.0 is released.
 
 Note that the removal of 'configure.in' has already been implemented
-in our 'next' branch (from where the 2.0 release will be finally
+in our 'master' branch (from where the 2.0 release will be finally
 cut); see commits 'v1.13-17-gbff57c8' and 'v1.13-21-g7626e63'.
diff --git a/PLANS/rm-f-without-args.txt b/PLANS/rm-f-without-args.txt
index 918e049..b940fc3 100644
--- a/PLANS/rm-f-without-args.txt
+++ b/PLANS/rm-f-without-args.txt
@@ -13,8 +13,8 @@ accordingly, to get rid of the awful idiom:
 
 See automake bug#10828.
 
-For Automake 1.13.2 (DONE)
---------------------------
+For Automake 1.14 (DONE)
+------------------------
 
 Add a temporary "probe check" in AM_INIT_AUTOMAKE that verifies that
 the no-args "rm -f" usage is supported on the system configure is
diff --git a/PLANS/texi/drop-split-info-files.txt 
b/PLANS/texi/drop-split-info-files.txt
index 8b36ecb..a0a5636 100644
--- a/PLANS/texi/drop-split-info-files.txt
+++ b/PLANS/texi/drop-split-info-files.txt
@@ -1,7 +1,7 @@
-For automake 2.0
-----------------
+For in Automake 2.0 (DONE)
+--------------------------
 
-We want to drop split info files in Automake 2.0.
+We will drop split info files in Automake 2.0.
 See automake bug#13351: <http://debbugs.gnu.org/13351>.
 
 Basically, it has been confirmed that the original reason behind
diff --git a/THANKS b/THANKS
index 66b3270..fe7a7de 100644
--- a/THANKS
+++ b/THANKS
@@ -108,7 +108,7 @@ Elmar Hoffmann                  address@hidden
 Elrond                          address@hidden
 Enrico Scholz                   address@hidden
 Erez Zadok                      address@hidden
-Eric Blake                      address@hidden
+Eric Blake                      address@hidden
 Eric Dorland                    address@hidden
 Eric Magnien                    address@hidden
 Eric Siegerman                  address@hidden
diff --git a/bin/automake.in b/bin/automake.in
index 3614b6b..c95289f 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -1148,7 +1148,7 @@ sub handle_silent ()
 ################################################################
 
 
-# Handle AUTOMAKE_OPTIONS variable.  Return 1 on error, 0 otherwise.
+# Handle AUTOMAKE_OPTIONS variable.  Return 0 on error, 1 otherwise.
 sub handle_options ()
 {
   my $var = var ('AUTOMAKE_OPTIONS');
@@ -1162,7 +1162,7 @@ sub handle_options ()
       my @options = map { { option => $_->[1], where => $_->[0] } }
                        $var->value_as_list_recursive (cond_filter => TRUE,
                                                       location => 1);
-      return 1 if process_option_list (@options);
+      return 0 unless process_option_list (@options);
     }
 
   if ($strictness == GNITS)
@@ -1172,7 +1172,7 @@ sub handle_options ()
       set_option ('check-news', INTERNAL);
     }
 
-  return 0;
+  return 1;
 }
 
 # shadow_unconditionally ($varname, $where)
@@ -5235,10 +5235,8 @@ sub scan_autoconf_traces
        }
       elsif ($macro eq 'AM_PROG_MKDIR_P')
        {
-          # FIXME: we are no longer going to remove this! adjust warning
-          # FIXME: message accordingly.
          msg 'obsolete', $where, <<'EOF';
-The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
+The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
 You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
 and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
 EOF
@@ -5280,7 +5278,7 @@ EOF
            {
              my @opts = split (' ', $args[1]);
              @opts = map { { option => $_, where => $where } } @opts;
-             exit $exit_code if process_global_option_list (@opts);
+             exit $exit_code unless process_global_option_list (@opts);
            }
        }
       elsif ($macro eq 'AM_MAINTAINER_MODE')
@@ -7731,7 +7729,7 @@ sub generate_makefile
   $relative_dir = dirname ($makefile);
 
   read_main_am_file ($makefile_am, $makefile_in);
-  if (handle_options)
+  if (not handle_options)
     {
       # Process buffered warnings.
       flush_messages;
diff --git a/doc/automake.texi b/doc/automake.texi
index 8b5125e..b7ae709 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8706,13 +8706,16 @@ Generate a @samp{zip} archive of the distribution.
 
 @item @code{dist-tarZ}
 Generate a tar archive of the distribution, compressed with the
-historical (obsolescent) program @command{compress}.  Use of this
-option is discouraged.
+historical (and obsolescent) program @command{compress}.  This
+option is deprecated, and it and the corresponding functionality
+will be removed altogether in Automake 2.0.
 @trindex dist-tarZ
 
 @item @code{dist-shar}
-Generate a @samp{shar} archive of the distribution.  This format archive
-is obsolescent, and use of this option is discouraged.
+Generate a @samp{shar} archive of the distribution.  This format
+archive is obsolescent, and use of this option is deprecated.
+It and the corresponding functionality will be removed altogether
+in Automake 2.0.
 @trindex dist-shar
 
 @end table
@@ -10108,15 +10111,17 @@ Hook @code{dist-zip} to @code{dist}.
 @cindex Option, @option{dist-shar}
 @opindex dist-shar
 Hook @code{dist-shar} to @code{dist}.  Use of this option
-is discouraged, as the @samp{shar} format is obsolescent and
-problematic.
+is deprecated, as the @samp{shar} format is obsolescent and
+problematic.  Support for it will be removed altogether in
+Automake 2.0.
 @trindex dist-shar
 
 @item @option{dist-tarZ}
 @cindex Option, @option{dist-tarZ}
 @opindex dist-tarZ
 Hook @code{dist-tarZ} to @code{dist}.  Use of this option
-is discouraged, as the @samp{compress} program is obsolete.
+is deprecated, as the @samp{compress} program is obsolete.
+Support for it will be removed altogether in Automake 2.0.
 @trindex dist-tarZ
 
 @item @option{filename-length-max=99}
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index e3f551a..db5661c 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -241,24 +241,27 @@ These functions should be called at most once for each 
set of options
 having the same precedence; i.e., do not call it twice for two options
 from C<AM_INIT_AUTOMAKE>.
 
-Return 1 on error, 0 otherwise.
+Return 0 on error, 1 otherwise.
 
 =cut
 
-# _option_must_be_from_configure ($OPTION, $WHERE)
+# $BOOL
+# _option_is_from_configure ($OPTION, $WHERE)
 # ----------------------------------------------
 # Check that the $OPTION given in location $WHERE is specified with
 # AM_INIT_AUTOMAKE, not with AUTOMAKE_OPTIONS.
-sub _option_must_be_from_configure ($$)
+sub _option_is_from_configure ($$)
 {
   my ($opt, $where)= @_;
-  return
+  return 1
     if $where->get =~ /^configure\./;
   error $where,
         "option '$opt' can only be used as argument to AM_INIT_AUTOMAKE\n" .
         "but not in AUTOMAKE_OPTIONS makefile statements";
+  return 0;
 }
 
+# $BOOL
 # _is_valid_easy_option ($OPTION)
 # -------------------------------
 # Explicitly recognize valid automake options that require no
@@ -272,8 +275,6 @@ sub _is_valid_easy_option ($)
     dejagnu
     dist-bzip2
     dist-lzip
-    dist-shar
-    dist-tarZ
     dist-xz
     dist-zip
     info-in-builddir
@@ -306,6 +307,7 @@ sub _process_option_list (\%@)
 {
   my ($options, @list) = @_;
   my @warnings = ();
+  my $ret = 1;
 
   foreach my $h (@list)
     {
@@ -322,17 +324,35 @@ sub _process_option_list (\%@)
           # Obsolete (and now removed) de-ANSI-fication support.
           error ($where,
                  "automatic de-ANSI-fication support has been removed");
+          $ret = 0;
         }
       # TODO: Remove this special check in Automake 3.0.
       elsif ($_ eq 'cygnus')
         {
           error $where, "support for Cygnus-style trees has been removed";
+          $ret = 0;
         }
       # TODO: Remove this special check in Automake 3.0.
       elsif ($_ eq 'dist-lzma')
         {
           error ($where, "support for lzma-compressed distribution " .
                          "archives has been removed");
+          $ret = 0;
+        }
+      # TODO: Make this a fatal error in Automake 2.0.
+      elsif ($_ eq 'dist-shar')
+        {
+          msg ('obsolete', $where,
+               "support for shar distribution archives is deprecated.\n" .
+               "  It will be removed in Automake 2.0");
+        }
+      # TODO: Make this a fatal error in Automake 2.0.
+      elsif ($_ eq 'dist-tarZ')
+        {
+          msg ('obsolete', $where,
+               "support for distribution archives compressed with " .
+               "legacy program 'compress' is deprecated.\n" .
+               "  It will be removed in Automake 2.0");
         }
       elsif (/^filename-length-max=(\d+)$/)
         {
@@ -341,14 +361,17 @@ sub _process_option_list (\%@)
         }
       elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
         {
-          _option_must_be_from_configure ($_, $where);
+          if (not _option_is_from_configure ($_, $where))
+            {
+              $ret = 0;
+            }
           for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
             {
               next
                 if $opt eq $_ or ! exists $options->{$opt};
               error ($where,
                      "options '$_' and '$opt' are mutually exclusive");
-              last;
+              $ret = 0;
             }
         }
       elsif (/^\d+\.\d+(?:\.\d+)?[a-z]?(?:-[A-Za-z0-9]+)?$/)
@@ -358,7 +381,7 @@ sub _process_option_list (\%@)
             {
               error ($where, "require Automake $_, but have $VERSION",
                      uniq_scope => US_GLOBAL);
-              return 1;
+              $ret = 0;
             }
         }
       elsif (/^(?:--warnings=|-W)(.*)$/)
@@ -368,11 +391,11 @@ sub _process_option_list (\%@)
         }
       elsif (! _is_valid_easy_option $_)
         {
-          error ($where, "option '$_' not recognized",
-                 uniq_scope => US_GLOBAL);
-          return 1;
+          error ($where, "option '$_' not recognized");
+          $ret = 0;
         }
     }
+
   # We process warnings here, so that any explicitly-given warning setting
   # will take precedence over warning settings defined implicitly by the
   # strictness.
@@ -382,23 +405,24 @@ sub _process_option_list (\%@)
           "unknown warning category '$w->{'cat'}'"
         if switch_warning $w->{cat};
     }
-  return 0;
+
+  return $ret;
 }
 
 sub process_option_list (@)
 {
   prog_error "local options already processed"
     if $_options_processed;
-  return _process_option_list (%_options, @_);
   $_options_processed = 1;
+  _process_option_list (%_options, @_);
 }
 
 sub process_global_option_list (@)
 {
   prog_error "global options already processed"
     if $_global_options_processed;
-  return _process_option_list (%_global_options, @_);
   $_global_options_processed = 1;
+  _process_option_list (%_global_options, @_);
 }
 
 =item C<set_strictness ($name)>
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index e5d8d5e..0e5f6bd 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -339,12 +339,18 @@ dist-xz: distdir
 ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
 .PHONY: dist-tarZ
 dist-tarZ: distdir
+       @echo WARNING: "Support for shar distribution archives is" \
+                      "deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__post_remove_distdir)
 
 ?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
 .PHONY: dist-shar
 dist-shar: distdir
+       @echo WARNING: "Support for distribution archives compressed with" \
+                      "legacy program 'compress' is deprecated." >&2
+       @echo WARNING: "It will be removed altogether in Automake 2.0" >&2
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
        $(am__post_remove_distdir)
 
diff --git a/maintainer/syntax-checks.mk b/maintainer/syntax-checks.mk
index 61fcef3..76670ea 100644
--- a/maintainer/syntax-checks.mk
+++ b/maintainer/syntax-checks.mk
@@ -508,11 +508,11 @@ sc_tests_PATH_SEPARATOR:
 ## Try to make sure all @...@ substitutions are covered by our
 ## substitution rule.
 sc_perl_at_substs:
-       @if test `grep -E 'address@hidden@' aclocal | wc -l` -ne 0; then \
+       @if test `grep -E 'address@hidden@' bin/aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
        fi
-       @if test `grep -E 'address@hidden@' automake | wc -l` -ne 0; then \
+       @if test `grep -E 'address@hidden@' bin/automake | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in automake" 1>&2; \
          exit 1; \
        fi
diff --git a/t/dist-formats.tap b/t/dist-formats.tap
index 730fa5d..bebac37 100755
--- a/t/dist-formats.tap
+++ b/t/dist-formats.tap
@@ -20,7 +20,7 @@
 am_create_testdir=empty
 . test-init.sh
 
-plan_ 70
+plan_ 66
 
 # ---------------------------------------------------- #
 #  Common and/or auxiliary subroutines and variables.  #
@@ -56,12 +56,10 @@ setup_vars_for_compression_format ()
   suffix=NONE compressor=NONE
   case $1 in
     gzip) suffix=tar.gz  compressor=gzip     ;;
-    tarZ) suffix=tar.Z   compressor=compress ;;
     lzip) suffix=tar.lz  compressor=lzip     ;;
       xz) suffix=tar.xz  compressor=xz       ;;
    bzip2) suffix=tar.bz2 compressor=bzip2    ;;
      zip) suffix=zip     compressor=zip      ;;
-    shar) suffix=shar.gz compressor=shar     ;;
        *) fatal_ "invalid compression format '$1'";;
   esac
 }
@@ -73,20 +71,6 @@ have_compressor ()
     # Assume gzip(1) is available on every reasonable portability target.
     gzip)
       return 0;;
-    # On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
-    # and is just a dummy script that is not able to actually compress
-    # (it can only decompress).  So, check that the 'compress' program
-    # is actually able to compress input.
-    # Note that, at least on GNU/Linux, 'compress' does (and is
-    # documented to) exit with status 2 if the output is larger than
-    # the input after (attempted) compression; so we need to pass it
-    # an input that it can actually reduce in size when compressing.
-    compress)
-      for x in 1 2 3 4 5 6 7 8; do
-        echo aaaaaaaaaaaaaaaaaaaaa
-      done | compress -c >/dev/null && return 0
-      return 1
-      ;;
     *)
       case $1 in
         # Do not use --version, or older versions bzip2 would try to
@@ -113,7 +97,7 @@ have_compressor ()
   fatal_ "have_compressor(): dead code reached"
 }
 
-all_compression_formats='gzip tarZ lzip xz bzip2 zip shar'
+all_compression_formats='gzip lzip xz bzip2 zip'
 
 all_compressors=$(
   for x in $all_compression_formats; do
@@ -305,7 +289,7 @@ END
 nogzip in am  and  bzip2  in  am
 nogzip in ac  and  xz     in  am
 nogzip in am  and  lzip   in  ac
-nogzip in ac  and  tarZ   in  ac
+nogzip in ac  and  zip    in  ac
 
 
 # ----------------------------------------------------------- #
@@ -324,13 +308,13 @@ end_subtest
 #  Parallel compression.  #
 # ----------------------- #
 
-# We only use formats requiring 'gzip', 'bzip2' and 'compress' programs,
-# since there are the most likely to be all found on the great majority
+# We only use formats requiring 'gzip', 'bzip2' and 'xz' programs,
+# since there are the most likely to be all found on the majority
 # of systems.
 
-start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-tarZ
+start_subtest parallel-compression ac_opts=dist-bzip2 am_opts=dist-xz
 
-desc=gzip+bzip2+tarZ
+desc=gzip+bzip2+xz
 tarname=parallel-compression-1.0
 
 check_tarball ()
@@ -353,11 +337,17 @@ check_tarball ()
 
 command_ok_ "$desc [automake]" $AUTOMAKE
 
-skip_reason=
-have_compressor compress || skip_reason="'compress' not available"
-have_compressor bzip2 || skip_reason="'bzip2' not available"
+if ! have_compressor xz && ! have_compressor bzip2; then
+  skip_reason="both 'bzip2' and 'xz' are unavailable"
+elif ! have_compressor xz; then
+  skip_reason="'xz' not available"
+elif ! have_compressor bzip2; then
+  skip_reason="'bzip2' not available"
+else
+  skip_reason=
+fi
 if test "$MAKE_j4" = false; then
-  test -z "$skip_reason" || skip_reason="$skip_reason and "
+  test -z "$skip_reason" || skip_reason="$skip_reason, and "
   skip_reason="${skip_reason}make concurrency unavailable"
 fi
 
@@ -370,7 +360,7 @@ else
   ls -l # For debugging.
   command_ok_ "$desc [check .tar.gz tarball]"  check_tarball gzip
   command_ok_ "$desc [check .tar.bz2 tarball]" check_tarball bzip2
-  command_ok_ "$desc [check .tar.Z tarball]"   check_tarball tarZ
+  command_ok_ "$desc [check .tar.xz tarball]"  check_tarball xz
 fi
 
 unset tarname desc skip_reason
@@ -445,8 +435,8 @@ END
 chmod a+x check-distdir grep-distdir-error
 for prog in tar $all_compressors; do
   case $prog in
-    tar|shar|zip) cp check-distdir $prog;;
-               *) cp grep-distdir-error $prog;;
+    tar|zip) cp check-distdir $prog;;
+          *) cp grep-distdir-error $prog;;
   esac
 done
 unset prog
diff --git a/t/lzma.sh b/t/dist-lzma.sh
similarity index 95%
copy from t/lzma.sh
copy to t/dist-lzma.sh
index 30fc689..d1d3e4b 100755
--- a/t/lzma.sh
+++ b/t/dist-lzma.sh
@@ -25,8 +25,8 @@ $ACLOCAL --force
 AUTOMAKE_fails -Wnone -Wno-error
 grep "^Makefile\\.am:1:.*$errmsg" stderr
 
-cat > configure.ac << 'END'
-AC_INIT([lzma], [1.0])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
diff --git a/t/lzma.sh b/t/dist-shar.sh
similarity index 66%
rename from t/lzma.sh
rename to t/dist-shar.sh
index 30fc689..cd04425 100755
--- a/t/lzma.sh
+++ b/t/dist-shar.sh
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003-2013 Free Software Foundation, Inc.
+# Copyright (C) 2013 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
@@ -14,20 +14,21 @@
 # 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 support for no-dist-gzip with lzma.
+# Check support for no-dist-gzip with dist-shar.
 
+required=shar
 . test-init.sh
 
-errmsg='support for lzma.*removed'
+errmsg='support for shar .*deprecated'
 
-echo AUTOMAKE_OPTIONS = dist-lzma > Makefile.am
-$ACLOCAL --force
-AUTOMAKE_fails -Wnone -Wno-error
+echo AUTOMAKE_OPTIONS = dist-shar > Makefile.am
+$ACLOCAL
+AUTOMAKE_fails -Wnone -Wobsolete
 grep "^Makefile\\.am:1:.*$errmsg" stderr
 
-cat > configure.ac << 'END'
-AC_INIT([lzma], [1.0])
-AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-shar])
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -35,7 +36,12 @@ END
 
 rm -rf autom4te*.cache
 $ACLOCAL
-AUTOMAKE_fails -Wnone -Wno-error
+AUTOMAKE_run -Wno-error
 grep "^configure\\.ac:2:.*$errmsg" stderr
 
+$AUTOCONF
+./configure
+$MAKE distcheck
+test -f $distdir.shar.gz
+
 :
diff --git a/t/dist-tarZ.sh b/t/dist-tarZ.sh
new file mode 100755
index 0000000..f276481
--- /dev/null
+++ b/t/dist-tarZ.sh
@@ -0,0 +1,59 @@
+#! /bin/sh
+# Copyright (C) 2013 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 support for no-dist-gzip with dist-tarZ.
+
+. test-init.sh
+
+# On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
+# and is just a dummy script that is not able to actually compress
+# (it can only decompress).  So, check that the 'compress' program
+# is actually able to compress input.
+# Note that, at least on GNU/Linux, 'compress' does (and is
+# documented to) exit with status 2 if the output is larger than
+# the input after (attempted) compression; so we need to pass it
+# an input that it can actually reduce in size when compressing.
+for x in 1 2 3 4 5 6 7 8; do
+  echo aaaaaaaaaaaaaaaaaaaaa
+done | compress -c >/dev/null \
+  || skip_ "cannot find a working 'compress' program"
+
+errmsg=".*legacy .*'compress' .*deprecated"
+
+echo AUTOMAKE_OPTIONS = dist-tarZ > Makefile.am
+$ACLOCAL
+AUTOMAKE_fails -Wnone -Wobsolete
+grep "^Makefile\\.am:1:.*$errmsg" stderr
+
+cat > configure.ac <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-tarZ])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+: > Makefile.am
+
+rm -rf autom4te*.cache
+$ACLOCAL
+AUTOMAKE_run -Wno-error
+grep "^configure\\.ac:2:.*$errmsg" stderr
+
+$AUTOCONF
+./configure
+$MAKE distcheck
+test -f dist-tarz-1.0.tar.Z
+
+:
diff --git a/t/list-of-tests.mk b/t/list-of-tests.mk
index b8cc592..ce3639c 100644
--- a/t/list-of-tests.mk
+++ b/t/list-of-tests.mk
@@ -384,6 +384,9 @@ t/destdir.sh \
 t/dir-named-obj-is-bad.sh \
 t/discover.sh \
 t/dist-formats.tap \
+t/dist-lzma.sh \
+t/dist-tarZ.sh \
+t/dist-shar.sh \
 t/dist-auxdir-many-subdirs.sh \
 t/dist-auxfile-2.sh \
 t/dist-auxfile.sh \
@@ -655,7 +658,6 @@ t/ltinstloc.sh \
 t/ltlibobjs.sh \
 t/ltlibsrc.sh \
 t/ltorder.sh \
-t/lzma.sh \
 t/m4-inclusion.sh \
 t/maintclean.sh \
 t/maintclean-vpath.sh \


hooks/post-receive
-- 
GNU Automake



reply via email to

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