2
0

deleted-m4.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #! /bin/sh
  2. # Copyright (C) 2011-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. # The stub rules emitted to work around the "deleted header problem"
  17. # for '.m4' files shouldn't prevent the remake rules from correctly
  18. # erroring out when a still-required file is missing.
  19. # See also discussion about automake bug#9768.
  20. . test-init.sh
  21. cat >> configure.ac <<'END'
  22. m4_include([foobar.m4])
  23. AC_OUTPUT
  24. END
  25. : > Makefile.am
  26. echo 'm4_include([zardoz.m4])' > foobar.m4
  27. : > zardoz.m4
  28. $ACLOCAL
  29. $AUTOCONF
  30. $AUTOMAKE
  31. ./configure
  32. $MAKE
  33. rm -f zardoz.m4
  34. run_make -e FAIL -M
  35. # This error will come from aclocal, not make, so we can be stricter
  36. # in our grepping of it.
  37. grep ' foobar\.m4:1:.*zardoz\.m4.*does not exist' output
  38. # No spurious errors, please.
  39. $FGREP -v ' foobar.m4:1:' output | $FGREP 'foobar.m4' && exit 1
  40. # Try with one less indirection.
  41. : > foobar.m4
  42. $ACLOCAL --force
  43. $AUTOCONF
  44. ./configure
  45. $MAKE # Sanity check.
  46. rm -f foobar.m4
  47. run_make -e FAIL -M
  48. # This error will come from aclocal, not make, so we can be stricter
  49. # in our grepping of it.
  50. grep 'foobar\.m4.*does not exist' output
  51. # No spurious errors, please (ok, this is really paranoid).
  52. $FGREP 'zardoz.m4' output && exit 1
  53. :