colon7.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 test for a failing ":" in AC_OUTPUT.
  17. # Report from Maciej Stachowiak.
  18. . test-init.sh
  19. cat > configure.ac << 'END'
  20. AC_INIT([colon7], [1.0])
  21. AM_INIT_AUTOMAKE
  22. dnl: Please do not add proper m4 quoting here.
  23. AC_OUTPUT(subdir/bar:subdir/foo \
  24. Makefile \
  25. subdir/Makefile
  26. )
  27. END
  28. mkdir subdir
  29. : > Makefile.am
  30. : > subdir/foo
  31. cat > subdir/Makefile.am << 'END'
  32. # DIST_COMMON should contain 'foo', not 'subdir/foo'.
  33. test:
  34. case '$(DIST_COMMON)' in *subdir/foo*) exit 1;; *) exit 0;; esac
  35. echo ' ' $(DIST_COMMON) ' ' | grep '[ /]foo '
  36. .PHONY: test
  37. END
  38. $ACLOCAL
  39. $AUTOMAKE
  40. # Should nowhere refer to 'bar.in'.
  41. $FGREP 'bar.in' Makefile.in subdir/Makefile.in && exit 1
  42. $AUTOCONF
  43. ./configure
  44. cd subdir
  45. $MAKE test
  46. :