txinfo-clean.sh 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  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. # DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
  17. # Similar to txinfo25.sh.
  18. required='makeinfo tex texi2dvi dvips'
  19. . test-init.sh
  20. mkdir sub
  21. cat >> configure.ac << 'END'
  22. AC_OUTPUT
  23. END
  24. cat > Makefile.am << 'END'
  25. info_TEXINFOS = main.texi other.texi sub/another.texi
  26. END
  27. cat > main.texi << 'END'
  28. \input texinfo
  29. @setfilename main.info
  30. @settitle main
  31. @node Top
  32. Hello walls.
  33. @include version.texi
  34. @bye
  35. END
  36. cat > other.texi << 'END'
  37. \input texinfo
  38. @setfilename other.info
  39. @settitle other
  40. @node Top
  41. Hello walls.
  42. @include version2.texi
  43. @bye
  44. END
  45. cat > sub/another.texi << 'END'
  46. \input texinfo
  47. @setfilename another.info
  48. @settitle another
  49. @node Top
  50. Hello walls.
  51. @include version3.texi
  52. @bye
  53. END
  54. $ACLOCAL
  55. $AUTOMAKE --add-missing
  56. $AUTOCONF
  57. # In-tree build.
  58. ./configure
  59. $MAKE dvi ps pdf html
  60. test -f main.dvi
  61. test -f main.ps
  62. test -f main.html || test -d main.html
  63. test -f main.pdf
  64. test -f other.pdf
  65. test -f sub/another.pdf
  66. test -f other.dvi
  67. test -f other.html || test -d other.html
  68. test -f other.ps
  69. test -f sub/another.dvi
  70. test -f sub/another.html || test -d sub/another.html
  71. test -f sub/another.ps
  72. $MAKE mostlyclean
  73. ls *.aux && exit 1
  74. ls sub/*.aux && exit 1
  75. test -f main.dvi
  76. test -f main.ps
  77. test -f main.html || test -d main.html
  78. test -f main.pdf
  79. test -f other.pdf
  80. test -f sub/another.pdf
  81. test -f other.dvi
  82. test -f other.html || test -d other.html
  83. test -f other.ps
  84. test -f sub/another.dvi
  85. test -f sub/another.html || test -d sub/another.html
  86. test -f sub/another.ps
  87. $MAKE clean
  88. test ! -e main.dvi
  89. test ! -e main.ps
  90. test ! -e main.html
  91. test ! -e main.pdf
  92. test ! -e other.pdf
  93. test ! -e sub/another.pdf
  94. test ! -e sub/yetanother.pdf
  95. test ! -e other.dvi
  96. test ! -e other.html
  97. test ! -e other.ps
  98. test ! -e sub/another.dvi
  99. test ! -e sub/another.html
  100. test ! -e sub/another.ps
  101. ./configure
  102. $MAKE
  103. $MAKE distcheck
  104. :