distcom3.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #! /bin/sh
  2. # Copyright (C) 2001-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. # Test to make sure that non-existing common files are distributed
  17. # if they are buildable.
  18. . test-init.sh
  19. echo AC_OUTPUT >> configure.ac
  20. cat > Makefile.am << 'END'
  21. README:
  22. echo 'I bet you are reading me.' > README
  23. test-distcommon:
  24. echo ' ' $(DIST_COMMON) ' ' | grep ' README '
  25. END
  26. # Files required by '--gnu'.
  27. : > NEWS
  28. : > AUTHORS
  29. : > ChangeLog
  30. $ACLOCAL
  31. # Should not warn about missing README, since it is a target.
  32. $AUTOMAKE --add-missing --gnu >output 2>&1 || { cat output; exit 1; }
  33. cat output
  34. grep README output && exit 1
  35. $AUTOCONF
  36. ./configure
  37. $MAKE test-distcommon
  38. $MAKE distdir
  39. test -f $distdir/README
  40. # Should warn about missing README.
  41. rm -f README
  42. : > Makefile.am
  43. AUTOMAKE_fails --add-missing --gnu
  44. grep 'required file.*README.*not found' stderr
  45. :