aclocal-deleted-header.sh 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 w.r.t. aclocal.m4
  17. # dependencies. See also related the tests 'remake-deleted-m4-file.sh'
  18. # and 'remake-renamed-m4-macro-and-file.sh'.
  19. . test-init.sh
  20. cat >>configure.ac <<EOF
  21. AC_CONFIG_MACRO_DIR([.])
  22. FOO
  23. AC_OUTPUT
  24. EOF
  25. cat >foo.m4 <<EOF
  26. AC_DEFUN([FOO], [AC_SUBST([GREPFOO])])
  27. EOF
  28. cat >bar.m4 <<EOF
  29. AC_DEFUN([BAR], [AC_SUBST([GREPBAR])])
  30. EOF
  31. : >Makefile.am
  32. $ACLOCAL
  33. $AUTOMAKE
  34. $AUTOCONF
  35. ./configure
  36. $MAKE
  37. grep GREPFOO Makefile
  38. grep GREPBAR Makefile && exit 1
  39. sed 's/FOO/BAR/' < configure.ac > t
  40. mv -f t configure.ac
  41. rm -f foo.m4
  42. $MAKE
  43. grep GREPFOO Makefile && exit 1
  44. grep GREPBAR Makefile
  45. :