missing-auxfile-stops-makefiles-creation.sh 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. # Automake should stop the creation of Makefile.in files at the first
  17. # encountered error due to a required auxiliary file not found.
  18. . test-init.sh
  19. cat >> configure.ac <<END
  20. AM_PATH_PYTHON
  21. END
  22. echo SUBDIRS = > Makefile.am
  23. for i in 1 2 3 4 5; do
  24. echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.ac
  25. echo "SUBDIRS += sub$i" >> Makefile.am
  26. mkdir sub$i
  27. echo python_PYTHON = foo.py > sub$i/Makefile.am
  28. done
  29. : > sub1/Makefile.am
  30. $ACLOCAL
  31. unset AUTOMAKE_JOBS
  32. AUTOMAKE_fails
  33. ls -l Makefile.in */Makefile.in || : # For debugging.
  34. # Top-level Makefile.in might be created or not, we don't want to set
  35. # too strict semantics here, so don't check for it. But the later
  36. # files shouldn't exist.
  37. test -f sub1/Makefile.in
  38. test ! -e sub2/Makefile.in
  39. test ! -e sub3/Makefile.in
  40. test ! -e sub4/Makefile.in
  41. test ! -e sub5/Makefile.in
  42. rm -f Makefile.in */Makefile.in
  43. : > sub2/Makefile.am
  44. : > sub3/Makefile.am
  45. AUTOMAKE_fails
  46. ls -l Makefile.in */Makefile.in || : # For debugging.
  47. test -f sub1/Makefile.in
  48. test -f sub2/Makefile.in
  49. test -f sub3/Makefile.in
  50. test ! -e sub4/Makefile.in
  51. test ! -e sub5/Makefile.in
  52. :