spv-file-format: Improve description of file format.
[pspp] / doc / automake.mk
1 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
2
3 info_TEXINFOS = doc/pspp.texi doc/pspp-dev.texi
4
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 
33
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
47
48 dist_man_MANS += doc/pspp.1 \
49                  doc/psppire.1
50
51 EXTRA_DIST += doc/get-commands.pl doc/help-pages-list
52
53 $(srcdir)/doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl
54         @$(MKDIR_P)  doc
55         $(AM_V_GEN)$(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
56
57 $(srcdir)/doc/tut.texi:
58         @$(MKDIR_P) doc
59         $(AM_V_GEN)echo "@set example-dir $(examplesdir)" > $@
60
61
62 # The SED and AWK filters in this rule, are to work-around some nasty bugs in 
63 # makeinfo version 4.13, which produces broken docbook xml.  These workarounds 
64 # are rather horrible and must be removed asap.
65 $(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) $(top_srcdir)/doc/help-pages-list
66         @$(MKDIR_P)  doc
67         $(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
68                 $(top_srcdir)/doc/pspp.texi -o - \
69                 | $(SED) -e 's/Time-&-Date/Time-\&-Date/g' \
70                 -e 's/“/\“/g' \
71                 -e 's/”/\”/g' \
72                 -e 's/‘/\‘/g' \
73                 -e 's/’/\’/g' \
74                 -e 's/—/\—/g' \
75                 -e 's/–/\′/g' \
76                 -e 's/é/\é/g' \
77                 -e 's/©/\©/g' \
78                 -e 's/−/\−/g' \
79                 -e 's/…/\…/g' \
80                 -e 's/•/\ߦ/g' \
81                 -e 's/././g' \
82                 -e 's%\(<figure [^>]*\)>%\1/>%g' \
83          | $(AWK) '/<para>.*<table.*>.*<\/para>/{x=sub("</para>",""); print; s=1;next}/<\/table>/{print; if (s==1) print "</para>"; s=0; next}1' \
84         > $@,tmp
85         $(AM_V_at)$(XMLLINT) --output /dev/null $@,tmp
86         $(AM_V_at)cat $(top_srcdir)/doc/help-pages-list | while read node ; do \
87          $(XMLLINT) --xpath "$$node" $@,tmp > /dev/null; \
88          if test $$? -ne 0 ; then  echo "$$node does not appear in $@" ; exit 1; fi ; \
89          done 
90         mv $@,tmp $@
91
92 docbookdir = $(docdir)
93 dist_docbook_DATA = doc/pspp.xml
94
95
96 CLEANFILES += pspp-dev.dvi $(docbook_DATA)
97
98 doc: $(INFO_DEPS) $(DVIS) $(PDFS) $(PSS) $(HTMLS) $(dist_docbook_DATA)
99 .PHONY: doc