]> Dogcows Code - chaz/tar/blob - doc/Makefile.am
Provide tar(1) and rmt(8) manpages.
[chaz/tar] / doc / Makefile.am
1 # Makefile for GNU tar documentation.
2
3 # Copyright 1994-1997, 1999-2001, 2003, 2006-2007, 2013 Free Software
4 # Foundation, Inc.
5
6 # This file is part of GNU tar.
7
8 # GNU tar is free software; you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation; either version 3 of the License, or
11 # (at your option) any later version.
12
13 # GNU tar is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
17
18 # You should have received a copy of the GNU General Public License
19 # along with this program. If not, see <http://www.gnu.org/licenses/>.
20
21 info_TEXINFOS = tar.texi
22 tar_TEXINFOS = \
23 dumpdir.texi\
24 tar-snapshot-edit.texi\
25 fdl.texi\
26 freemanuals.texi\
27 genfile.texi\
28 header.texi\
29 intern.texi\
30 parse-datetime.texi\
31 rendition.texi\
32 snapshot.texi\
33 sparse.texi\
34 value.texi
35
36 dist_man_MANS=tar.1 rmt.8
37
38 EXTRA_DIST = gendocs_template mastermenu.el texify.sed untabify.el
39
40 # The rendering level is anyone of PUBLISH, DISTRIB or PROOF.
41 # Just call 'make RENDITION=PROOF [target]' if you want PROOF rendition.
42 RENDITION = DISTRIB
43
44 MAKEINFOFLAGS=-D$(RENDITION)
45
46 header.texi: $(top_srcdir)/src/tar.h
47 sed -f $(srcdir)/texify.sed $(top_srcdir)/src/tar.h \
48 | expand >$@
49
50 master-menu: $(tar_TEXINFOS)
51 emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
52
53 untabify:
54 emacs -batch -l untabify.el $(info_TEXINFOS) $(tar_TEXINFOS)
55
56 final: untabify master-menu
57
58 # Checking
59 check-format:
60 @if test -n "`cat $(info_TEXINFOS) $(tar_TEXINFOS) | tr -d -c '\t'`"; then \
61 echo "Sources contain tabs; run make untabify"; \
62 false; \
63 fi
64
65 check-options:
66 @ARGP_HELP_FMT='usage-indent=0,short-opt-col=0,long-opt-col=0,doc-opt-col=0,opt-doc-col=0,header-col=0,rmargin=1' \
67 $(top_builddir)/src/tar --usage | \
68 sed -n 's/^\[--\([^]\=\[]*\).*/\1/p' | sort | uniq > opts.$$$$;\
69 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) -E - \
70 $(info_TEXINFOS) | \
71 sed -n '/^@macro/,/^@end macro/d;s/@opindex *\([^@,]*\).*/\1/p' \
72 | sort | uniq > docs.$$$$;\
73 status=0;\
74 join -v1 opts.$$$$ docs.$$$$ > report.$$$$;\
75 if test -s report.$$$$; then \
76 echo 'Not documented options:'; \
77 cat report.$$$$; \
78 status=1; \
79 fi; \
80 join -v2 opts.$$$$ docs.$$$$ > report.$$$$;\
81 if test -s report.$$$$; then \
82 echo 'Non-existing options:';\
83 cat report.$$$$; \
84 status=1; \
85 fi; \
86 rm opts.$$$$ docs.$$$$ report.$$$$;\
87 test $$status -ne 0 && exit $$status
88
89 check-refs:
90 @for file in $(info_TEXINFOS) $(tar_TEXINFOS); \
91 do \
92 sed -e = $$file | \
93 sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\).*/'$$file':\1: \2/gp}'; \
94 done > $@-t; \
95 if [ -s $@-t ]; then \
96 echo "Unresolved cross-references:"; \
97 cat $@-t;\
98 rm $@-t; \
99 else \
100 rm -f $@-t; \
101 fi
102
103 check-fixmes:
104 @for file in $(info_TEXINFOS); \
105 do \
106 sed -e = $$file | \
107 sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/'$$file':\1: \2/gp}'; \
108 done > $@-t; \
109 if [ -s $@-t ]; then \
110 echo "Unresolved FIXMEs:"; \
111 cat $@-t; \
112 rm $@-t; \
113 false; \
114 else \
115 rm -f $@-t; \
116 fi
117
118 check-unrevised:
119 @grep -Hn @UNREVISED $(info_TEXINFOS) > $@-t; \
120 if [ -s $@-t ]; then \
121 echo "Unrevised nodes:"; \
122 cat $@-t; \
123 rm $@-t; \
124 false;\
125 else \
126 rm $@-t; \
127 fi
128
129 all-check-docs: check-format check-options check-refs check-fixmes check-unrevised
130
131 check-docs:
132 $(MAKE) -k all-check-docs
133
134 #
135
136 clean-local:
137 rm -rf manual
138
139 GENDOCS=gendocs.sh
140
141 TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
142
143 # Make sure you set TEXINPUTS
144 # Usual value is:
145 # /usr/share/texmf/pdftex/plain/misc:/usr/share/texmf/pdftex/config
146 manual:
147 TEXINPUTS=$(srcdir):$(top_srcdir)/build-tex:$(TEXINPUTS) \
148 MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
149 TEXI2DVI="$(TEXI2DVI) -t @finalout" \
150 $(GENDOCS) --texi2html tar 'GNU tar manual'
This page took 0.037609 seconds and 4 git commands to generate.