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 \
7 doc/command-index.texi \
8 doc/concept-index.texi \
10 doc/data-selection.texi \
11 doc/expressions.texi \
14 doc/flow-control.texi \
15 doc/function-index.texi \
17 doc/introduction.texi \
21 doc/pspp-convert.texi \
22 doc/pspp-dump-sav.texi \
24 doc/not-implemented.texi \
26 doc/transformation.texi \
34 doc_pspp_dev_TEXINFOS = doc/version-dev.texi \
36 doc/dev/concepts.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 \
49 $(PDFS): doc/dev/spv-structure.pdf
50 $(srcdir)/doc/dev/spv-structure.pdf: doc/dev/spv-structure.gv
53 $(DVIS): doc/dev/spv-structure.eps
54 $(srcdir)/doc/dev/spv-structure.eps: doc/dev/spv-structure.gv
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 \
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
69 $(AM_V_GEN)$(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
71 $(srcdir)/doc/tut.texi:
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
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-\&-Date/g' \
84 -e 's/“/\“/g' \
85 -e 's/”/\”/g' \
86 -e 's/‘/\‘/g' \
87 -e 's/’/\’/g' \
88 -e 's/—/\—/g' \
89 -e 's/–/\′/g' \
90 -e 's/é/\é/g' \
91 -e 's/©/\©/g' \
92 -e 's/−/\−/g' \
93 -e 's/…/\…/g' \
94 -e 's/•/\ߦ/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' \
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 ; \
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)