]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
[ng] dist: remove obsolete distribution formats
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 08:59:32 +0000 (10:59 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sat, 11 Aug 2012 09:14:17 +0000 (11:14 +0200)
Those formats being the 'shar' archive and the tar archive compressed
with 'compress'.  Support for them is kept in mainline Automake for
the sake of backward compatibility only, and modern software releases
should not use those formats anyway, so it's better if we just remove
them.

* NG-NEWS, doc/automake-ng.texi: Update.
* lib/Automake/Options.pm (_is_valid_easy_option): Remove 'dist-shar'
and 'dist-tarZ'.
(_process_option_list): Give a fatal error if one of those two options
is seen.
* lib/am/distdir.am (am.dist.ext.tarZ, am.dist.ext.shar): Remove these
variables.
(dist-tarZ, dist-shar): And these targets.
* lib/am/distcheck.mk (distcheck): Do not try to decompress '.shar.gz'
or '.tar.Z' archives: they won't be there anyway.
* t/dist-formats.tap: Adjust and simplify.
* t/dist-obsolete.sh: New test.
* t/lzma.sh: Remove, subsumed by it.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
NG-NEWS
doc/automake-ng.texi
lib/Automake/Options.pm
lib/am/distcheck.mk
lib/am/distdir.am
t/dist-formats.tap
t/dist-obsolete.sh [moved from t/lzma.sh with 73% similarity, mode: 0644]

diff --git a/NG-NEWS b/NG-NEWS
index 1d15d39d3633cb2073863f14713f2ba3efd36693..e953f5206ee1130b34ce545425f676fc919b2d91 100644 (file)
--- a/NG-NEWS
+++ b/NG-NEWS
@@ -223,6 +223,11 @@ Distribution
 
   Do not use any of these variables in your Makefiles!
 
+* Support for distribution archived in the '.shar.gz' and '.tar.Z' formats
+  have been removed.  Accordingly, the targets 'dist-shar' and 'dist-tarZ'
+  are no more present in the generated Makefiles, and the use of the
+  Automake options 'dist-shar' and 'dist-tarZ' will elicit a fatal error.
+
 
 Obsolete Features Removed
 =========================
index 8bee89e1322c0f55b9bbb904ce15eefcb27bd22a..1470f63ff00e59e20d5d8ec3c4452e77d4f9898b 100644 (file)
@@ -8569,10 +8569,6 @@ Generate an @samp{lzip} tar archive of the distribution.  @command{lzip}
 archives are frequently smaller than @command{bzip2}-compressed archives.
 @trindex dist-lzip
 
-@item @code{dist-shar}
-Generate a shar archive of the distribution.
-@trindex dist-shar
-
 @vindex XZ_OPT
 @item @code{dist-xz}
 Generate an @samp{xz} tar archive of the distribution.  @command{xz}
@@ -8588,10 +8584,6 @@ default compression ratio, but with a progress indicator:
 Generate a zip archive of the distribution.
 @trindex dist-zip
 
-@item @code{dist-tarZ}
-Generate a compressed tar archive of
-the distribution.
-@trindex dist-tarZ
 @end table
 
 The rule @code{dist} (and its historical synonym @code{dist-all}) will
@@ -9929,24 +9921,12 @@ Hook @code{dist-bzip2} to @code{dist}.
 Hook @code{dist-lzip} to @code{dist}.
 @trindex dist-lzip
 
-@item @option{dist-shar}
-@cindex Option, @option{dist-shar}
-@opindex dist-shar
-Hook @code{dist-shar} to @code{dist}.
-@trindex dist-shar
-
 @item @option{dist-zip}
 @cindex Option, @option{dist-zip}
 @opindex dist-zip
 Hook @code{dist-zip} to @code{dist}.
 @trindex dist-zip
 
-@item @option{dist-tarZ}
-@cindex Option, @option{dist-tarZ}
-@opindex dist-tarZ
-Hook @code{dist-tarZ} to @code{dist}.
-@trindex dist-tarZ
-
 @item @option{filename-length-max=99}
 @cindex Option, @option{filename-length-max=99}
 @opindex filename-length-max=99
@@ -10112,7 +10092,7 @@ These three mutually exclusive options select the tar format to use
 when generating tarballs with @samp{make dist}.  (The tar file created
 is then compressed according to the set of @option{no-dist-gzip},
 @option{dist-bzip2}, @option{dist-lzip}, @option{dist-xz} and
-@option{dist-tarZ} options in use.)
+@option{dist-zip} options in use.)
 
 These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
@@ -12843,11 +12823,11 @@ suite failures, please attach the @file{test-suite.log} file.
 @c  LocalWords:  installinfo vers MAKEINFO makeinfo MAKEINFOFLAGS noinstall rf
 @c  LocalWords:  mandir thesame alsothesame installman myexecbin DESTDIR Pinard
 @c  LocalWords:  uninstall installdirs uninstalls MOSTLYCLEANFILES mostlyclean
-@c  LocalWords:  DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip shar exp
+@c  LocalWords:  DISTCLEANFILES MAINTAINERCLEANFILES GZIP gzip exp
 @c  LocalWords:  distdir distcheck distcleancheck listfiles distuninstallcheck
 @c  LocalWords:  VPATH tarfile stdout XFAIL DejaGnu dejagnu DEJATOOL runtest ln
 @c  LocalWords:  RUNTESTDEFAULTFLAGS toolchain RUNTESTFLAGS asis readme DVIPS
