txinfo-add-missing-and-dist.sh 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #! /bin/sh
  2. # Copyright (C) 1999-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. # Test to make sure texinfo.tex is correctly installed and disted by
  17. # -a when we're using AC_CONFIG_AUX_DIR. Bug report by by Per
  18. # Cederqvist.
  19. . test-init.sh
  20. cat > configure.ac << END
  21. AC_INIT([$me], [1.0])
  22. AC_CONFIG_AUX_DIR([auxdir])
  23. AM_INIT_AUTOMAKE
  24. AC_CONFIG_FILES([Makefile])
  25. AC_OUTPUT
  26. END
  27. cat > Makefile.am << 'END'
  28. info_TEXINFOS = textutils.texi
  29. .PHONY: test1 test2
  30. test1:
  31. @echo DISTFILES = $(DISTFILES)
  32. echo ' ' $(DISTFILES) ' ' | grep '[ /]auxdir/texinfo\.tex '
  33. test2: distdir
  34. ls -l $(distdir)/*
  35. test -f $(distdir)/auxdir/texinfo.tex
  36. END
  37. echo '@setfilename textutils.info' > textutils.texi
  38. mkdir auxdir
  39. $ACLOCAL
  40. $AUTOCONF
  41. $AUTOMAKE -a
  42. test -f auxdir/texinfo.tex
  43. ./configure
  44. # Create textutils.info by hand, so that we don't have to require
  45. # makeinfo. Also ensure it's really newer than textutils.texi, so
  46. # that make won't try to re-create it.
  47. $sleep
  48. : > textutils.info
  49. $MAKE test1 test2
  50. :