colon5.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #! /bin/sh
  2. # Copyright (C) 1998-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. # Another multi-":" test, this time from Doug Evans.
  17. . test-init.sh
  18. cat > configure.ac <<END
  19. AC_INIT([$me], [1.0])
  20. AM_INIT_AUTOMAKE
  21. AC_CONFIG_FILES([Makefile:Makefile.in:Makefile.dep])
  22. AC_OUTPUT
  23. END
  24. : > Makefile.dep
  25. cat > Makefile.am <<'END'
  26. .PHONY: test-fs-layout test-grep test-distcommon test-distdir
  27. check-local: test-fs-layout test-grep test-distcommon test-distdir
  28. test-fs-layout:
  29. test x'$(srcdir)' = '.' || test ! -r Makefile.dep
  30. test-grep:
  31. ## The use of $(empty) prevents spurious matches.
  32. grep '=GrEp$(empty)Me_am=' $(srcdir)/Makefile.in
  33. grep '=GrEp$(empty)Me_dep=' $(srcdir)/Makefile.dep
  34. grep '=GrEp$(empty)Me_am=' Makefile
  35. grep '=GrEp$(empty)Me_dep=' Makefile
  36. test-distcommon:
  37. echo ' ' $(DIST_COMMON) ' ' | grep '[ /]Makefile.dep '
  38. test-distdir: distdir
  39. test -f $(distdir)/Makefile.dep
  40. END
  41. $ACLOCAL
  42. $AUTOCONF
  43. $AUTOMAKE
  44. ./configure
  45. grep '=GrEpMe_am=' Makefile && exit 1 # Sanity check.
  46. grep '=GrEpMe_dep=' Makefile && exit 1 # Likewise.
  47. $MAKE test-distcommon
  48. $MAKE test-distdir
  49. $sleep
  50. echo '# =GrEpMe_am=' >> Makefile.am
  51. echo '# =GrEpMe_dep=' >> Makefile.dep
  52. $MAKE Makefile # For non-GNU make.
  53. $MAKE test-grep
  54. $MAKE test-distcommon
  55. $MAKE test-distdir
  56. $MAKE distcheck
  57. :