extra-dist-dirs-and-subdirs.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #! /bin/sh
  2. # Copyright (C) 2002-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 to make sure EXTRA_DIST can contain a directory or
  17. # a subdirectory, in $(builddir) or $(srcdir).
  18. . test-init.sh
  19. echo AC_OUTPUT >> configure.ac
  20. cat > Makefile.am << 'END'
  21. EXTRA_DIST=foo/bar baz foo2/bar2 baz2
  22. check: distdir
  23. test -f $(distdir)/foo/bar/baz
  24. test -f $(distdir)/baz/foo
  25. test -f $(distdir)/foo2/bar2/baz2
  26. test -f $(distdir)/baz2/foo2
  27. END
  28. # Create some files in $(srcdir)
  29. mkdir foo
  30. mkdir foo/bar
  31. touch foo/bar/baz
  32. mkdir baz
  33. touch baz/foo
  34. $ACLOCAL
  35. $AUTOMAKE
  36. $AUTOCONF
  37. mkdir build
  38. cd build
  39. ../configure
  40. # Create some files in $(builddir)
  41. mkdir foo2
  42. mkdir foo2/bar2
  43. touch foo2/bar2/baz2
  44. mkdir baz2
  45. touch baz2/foo2
  46. $MAKE check
  47. :