txinfo-no-extra-dist.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #! /bin/sh
  2. # Copyright (C) 1996-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 ensure that a ".info~" or ".info.bak" file doesn't end up
  17. # in the distribution. Bug report from Greg McGary.
  18. . test-init.sh
  19. cat >> configure.ac << 'END'
  20. AC_OUTPUT
  21. END
  22. cat > Makefile.am << 'END'
  23. info_TEXINFOS = textutils.texi subdir/main.texi
  24. test: distdir
  25. @echo DISTFILES = $(DISTFILES)
  26. @case '$(DISTFILES)' in *'~'*|*'.bak'*) exit 1;; *) exit 0;; esac
  27. st=0; \
  28. find $(distdir) | grep '~' && st=1; \
  29. find $(distdir) | grep '\.bak' && st=1; \
  30. exit $$st
  31. PHONY: test
  32. END
  33. : > texinfo.tex
  34. mkdir subdir
  35. echo '@setfilename textutils.info' > textutils.texi
  36. echo '@setfilename main.info' > subdir/main.texi
  37. $ACLOCAL
  38. $AUTOCONF
  39. $AUTOMAKE
  40. ./configure
  41. : > textutils.info
  42. : > subdir/main.info
  43. : > textutils.info~
  44. : > textutils.info.bak
  45. : > subdir/main.info~
  46. : > subdir/main.info.bak
  47. $MAKE test
  48. $MAKE maintainer-clean
  49. test -f subdir/main.info~
  50. test -f subdir/main.info.bak
  51. :