txinfo23.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #! /bin/sh
  2. # Copyright (C) 2002-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 when needed.
  17. # Test with subdir Texinfo.
  18. # (Similar to txinfo13.sh, plus DISTCLEANFILES).
  19. # (See also txinfo24.sh and txinfo25.sh).
  20. required='makeinfo tex texi2dvi'
  21. . test-init.sh
  22. cat >> configure.ac << 'END'
  23. AC_OUTPUT
  24. END
  25. cat > Makefile.am << 'END'
  26. DISTCLEANFILES = subdir/*.info*
  27. info_TEXINFOS = subdir/main.texi
  28. subdir_main_TEXINFOS = subdir/inc.texi
  29. installcheck-local:
  30. test -f "$(infodir)/main.info"
  31. END
  32. mkdir subdir
  33. cat > subdir/main.texi << 'END'
  34. \input texinfo
  35. @setfilename main.info
  36. @settitle main
  37. @node Top
  38. Hello walls.
  39. @include version.texi
  40. @include inc.texi
  41. @bye
  42. END
  43. cat > subdir/inc.texi << 'END'
  44. I'm included.
  45. END
  46. $ACLOCAL
  47. $AUTOCONF
  48. AUTOMAKE_run --add-missing -Wno-error
  49. grep "Makefile\.am:.*undocumented.* automake hack" stderr
  50. grep "Makefile\.am:.*'info-in-builddir' automake option" stderr
  51. mkdir build
  52. cd build
  53. ../configure
  54. $MAKE distcheck
  55. test -f subdir/main.info
  56. test ! -e ../subdir/main.info
  57. :