deleted-am.sh 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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 '.am' 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. echo AC_OUTPUT >> configure.ac
  22. echo 'include $(top_srcdir)/foobar.am' > Makefile.am
  23. echo 'include zardoz.am' > foobar.am
  24. : > zardoz.am
  25. $ACLOCAL
  26. $AUTOCONF
  27. $AUTOMAKE
  28. ./configure
  29. $MAKE
  30. rm -f zardoz.am
  31. using_gmake || $sleep # Required by BSD make.
  32. run_make -e FAIL -M
  33. # This error will come from automake, not make, so we can be stricter
  34. # in our grepping of it.
  35. grep 'cannot open.*zardoz\.am' output
  36. grep 'foobar\.am' output && exit 1 # No spurious error, please.
  37. # Try with one less indirection.
  38. : > foobar.am
  39. $AUTOMAKE Makefile
  40. ./config.status Makefile
  41. $MAKE # Sanity check.
  42. rm -f foobar.am
  43. using_gmake || $sleep # Required by BSD make.
  44. run_make -e FAIL -M
  45. # This error will come from automake, not make, so we can be stricter
  46. # in our grepping of it.
  47. grep 'cannot open.*foobar\.am' output
  48. :