Makefile.am 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. # Makefile for GNU tar documentation.
  2. # Copyright (C) 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2003, 2006,
  3. # 2007 Free 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 3, 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. tar-snapshot-edit.texi\
  19. fdl.texi\
  20. freemanuals.texi\
  21. genfile.texi\
  22. getdate.texi\
  23. header.texi\
  24. intern.texi\
  25. rendition.texi\
  26. snapshot.texi\
  27. sparse.texi\
  28. value.texi
  29. EXTRA_DIST = gendocs_template mastermenu.el texify.sed
  30. # The rendering level is anyone of PUBLISH, DISTRIB or PROOF.
  31. # Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
  32. RENDITION = DISTRIB
  33. MAKEINFOFLAGS=-D$(RENDITION)
  34. header.texi: $(top_srcdir)/src/tar.h
  35. sed -f $(srcdir)/texify.sed $(top_srcdir)/src/tar.h \
  36. | expand >$@
  37. master-menu: $(tar_TEXINFOS)
  38. emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
  39. check-options:
  40. @ARGP_HELP_FMT='usage-indent=0,short-opt-col=0,long-opt-col=0,\
  41. doc-opt-col=0,opt-doc-col=0,header-col=0,rmargin=1' \
  42. $(top_builddir)/src/tar --usage | \
  43. sed -n 's/^\[--\([^]\=\[]*\).*/\1/p' | sort | uniq > opts.$$$$;\
  44. $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
  45. $(info_TEXINFOS) | \
  46. sed -n '/^@macro/,/^@end macro/d;s/@opindex *\([^@,]*\).*/\1/p' \
  47. | sort | uniq > docs.$$$$;\
  48. (echo 'Not documented options:';\
  49. join -v1 opts.$$$$ docs.$$$$;\
  50. echo 'Non-existing options:';\
  51. join -v2 opts.$$$$ docs.$$$$) > report.$$$$;\
  52. rm opts.$$$$ docs.$$$$;\
  53. if [ -n "`sed '1,2d' report.$$$$`" ]; then \
  54. cat report.$$$$;\
  55. rm report.$$$$;\
  56. exit 1;\
  57. fi;\
  58. rm report.$$$$
  59. clean-local:
  60. rm -rf manual
  61. GENDOCS=gendocs.sh
  62. TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
  63. # Make sure you set TEXINPUTS
  64. # Usual value is:
  65. # /usr/share/texmf/pdftex/plain/misc:/usr/share/texmf/pdftex/config
  66. manual:
  67. TEXINPUTS=$(srcdir):$(top_srcdir)/build-tex:$(TEXINPUTS) \
  68. MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
  69. TEXI2DVI="$(TEXI2DVI) -t @finalout" \
  70. $(GENDOCS) --texi2html tar 'GNU tar manual'