alpha.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #! /bin/sh
  2. # Copyright (C) 1998-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. # Make sure README-alpha is distributed when appropriate. Report from
  17. # Jim Meyering.
  18. . test-init.sh
  19. cat > configure.ac << 'END'
  20. AC_INIT([alpha], [1.0a])
  21. AM_INIT_AUTOMAKE
  22. AC_CONFIG_FILES([Makefile])
  23. AC_CONFIG_FILES([sub/Makefile])
  24. AC_OUTPUT
  25. END
  26. cat > Makefile.am << 'END'
  27. AUTOMAKE_OPTIONS = gnits
  28. SUBDIRS = sub
  29. check-local: distdir
  30. test -f $(distdir)/README-alpha
  31. test -f $(distdir)/sub/README
  32. test ! -f $(distdir)/sub/README-alpha
  33. : > works
  34. END
  35. mkdir sub
  36. cat > sub/Makefile.am << 'END'
  37. AUTOMAKE_OPTIONS = gnits
  38. END
  39. : > README-alpha
  40. : > sub/README-alpha
  41. : > sub/README
  42. # Gnits stuff.
  43. : > INSTALL
  44. : > NEWS
  45. : > README
  46. : > COPYING
  47. : > AUTHORS
  48. : > ChangeLog
  49. : > THANKS
  50. $ACLOCAL
  51. $AUTOCONF
  52. $AUTOMAKE
  53. ./configure
  54. # "make distdir" should fail because NEWS does not mention 1.0a
  55. run_make -E -e FAIL check
  56. grep 'NEWS not updated' stderr
  57. test ! -e works
  58. echo 'alpha 1.0a released' > NEWS
  59. $MAKE check
  60. test -f works
  61. :