doc: Rename .texinfo files to use .texi extension.
[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/ni.texi \
23         doc/not-implemented.texi \
24         doc/statistics.texi \
25         doc/transformation.texi \
26         doc/tutorial.texi \
27         doc/tut.texi \
28         doc/regression.texi \
29         doc/utilities.texi \
30         doc/variables.texi \
31         doc/fdl.texi 
32
33 doc_pspp_dev_TEXINFOS = doc/version-dev.texi \
34         doc/dev/intro.texi \
35         doc/dev/concepts.texi \
36         doc/dev/syntax.texi \
37         doc/dev/data.texi \
38         doc/dev/i18n.texi \
39         doc/dev/output.texi \
40         doc/dev/system-file-format.texi \
41         doc/dev/portable-file-format.texi \
42         doc/dev/q2c.texi
43
44 EXTRA_DIST += doc/pspp.man \
45         doc/get-commands.pl
46
47 $(srcdir)/doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl
48         @$(MKDIR_P)  doc
49         $(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
50
51 $(srcdir)/doc/tut.texi:
52         @$(MKDIR_P) doc
53         echo "@set example-dir $(examplesdir)" > $@
54
55
56 # The SED and AWK filters in this rule, are to work-around some nasty bugs in makeinfo version 4.13, which produces
57 # broken docbook xml.  These workarounds are rather horrible and must be removed asap.
58 $(srcdir)/doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS)
59         @$(MKDIR_P)  doc
60         $(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
61                 $(top_srcdir)/doc/pspp.texi -o - \
62                 | $(SED) -e 's/Time-&-Date/Time-\&-Date/g' \
63                 -e 's/“/\“/g' \
64                 -e 's/”/\”/g' \
65                 -e 's/‘/\‘/g' \
66                 -e 's/’/\’/g' \
67                 -e 's/—/\—/g' \
68                 -e 's/–/\′/g' \
69                 -e 's/é/\é/g' \
70                 -e 's/©/\©/g' \
71                 -e 's/−/\−/g' \
72                 -e 's/…/\…/g' \
73                 -e 's/•/\ߦ/g' \
74                 -e 's/././g' \
75                 -e 's%\(<figure [^>]*\)>%\1/>%g' \
76          | $(AWK) '/<para>.*<table.*>.*<\/para>/{x=sub("</para>",""); print; s=1;next}/<\/table>/{print; if (s==1) print "</para>"; s=0; next}1' \
77         > $@
78         $(XMLLINT) --output /dev/null $@ || ( $(RM) $@ ; false)
79
80 docbookdir = $(docdir)
81 dist_docbook_DATA = doc/pspp.xml
82  
83
84 CLEANFILES += pspp-dev.dvi $(docbook_DATA)
85
86 doc: $(INFO_DEPS) $(DVIS) $(PDFS) $(PSS) $(HTMLS) $(dist_docbook_DATA)
87 .PHONY: doc