extra-dist-wildcards.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #! /bin/sh
  2. # Copyright (C) 2010-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 that wildcards in EXTRA_DIST are honoured.
  17. # Suggested by observations from Braden McDaniel.
  18. # See also sister test 'extra-dist-wildcards-gnu.sh', that checks a
  19. # similar usage with the involvement of the $(wildcard) GNU make builtin.
  20. required=GNUmake
  21. . test-init.sh
  22. echo AC_OUTPUT >> configure.ac
  23. cat > Makefile.am <<'END'
  24. EXTRA_DIST = *.foo
  25. .PHONY: test
  26. test: distdir
  27. diff a.foo $(distdir)/a.foo
  28. diff b.foo $(distdir)/b.foo
  29. test ! -r $(distdir)/c.bar
  30. check-local:
  31. test -f $(srcdir)/a.foo
  32. test -f $(srcdir)/b.foo
  33. test ! -r $(srcdir)/c.bar
  34. END
  35. $ACLOCAL
  36. $AUTOMAKE
  37. $AUTOCONF
  38. echo aaa > a.foo
  39. echo bbb > b.foo
  40. echo ccc > c.bar
  41. ./configure
  42. $MAKE test
  43. :