aclocal-dirlist.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. # Check dirlist support.
  17. . test-init.sh
  18. cat > configure.ac <<EOF
  19. AC_INIT([$me], [1.0])
  20. AM_INIT_GUILE_MODULE
  21. EOF
  22. mkdir acdir dirlist-test
  23. echo ./dirlist-test > acdir/dirlist
  24. cat >dirlist-test/dirlist-check.m4 <<'END'
  25. AC_DEFUN([AM_INIT_GUILE_MODULE],[
  26. . $srcdir/../GUILE-VERSION
  27. AM_INIT_AUTOMAKE(foreign)
  28. AC_CONFIG_AUX_DIR(..)
  29. module=[$1]
  30. AC_SUBST(module)])
  31. END
  32. cat >dirlist-test/init.m4 <<EOF
  33. AC_DEFUN([AM_INIT_AUTOMAKE], [I should not be included])
  34. EOF
  35. $ACLOCAL --system-acdir acdir
  36. $AUTOCONF
  37. # There should be no m4_include in aclocal.m4, even though m4/dirlist
  38. # contains './dirlist-test' as a relative directory. Only -I directories
  39. # are subject to file inclusion.
  40. grep m4_include aclocal.m4 && exit 1
  41. grep 'GUILE-VERSION' configure
  42. # This bug can occur only when we do a VPATH build of Automake
  43. # but it's OK because VPATH builds are done by 'make distcheck'.
  44. grep 'I should not be included' configure && exit 1
  45. :