txinfo25.sh 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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. # Check that info files are built in builddir and in srcdir can safely
  17. # co-exist. This setup is obtained by having two info files, only one
  18. # of which being cleaned.
  19. # (Similar to txinfo16.sh, plus CLEANFILES).
  20. # (See also txinfo23.sh and txinfo24.sh).
  21. required='makeinfo tex texi2dvi'
  22. . test-init.sh
  23. cat >> configure.ac << 'END'
  24. AC_OUTPUT
  25. END
  26. cat > Makefile.am << 'END'
  27. CLEANFILES = [a-m]*.info
  28. info_TEXINFOS = main.texi other.texi
  29. END
  30. cat > main.texi << 'END'
  31. \input texinfo
  32. @setfilename main.info
  33. @settitle main
  34. @node Top
  35. Hello walls.
  36. @include version.texi
  37. @bye
  38. END
  39. cat > other.texi << 'END'
  40. \input texinfo
  41. @setfilename other.info
  42. @settitle other
  43. @node Top
  44. Hello walls.
  45. @include version2.texi
  46. @bye
  47. END
  48. $ACLOCAL
  49. $AUTOCONF
  50. AUTOMAKE_fails --add-missing
  51. grep "Makefile\.am:.*undocumented.* automake hack" stderr
  52. grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
  53. $AUTOMAKE --add-missing -Wno-obsolete
  54. mkdir build
  55. cd build
  56. ../configure
  57. $MAKE
  58. test -f main.info
  59. test ! -e ../main.info
  60. test ! -e other.info
  61. test -f ../other.info
  62. cd ..
  63. rm -rf build
  64. ./configure
  65. $MAKE
  66. test -f main.info
  67. test -f other.info
  68. # Make sure stamp-vti is older that version.texi.
  69. # (A common situation in a real tree).
  70. # This is needed to test the "subtle" issue described below.
  71. test -f stamp-vti
  72. test -f version.texi
  73. test -f stamp-1
  74. test -f version2.texi
  75. $sleep
  76. touch stamp-vti
  77. touch stamp-1
  78. $MAKE distclean
  79. test -f stamp-vti
  80. test -f stamp-1
  81. test -f version.texi
  82. test -f version2.texi
  83. mkdir build
  84. cd build
  85. ../configure
  86. $MAKE
  87. # other.info should not be rebuilt in the current directory, since
  88. # it's up-to-date in $(srcdir).
  89. # This can be caused by a subtle issue related to VPATH handling
  90. # of version.texi (see also the comment in texi-vers.am): because
  91. # stamp-vti is newer than version.texi, the 'version.texi: stamp-vti'
  92. # rule is always triggered. Still that's not a reason for 'make'
  93. # to think 'version.texi' has been created...
  94. test -f main.info
  95. test ! -e other.info
  96. $MAKE dvi
  97. test -f main.dvi
  98. test -f other.dvi
  99. $MAKE distcheck
  100. :