table: Fix memory leak.
[pspp.git] / doc / automake.mk
blob28866ca2e9196eb46143842cb7b1d3a95ba24483
1 ## Process this file with automake to produce Makefile.in -*- makefile -*-
3 info_TEXINFOS = doc/pspp.texi doc/pspp-dev.texi
5 doc_pspp_TEXINFOS = doc/version.texi \
6 doc/bugs.texi \
7 doc/command-index.texi \
8 doc/concept-index.texi \
9 doc/data-io.texi \
10 doc/data-selection.texi \
11 doc/expressions.texi \
12 doc/files.texi \
13 doc/combining.texi \
14 doc/flow-control.texi \
15 doc/function-index.texi \
16 doc/installing.texi \
17 doc/introduction.texi \
18 doc/invoking.texi \
19 doc/language.texi \
20 doc/license.texi \
21 doc/pspp-convert.texi \
22 doc/pspp-dump-sav.texi \
23 doc/ni.texi \
24 doc/not-implemented.texi \
25 doc/statistics.texi \
26 doc/transformation.texi \
27 doc/tutorial.texi \
28 doc/tut.texi \
29 doc/regression.texi \
30 doc/utilities.texi \
31 doc/variables.texi \
32 doc/fdl.texi
34 doc_pspp_dev_TEXINFOS = doc/version-dev.texi \
35 doc/dev/intro.texi \
36 doc/dev/concepts.texi \
37 doc/dev/syntax.texi \
38 doc/dev/data.texi \
39 doc/dev/i18n.texi \
40 doc/dev/output.texi \
41 doc/dev/system-file-format.texi \
42 doc/dev/pc+-file-format.texi \
43 doc/dev/portable-file-format.texi \
44 doc/dev/spv-file-format.texi \
45 doc/dev/encrypted-file-wrappers.texi \
46 doc/dev/q2c.texi
48 if HAVE_DOT
49 $(PDFS): doc/dev/spv-structure.pdf
50 $(srcdir)/doc/dev/spv-structure.pdf: doc/dev/spv-structure.gv
51 dot -Tpdf < $< > $@
53 $(DVIS): doc/dev/spv-structure.eps
54 $(srcdir)/doc/dev/spv-structure.eps: doc/dev/spv-structure.gv
55 dot -Teps < $< > $@
56 endif
57 EXTRA_DIST += \
58 doc/dev/spv-structure.gv \
59 doc/dev/spv-structure.pdf \
60 doc/dev/spv-structure.eps
62 dist_man_MANS += doc/pspp.1 \
63 doc/psppire.1
65 EXTRA_DIST += doc/get-commands.pl doc/help-pages-list
67 $(srcdir)/doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl
68 @$(MKDIR_P) doc
69 $(AM_V_GEN)$(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
71 $(srcdir)/doc/tut.texi:
72 @$(MKDIR_P) doc
73 $(AM_V_GEN)echo "@set example-dir $(examplesdir)" > $@
76 # The SED and AWK filters in this rule, are to work-around some nasty bugs in
77 # makeinfo version 4.13, which produces broken docbook xml. These workarounds
78 # are rather horrible and must be removed asap.
79 $(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) $(top_srcdir)/doc/help-pages-list
80 @$(MKDIR_P) doc
81 $(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
82 $(top_srcdir)/doc/pspp.texi -o - \
83 | $(SED) -e 's/Time-&-Date/Time-\&amp;-Date/g' \
84 -e 's/&ldquo;/\&#8220;/g' \
85 -e 's/&rdquo;/\&#8221;/g' \
86 -e 's/&lsquo;/\&#8216;/g' \
87 -e 's/&rsquo;/\&#8217;/g' \
88 -e 's/&mdash;/\&#8212;/g' \
89 -e 's/&ndash;/\&#8242;/g' \
90 -e 's/&eacute;/\&#0233;/g' \
91 -e 's/&copy;/\&#0169;/g' \
92 -e 's/&minus;/\&#8722;/g' \
93 -e 's/&hellip;/\&#8230;/g' \
94 -e 's/&bull;/\&#2022;/g' \
95 -e 's/&period;/./g' \
96 -e 's%\(<figure [^>]*\)>%\1/>%g' \
97 | $(AWK) '/<para>.*<table.*>.*<\/para>/{x=sub("</para>",""); print; s=1;next}/<\/table>/{print; if (s==1) print "</para>"; s=0; next}1' \
98 > $@,tmp
99 $(AM_V_at)$(XMLLINT) --output /dev/null $@,tmp
100 $(AM_V_at)cat $(top_srcdir)/doc/help-pages-list | while read node ; do \
101 $(XMLLINT) --xpath "$$node" $@,tmp > /dev/null; \
102 if test $$? -ne 0 ; then echo "$$node does not appear in $@" ; exit 1; fi ; \
103 done
104 mv $@,tmp $@
106 docbookdir = $(docdir)
107 dist_docbook_DATA = doc/pspp.xml
110 CLEANFILES += pspp-dev.dvi $(docbook_DATA)
112 doc: $(INFO_DEPS) $(DVIS) $(PDFS) $(PSS) $(HTMLS) $(dist_docbook_DATA)
113 .PHONY: doc