confh8.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. # Test to make sure several config headers are allowed.
  17. # See also sister "minimalistic" test 'confh7.sh'.
  18. . test-init.sh
  19. cat >> configure.ac << 'END'
  20. AC_CONFIG_HEADERS([one.h two.h])
  21. AC_OUTPUT
  22. END
  23. cat > Makefile.am << 'END'
  24. .PHONY: test0 test1 test2
  25. test0:
  26. @echo DIST_COMMON = $(DIST_COMMON)
  27. echo ' ' $(DIST_COMMON) ' ' | grep '[ /]one\.h\.in '
  28. echo ' ' $(DIST_COMMON) ' ' | grep '[ /]two\.h\.in '
  29. : Processed header files should not be distributed.
  30. if echo ' ' $(DIST_COMMON) ' ' | grep '\.h '; then \
  31. exit 1; \
  32. else \
  33. exit 0; \
  34. fi
  35. test1: all
  36. test -f one.h
  37. test -f two.h
  38. test2: distdir
  39. ls -l $(distdir)/*
  40. test -f $(distdir)/one.h.in
  41. test -f $(distdir)/two.h.in
  42. : Processed header files should not be distributed.
  43. test ! -r $(distdir)/one.h
  44. test ! -r $(distdir)/two.h
  45. check-local: test0 test1 test2
  46. END
  47. : > one.h.in
  48. : > two.h.in
  49. $ACLOCAL
  50. $AUTOCONF
  51. $AUTOMAKE
  52. ./configure
  53. $MAKE test0
  54. $MAKE test1
  55. $MAKE test2
  56. $MAKE distcheck
  57. :