stamph2.sh 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #! /bin/sh
  2. # Copyright (C) 2001-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 stamp-h* files are created where we expect
  17. . test-init.sh
  18. cat >> configure.ac << END
  19. AC_CONFIG_HEADERS([1.h
  20. 2.h:config.hin
  21. 3.h:sdir1/config1.hin])
  22. AC_CONFIG_HEADERS([sdir1/4.h
  23. sdir1/5.h:config.hin
  24. sdir1/6.h:sdir1/config1.hin
  25. sdir1/7.h:sdir2/config2.hin])
  26. AC_OUTPUT
  27. END
  28. : > Makefile.am
  29. mkdir sdir1
  30. mkdir sdir2
  31. : > config.hin
  32. : > 1.h.in
  33. : > sdir1/4.h.in
  34. : > sdir1/config1.hin
  35. : > sdir2/config2.hin
  36. $ACLOCAL
  37. $AUTOCONF
  38. $AUTOMAKE
  39. ./configure
  40. test -f stamp-h1
  41. test -f stamp-h2
  42. test -f stamp-h3
  43. test -f sdir1/stamp-h4
  44. test -f sdir1/stamp-h5
  45. test -f sdir1/stamp-h6
  46. test -f sdir1/stamp-h7
  47. # Make sure './config.status foo' creates the right stamp file.
  48. # Report from Sander Niemeijer.
  49. rm -f stamp-h*
  50. rm -f sdir1/stamp-h*
  51. ./config.status sdir1/7.h 2.h sdir1/4.h
  52. test ! -e stamp-h1
  53. test -f stamp-h2
  54. test ! -e stamp-h3
  55. test -f sdir1/stamp-h4
  56. test ! -e sdir1/stamp-h5
  57. test ! -e sdir1/stamp-h6
  58. test -f sdir1/stamp-h7
  59. :