dist-auxfile-2.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. # Copyright (C) 2011-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. # Files specified by AC_REQUIRE_AUX_FILE must exist, and if a Makefile
  17. # is present in the build-aux directory, they correctly get automatically
  18. # distributed.
  19. # Related to automake bug#9651.
  20. am_create_testdir=empty
  21. . test-init.sh
  22. cat > configure.ac <<END
  23. AC_INIT([$me], [1.0])
  24. AC_CONFIG_AUX_DIR([sub])
  25. AM_INIT_AUTOMAKE
  26. AC_REQUIRE_AUX_FILE([zardoz])
  27. AC_CONFIG_FILES([Makefile sub/Makefile])
  28. AC_OUTPUT
  29. END
  30. cat > Makefile.am <<'END'
  31. SUBDIRS = sub
  32. test: distdir
  33. ls -l $(distdir) $(distdir)/* ;: For debugging.
  34. test -f $(distdir)/sub/zardoz
  35. .PHONY: test
  36. check-local: test
  37. END
  38. mkdir sub
  39. : > sub/Makefile.am
  40. echo dummy > sub/zardoz
  41. $ACLOCAL
  42. $AUTOCONF
  43. $AUTOMAKE -a
  44. test -f sub/install-sh
  45. # Should work also without '--add-missing'.
  46. $AUTOMAKE
  47. ./configure
  48. $MAKE test
  49. $MAKE distcheck
  50. :