-@c  LocalWords:  installcheck gzipped tarZ std utils etags mkid cd
+@c  LocalWords:  installcheck gzipped std utils etags mkid cd
 @c  LocalWords:  ARGS taggable ETAGSFLAGS lang ctags CTAGSFLAGS GTAGS gtags idl
 @c  LocalWords:  foocc doit idlC multilibs ABIs cmindex defmac ARG enableval FC
 @c  LocalWords:  MSG xtrue DBG pathchk CYGWIN afile proglink versioned CVS's TE
index df84423c37faa3273e375d36ae81e347dfd1b5c7..d24fd244dde97555d4572506a98c6b4ef1f70f63 100644 (file)
@@ -272,8 +272,6 @@ sub _is_valid_easy_option ($)
     dejagnu
     dist-bzip2
     dist-lzip
-    dist-shar
-    dist-tarZ
     dist-xz
     dist-zip
     ng
@@ -331,6 +329,16 @@ sub _process_option_list (\%@)
           error ($where, "support for lzma-compressed distribution " .
                          "archives has been removed");
         }
+      elsif ($_ eq 'dist-tarZ')
+        {
+          error ($where, "distribution archives compressed with legacy " .
+                         "'compress' program are no more supported");
+        }
+      elsif ($_ eq 'dist-shar')
+        {
+          error ($where, "support for shar distribution archives has " .
+                         "been removed");
+        }
       elsif (/^filename-length-max=(\d+)$/)
         {
           delete $options->{$_};
index b358997373c19a7023459b41f6aa175da63b8b36..759928a3fe41e904e1fabcb3dc82fadcfb2d90ee 100644 (file)
@@ -33,10 +33,6 @@ distcheck: dist
          lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
-       *.tar.Z*) \
-         uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
-       *.shar.gz*) \
-         GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
index 35d9a71b5a57edac3ddabcb64337a7e332ddaed1..f687f18496cdd5246a7972633385d21bc1b82113 100644 (file)
@@ -317,8 +317,6 @@ am.dist.ext.gzip  = tar.gz
 am.dist.ext.bzip2 = tar.bz2
 am.dist.ext.xz    = tar.xz
 am.dist.ext.lzip  = tar.lz
-am.dist.ext.tarZ  = tar.Z
-am.dist.ext.shar  = shar.gz
 am.dist.ext.zip   = zip
 
 DIST_TARGETS  = $(foreach x,$(am.dist.formats),dist-$x)
@@ -344,14 +342,6 @@ dist-xz: distdir
        tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
        $(am__post_remove_distdir)
 
-dist-tarZ: distdir
-       tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__post_remove_distdir)
-
-dist-shar: distdir
-       shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__post_remove_distdir)
-
 dist-zip: distdir
        rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
index 880fcae072fc9dadacc77365ce86de9bdcbb9841..842ecf1c3c95f146494f8510d09c63c00555bfc2 100755 (executable)
@@ -20,7 +20,7 @@
 am_create_testdir=empty
 . ./defs || exit 1
 
-plan_ 70
+plan_ 59
 
 # ---------------------------------------------------- #
 #  Common and/or auxiliary subroutines and variables.  #
@@ -46,12 +46,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
 }
@@ -103,7 +101,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
@@ -293,9 +291,8 @@ END
 
 #      $1 $2  $3   $4     $5  $6
 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  xz     in  ac
+nogzip in am  and  lzip   in  am
 
 
 # ----------------------------------------------------------- #
@@ -318,9 +315,9 @@ end_subtest
 # since there are the most likely to be all found on the great 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 ()
@@ -356,7 +353,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.Z tarball]"   check_tarball xz
 fi
 
 unset tarname desc skip_reason
old mode 100755 (executable)
new mode 100644 (file)
similarity index 73%
rename from t/lzma.sh
rename to t/dist-obsolete.sh
index da38c31..a7b68d0
--- a/t/lzma.sh
 # 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.
+# Obsolete archive formats.
 
 . ./defs || exit 1
 
-errmsg='support for lzma.*removed'
+$ACLOCAL
 
-echo AUTOMAKE_OPTIONS = dist-lzma > Makefile.am
-$ACLOCAL --force
-AUTOMAKE_fails -Wnone -Wno-error
-grep "^Makefile\\.am:1:.*$errmsg" stderr
+for fmt in lzma shar; do
+  echo AUTOMAKE_OPTIONS = dist-$fmt > Makefile.am
+  AUTOMAKE_fails -Wnone -Wno-error
+  grep "^Makefile\\.am:1:.*support for $fmt.*removed" stderr
+done
+
+rm -rf autom4te*.cache
 
 cat > configure.ac << 'END'
 AC_INIT([lzma], [1.0])
-AM_INIT_AUTOMAKE([no-dist-gzip dist-lzma])
+AM_INIT_AUTOMAKE([dist-tarZ])
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 END
 : > Makefile.am
-
-rm -rf autom4te*.cache
 $ACLOCAL
 AUTOMAKE_fails -Wnone -Wno-error
-grep "^configure\\.ac:2:.*$errmsg" stderr
+grep "^configure\\.ac:2:.*legacy 'compress' program.* no more supported" stderr
 
 :