automtest.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/sh
  2. # Copyright 2012 Free Software Foundation, Inc.
  3. #
  4. # This file is part of GNU Texinfo.
  5. #
  6. # GNU Texinfo is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 3 of the License,
  9. # or (at your option) any later version.
  10. #
  11. # GNU Texinfo is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. # This is a basic test of whether the Texinfo support in automake works.
  19. # Both texi2dvi and makeinfo. Since it requires automake, we don't want
  20. # to enable it by default or anything.
  21. set -x; set -e; set -u
  22. mkdir foo.dir
  23. cd foo.dir
  24. mkdir sub
  25. cat > configure.ac <<'END'
  26. AC_INIT([try-texinfo], [1.0])
  27. AM_INIT_AUTOMAKE([foreign -Wall -Werror])
  28. AC_CONFIG_FILES([Makefile])
  29. AC_OUTPUT
  30. END
  31. cat > Makefile.am <<'END'
  32. all-local: pdf dvi ps info
  33. info_TEXINFOS = sub/foobarbaz.texi
  34. END
  35. cat > sub/foobarbaz.texi <<'END'
  36. \input texinfo
  37. @setfilename foobarbaz.info
  38. @settitle Zardoz
  39. @node Top
  40. Foo Bar.
  41. @bye
  42. END
  43. autoreconf -vi
  44. grep ' -o.*foobarbaz\.texi' Makefile.in # Sanity check.
  45. ./configure
  46. make
  47. test -f sub/foobarbaz.info
  48. test -f sub/foobarbaz.dvi
  49. test -f sub/foobarbaz.ps
  50. test -f sub/foobarbaz.pdf
  51. make distcheck