Makefile.am 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. DISTCLEANFILES=*.info*
  31. # The rendering level is anyone of PUBLISH, DISTRIB or PROOF.
  32. # Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
  33. RENDITION = DISTRIB
  34. MAKEINFOFLAGS=-D$(RENDITION)
  35. header.texi: $(top_srcdir)/src/tar.h
  36. sed -f $(srcdir)/texify.sed $(top_srcdir)/src/tar.h \
  37. | expand >$@
  38. master-menu: $(tar_TEXINFOS)
  39. emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
  40. check-options:
  41. @ARGP_HELP_FMT='usage-indent=0,short-opt-col=0,long-opt-col=0,\
  42. doc-opt-col=0,opt-doc-col=0,header-col=0,rmargin=1' \
  43. $(top_builddir)/src/tar --usage | \
  44. sed -n 's/^\[--\([^]\=\[]*\).*/\1/p' | sort | uniq > opts.$$$$;\
  45. $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
  46. $(info_TEXINFOS) | \
  47. sed -n '/^@macro/,/^@end macro/d;s/@opindex *\([^@,]*\).*/\1/p' \
  48. | sort | uniq > docs.$$$$;\
  49. (echo 'Not documented options:';\
  50. join -v1 opts.$$$$ docs.$$$$;\
  51. echo 'Non-existing options:';\
  52. join -v2 opts.$$$$ docs.$$$$) > report.$$$$;\
  53. rm opts.$$$$ docs.$$$$;\
  54. if [ -n "`sed '1,2d' report.$$$$`" ]; then \
  55. cat report.$$$$;\
  56. rm report.$$$$;\
  57. exit 1;\
  58. fi;\
  59. rm report.$$$$
  60. clean-local:
  61. rm -rf manual
  62. GENDOCS=gendocs.sh
  63. TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
  64. # Make sure you set TEXINPUTS
  65. # Usual value is:
  66. # /usr/share/texmf/pdftex/plain/misc:/usr/share/texmf/pdftex/config
  67. manual:
  68. TEXINPUTS=$(srcdir):$(top_srcdir)/build-tex:$(TEXINPUTS) \
  69. MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
  70. TEXI2DVI="$(TEXI2DVI) -t @finalout" \
  71. $(GENDOCS) tar 'GNU tar manual'