Makefile.am 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # Makefile for GNU tar documentation.
  2. # Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2006 Free
  3. # Software Foundation, Inc.
  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. ## This program is distributed in the hope that it will be useful,
  9. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. ## GNU General Public License for more details.
  12. ## You should have received a copy of the GNU General Public License
  13. ## along with this program; if not, write to the Free Software Foundation,
  14. ## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. info_TEXINFOS = tar.texi
  16. tar_TEXINFOS = \
  17. dumpdir.texi\
  18. fdl.texi\
  19. freemanuals.texi\
  20. genfile.texi\
  21. getdate.texi\
  22. intern.texi\
  23. header.texi\
  24. rendition.texi\
  25. snapshot.texi\
  26. value.texi
  27. EXTRA_DIST = gendocs_template mastermenu.el texify.sed
  28. DISTCLEANFILES=*.info*
  29. # The rendering level is anyone of PUBLISH, DISTRIB or PROOF.
  30. # Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
  31. RENDITION = DISTRIB
  32. MAKEINFOFLAGS=-D$(RENDITION)
  33. header.texi: $(top_srcdir)/src/tar.h
  34. sed -f $(srcdir)/texify.sed $(top_srcdir)/src/tar.h \
  35. | expand >$@
  36. master-menu: $(tar_TEXINFOS)
  37. emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
  38. check-options:
  39. @ARGP_HELP_FMT='usage-indent=0,short-opt-col=0,long-opt-col=0,\
  40. doc-opt-col=0,opt-doc-col=0,header-col=0,rmargin=1' \
  41. $(top_builddir)/src/tar --usage | \
  42. sed -n 's/^\[--\([^]\=\[]*\).*/\1/p' | sort | uniq > opts.$$$$;\
  43. $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
  44. $(info_TEXINFOS) | \
  45. sed -n '/^@macro/,/^@end macro/d;s/@opindex *\([^@,]*\).*/\1/p' \
  46. | sort | uniq > docs.$$$$;\
  47. (echo 'Not documented options:';\
  48. join -v1 opts.$$$$ docs.$$$$;\
  49. echo 'Non-existing options:';\
  50. join -v2 opts.$$$$ docs.$$$$) > report.$$$$;\
  51. rm opts.$$$$ docs.$$$$;\
  52. if [ -n "`sed '1,2d' report.$$$$`" ]; then \
  53. cat report.$$$$;\
  54. rm report.$$$$;\
  55. exit 1;\
  56. fi;\
  57. rm report.$$$$
  58. clean-local:
  59. rm -rf manual
  60. GENDOCS=gendocs.sh
  61. TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
  62. # Make sure you set TEXINPUTS
  63. # Usual value is:
  64. # /usr/share/texmf/pdftex/plain/misc:/usr/share/texmf/pdftex/config
  65. manual:
  66. TEXINPUTS=$(srcdir):$(top_srcdir)/config:$(TEXINPUTS) \
  67. MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
  68. TEXI2DVI="$(TEXI2DVI) -t @finalout" \
  69. $(GENDOCS) tar 'GNU tar manual'