recurs-user-wrap.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #! /bin/sh
  2. # Copyright (C) 2012-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. # Check that rules generated by user recursion are apt to be wrapped
  17. # by other makefiles.
  18. required=GNUmake
  19. . test-init.sh
  20. cat >> configure.ac << 'END'
  21. AM_EXTRA_RECURSIVE_TARGETS([extra])
  22. AC_CONFIG_FILES([src/Makefile])
  23. AC_OUTPUT
  24. END
  25. mkdir src
  26. echo SUBDIRS = src > Makefile.am
  27. echo 'bar: ; : > $@ ' > src/Makefile.am
  28. $ACLOCAL
  29. $AUTOCONF
  30. $AUTOMAKE
  31. ./configure
  32. $MAKE extra
  33. test ! -f extra-local
  34. test ! -f src/bar
  35. cat > GNUmakefile << 'END'
  36. .DEFAULT_GOAL = all
  37. extra-local:
  38. : > $@
  39. include ./Makefile
  40. END
  41. cat > src/GNUmakefile << 'END'
  42. include ./Makefile
  43. extra-local: bar
  44. END
  45. $MAKE extra
  46. test -f extra-local
  47. test -f src/bar
  48. :