dist-tarZ.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #! /bin/sh
  2. # Copyright (C) 2013-2017 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Check support for no-dist-gzip with dist-tarZ.
  17. . test-init.sh
  18. # On Cygwin, as of 9/2/2012, 'compress' is provided by sharutils
  19. # and is just a dummy script that is not able to actually compress
  20. # (it can only decompress). So, check that the 'compress' program
  21. # is actually able to compress input.
  22. # Note that, at least on GNU/Linux, 'compress' does (and is
  23. # documented to) exit with status 2 if the output is larger than
  24. # the input after (attempted) compression; so we need to pass it
  25. # an input that it can actually reduce in size when compressing.
  26. for x in 1 2 3 4 5 6 7 8; do
  27. echo aaaaaaaaaaaaaaaaaaaaa
  28. done | compress -c >/dev/null \
  29. || skip_ "cannot find a working 'compress' program"
  30. errmsg=".*legacy .*'compress' .*deprecated"
  31. echo AUTOMAKE_OPTIONS = dist-tarZ > Makefile.am
  32. $ACLOCAL
  33. AUTOMAKE_fails -Wnone -Wobsolete
  34. grep "^Makefile\\.am:1:.*$errmsg" stderr
  35. cat > configure.ac <<END
  36. AC_INIT([$me], [1.0])
  37. AM_INIT_AUTOMAKE([no-dist-gzip dist-tarZ])
  38. AC_CONFIG_FILES([Makefile])
  39. AC_OUTPUT
  40. END
  41. : > Makefile.am
  42. rm -rf autom4te*.cache
  43. $ACLOCAL
  44. AUTOMAKE_run -Wno-error
  45. grep "^configure\\.ac:2:.*$errmsg" stderr
  46. $AUTOCONF
  47. ./configure
  48. $MAKE distcheck
  49. test -f dist-tarz-1.0.tar.Z
  50. :