comment6.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #! /bin/sh
  2. # Copyright (C) 2002-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 for PR/322.
  17. # Automake 1.6.1 seems to have a problem parsing comments that use
  18. # '\' to span multiple lines.
  19. . test-init.sh
  20. cat >> configure.ac <<'EOF'
  21. AC_OUTPUT
  22. EOF
  23. ## There are two tests: one with backslashed comments at the top
  24. ## of the file, and one with a rule first. This is because
  25. ## Comments at the top of the file are handled specially
  26. ## since Automake 1.5.
  27. cat > Makefile.am << 'EOF'
  28. # SOME_FILES = \
  29. file1 \
  30. file2 \
  31. file3
  32. all-local:
  33. @echo Good
  34. EOF
  35. $ACLOCAL
  36. $AUTOCONF
  37. $AUTOMAKE
  38. ./configure
  39. $MAKE
  40. grep '# SOME_FILES' Makefile
  41. grep '# *file3' Makefile
  42. cat > Makefile.am << 'EOF'
  43. all-local:
  44. @echo Good
  45. # SOME_FILES = \
  46. file1 \
  47. file2 \
  48. file3
  49. EOF
  50. $AUTOMAKE
  51. ./configure
  52. $MAKE
  53. grep '# SOME_FILES' Makefile
  54. grep '# *file3' Makefile
  55. :