canon5.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #! /bin/sh
  2. # Copyright (C) 1999-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 that we allow variable names starting in
  17. # non-letters. Whatever that might mean.
  18. . test-init.sh
  19. cat >> configure.ac << 'END'
  20. AC_PROG_CC
  21. END
  22. $ACLOCAL
  23. cat > Makefile.am << 'END'
  24. bin_PROGRAMS = 123test
  25. 123test_SOURCES = 123.c
  26. END
  27. $AUTOMAKE
  28. cat > Makefile.am << 'END'
  29. bin_PROGRAMS = _foo
  30. _foo_SOURCES = foo.c
  31. END
  32. $AUTOMAKE
  33. cat > Makefile.am << 'END'
  34. bin_PROGRAMS = ,foo
  35. ,foo_SOURCES = foo.c
  36. END
  37. AUTOMAKE_fails
  38. grep 'Makefile\.am:2:.* bad .*variable.*,foo_SOURCES' stderr
  39. grep 'Makefile\.am:2:.* use .*_foo_SOURCES' stderr
  40. cat > Makefile.am << 'END'
  41. bin_PROGRAMS = ,foo
  42. _foo_SOURCES = foo.c
  43. END
  44. $AUTOMAKE -Wno-portability
  45. :