silent-texi.sh 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/bin/sh
  2. # Copyright (C) 2009-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 texinfo rules in silent-rules mode.
  17. required='makeinfo tex texi2dvi dvips'
  18. . test-init.sh
  19. echo AC_OUTPUT >> configure.ac
  20. cat > Makefile.am <<'EOF'
  21. info_TEXINFOS = foo.texi sub/zardoz.texi
  22. EOF
  23. cat > foo.texi <<'EOF'
  24. \input texinfo
  25. @setfilename foo.info
  26. @settitle foo manual
  27. @bye
  28. EOF
  29. mkdir sub
  30. cat > sub/zardoz.texi <<'EOF'
  31. \input texinfo
  32. @setfilename zardoz.info
  33. @settitle zardoz manual
  34. @bye
  35. EOF
  36. $ACLOCAL
  37. $AUTOMAKE --add-missing
  38. $AUTOCONF
  39. ./configure --disable-silent-rules
  40. # Silent mode output.
  41. run_make -O -E -- V=0 dvi html info ps pdf
  42. grep '^ DVIPS foo\.ps$' stdout
  43. grep '^ MAKEINFO foo\.html$' stdout
  44. # NetBSD make will print './foo.info' instead of 'foo.info'.
  45. $EGREP '^ MAKEINFO (\./)?foo\.info$' stdout
  46. grep '^ TEXI2DVI foo\.dvi$' stdout
  47. grep '^ TEXI2PDF foo\.pdf$' stdout
  48. grep '^ DVIPS sub/zardoz.ps$' stdout
  49. grep '^ MAKEINFO sub/zardoz.html$' stdout
  50. # NetBSD make will print './sub/zardoz.info' instead of 'zardoz.info'.
  51. $EGREP '^ MAKEINFO (\./)?sub/zardoz.info$' stdout
  52. grep '^ TEXI2DVI sub/zardoz.dvi$' stdout
  53. grep '^ TEXI2PDF sub/zardoz.pdf$' stdout
  54. # No make recipe is displayed before being executed.
  55. $EGREP 'texi2(dvi|pdf)|dvips|makeinfo|(rm|mv) ' \
  56. stdout stderr && exit 1
  57. # No verbose output from TeX nor dvips.
  58. $EGREP '(zardoz|foo)\.log|3\.14|Copyright|This is|[Oo]utput ' \
  59. stdout stderr && exit 1
  60. # Verbose mode output.
  61. $MAKE clean || exit 1
  62. run_make -M V=1 dvi html info ps pdf
  63. $EGREP '(DVIPS|MAKEINFO|TEXI2(PDF|DVI)) ' output && exit 1
  64. # Verbose output from TeX.
  65. grep '[Oo]utput .*foo\.pdf' output
  66. grep '[Oo]utput .*zardoz\.pdf' output
  67. $FGREP 'foo.log' output
  68. $FGREP 'zardoz.log' output
  69. # Verbose output from dvips.
  70. $FGREP ' dvips' output
  71. :