aclocal-deleted-header-aclocal-amflags.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #! /bin/sh
  2. # Copyright (C) 2007-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. # Make sure the "deleted header file" issue is fixed wrt. aclocal.m4
  17. # dependencies.
  18. # NOTE: this test works by using the obsolete 'ACLOCAL_AMFLAGS' make
  19. # variable; see sister test 'aclocal-deleted-header.sh' for a modern
  20. # equivalent.
  21. . test-init.sh
  22. cat >>configure.ac <<EOF
  23. FOO
  24. AC_OUTPUT
  25. EOF
  26. cat >foo.m4 <<EOF
  27. AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
  28. EOF
  29. cat >bar.m4 <<EOF
  30. AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
  31. EOF
  32. cat >Makefile.am <<EOF
  33. ACLOCAL_AMFLAGS = -I .
  34. EOF
  35. $ACLOCAL -I .
  36. $AUTOMAKE
  37. $AUTOCONF
  38. ./configure
  39. $MAKE
  40. grep GREPFOO Makefile
  41. grep GREPBAR Makefile && exit 1
  42. sed 's/FOO/BAR/' < configure.ac > t
  43. mv -f t configure.ac
  44. rm -f foo.m4
  45. $MAKE
  46. grep GREPFOO Makefile && exit 1
  47. grep GREPBAR Makefile
  48. :