Makefile.am 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. sed -n 's/@opindex *\([^,]*\)$$/\1/p;s/@opindex *\(.*\),.*/\1/p' \
  44. $(info_TEXINFOS) | sort | uniq > docs.$$$$;\
  45. (echo 'Not documented options:';\
  46. join -v1 opts.$$$$ docs.$$$$;\
  47. echo 'Non-existing options:';\
  48. join -v2 opts.$$$$ docs.$$$$) > report.$$$$;\
  49. rm opts.$$$$ docs.$$$$;\
  50. if [ -n "`sed '1,2d' report.$$$$`" ]; then \
  51. cat report.$$$$;\
  52. rm report.$$$$;\
  53. exit 1;\
  54. fi;\
  55. rm report.$$$$
  56. clean-local:
  57. rm -rf manual
  58. GENDOCS=gendocs.sh
  59. TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
  60. # Make sure you set TEXINPUTS
  61. # Usual value is:
  62. # /usr/share/texmf/pdftex/plain/misc:/usr/share/texmf/pdftex/config
  63. manual:
  64. TEXINPUTS=$(srcdir):$(top_srcdir)/config:$(TEXINPUTS) \
  65. MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
  66. TEXI2DVI="$(TEXI2DVI) -t @finalout" \
  67. $(GENDOCS) tar 'GNU tar manual'