conff.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #! /bin/sh
  2. # Copyright (C) 2003-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 rebuild rules work even when AC_CONFIG_FILES uses colons.
  17. # Report from Alexander Turbov.
  18. . test-init.sh
  19. cat >> configure.ac << 'END'
  20. AC_CONFIG_FILES([bar/Makefile:bar/Makefile.in:Makefile.bot])
  21. AC_OUTPUT
  22. END
  23. cat > Makefile.am << 'END'
  24. SUBDIRS = bar
  25. EXTRA_DIST = Makefile.bot
  26. END
  27. mkdir bar
  28. cat > bar/Makefile.am << 'END'
  29. top-rule:
  30. @echo 'top rule'
  31. END
  32. cat > Makefile.bot << 'END'
  33. bot-rule:
  34. @echo 'bot rule'
  35. END
  36. $ACLOCAL
  37. $AUTOCONF
  38. $AUTOMAKE
  39. ./configure
  40. $MAKE
  41. cd bar
  42. run_make -O top-rule
  43. grep 'top rule' stdout
  44. run_make -O bot-rule
  45. grep 'bot rule' stdout
  46. cd ..
  47. $sleep
  48. cat > bar/Makefile.am << 'END'
  49. top-rule:
  50. @echo 'top2 rule'
  51. END
  52. $MAKE
  53. cd bar
  54. run_make -O top-rule
  55. grep 'top2 rule' stdout
  56. run_make -O bot-rule
  57. grep 'bot rule' stdout
  58. cd ..
  59. $sleep
  60. cat > Makefile.bot << 'END'
  61. bot-rule:
  62. @echo 'bot2 rule'
  63. END
  64. $MAKE
  65. cd bar
  66. run_make -O top-rule
  67. grep 'top2 rule' stdout
  68. run_make -O bot-rule
  69. grep 'bot2 rule' stdout
  70. cd ..
  71. $MAKE distcheck
  72. :