Fix parsing of some more .tlo files.
[pspp] / doc / automake.mk
1 ## PSPP - a program for statistical analysis.
2 ## Copyright (C) 2019, 2020 Free Software Foundation, Inc.
3 ##
4 ## This program is free software: you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation, either version 3 of the License, or
7 ## (at your option) any later version.
8 ##
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ## GNU General Public License for more details.
13 ##
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 ## Process this file with automake to produce Makefile.in  -*- makefile -*-
18
19 info_TEXINFOS = doc/pspp.texi doc/pspp-dev.texi
20
21 doc_pspp_TEXINFOS = doc/version.texi \
22         doc/bugs.texi \
23         doc/command-index.texi \
24         doc/concept-index.texi \
25         doc/data-io.texi \
26         doc/data-selection.texi \
27         doc/expressions.texi \
28         doc/files.texi \
29         doc/combining.texi \
30         doc/flow-control.texi \
31         doc/function-index.texi \
32         doc/installing.texi \
33         doc/introduction.texi \
34         doc/invoking.texi \
35         doc/language.texi \
36         doc/license.texi \
37         doc/pspp-convert.texi \
38         doc/pspp-output.texi \
39         doc/pspp-dump-sav.texi \
40         doc/ni.texi \
41         doc/not-implemented.texi \
42         doc/statistics.texi \
43         doc/transformation.texi \
44         doc/tutorial.texi \
45         doc/tut.texi \
46         doc/regression.texi \
47         doc/utilities.texi \
48         doc/variables.texi \
49         doc/fdl.texi
50
51 doc_pspp_dev_TEXINFOS = doc/version-dev.texi \
52         doc/dev/intro.texi \
53         doc/dev/concepts.texi \
54         doc/dev/syntax.texi \
55         doc/dev/data.texi \
56         doc/dev/i18n.texi \
57         doc/dev/output.texi \
58         doc/dev/system-file-format.texi \
59         doc/dev/pc+-file-format.texi \
60         doc/dev/portable-file-format.texi \
61         doc/dev/spv-file-format.texi \
62         doc/dev/tlo-file-format.texi \
63         doc/dev/encrypted-file-wrappers.texi \
64         doc/dev/q2c.texi
65
66 dist_man_MANS += doc/pspp.1 \
67                  doc/psppire.1
68
69 EXTRA_DIST += doc/get-commands.pl \
70               doc/help-pages-list \
71               doc/prepdoc.sh
72
73 $(srcdir)/doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl
74         $(AM_V_GEN)$(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
75
76 $(srcdir)/doc/tut.texi:
77         $(AM_V_GEN)echo "@set example-dir $(examplesdir)" > $@
78
79
80 doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) doc/help-pages-list
81 if BROKEN_DOCBOOK_XML
82         touch $@
83 else
84         $(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
85                 $< -o $@
86 endif
87
88 docbookdir = $(docdir)
89 dist_docbook_DATA = doc/pspp.xml
90
91
92 CLEANFILES += pspp-dev.dvi $(docbook_DATA) doc/pspp.info* doc/pspp.xml
93
94
95 doc: $(INFO_DEPS) $(DVIS) $(PDFS) $(PSS) $(HTMLS) $(dist_docbook_DATA)
96 PHONY += doc
97
98 doc/help-pages-list: $(UI_FILES)
99          $(AM_V_GEN)cat $^ | grep '"help[-_]page"' | \
100    $(SED) -e 's% *<property name="help[-_]page">\([^<]*\)</property>%//*[@id='"'"'\1'"'"']%' \
101         -e 's%#%'"'"']/*[@id='"'"'%g' > $@,tmp
102         test -s $@,tmp
103         mv $@,tmp $@
104
105 EXTRA_DIST += \
106         doc/help-pages-list \
107         doc/pspp-manual.css
108
109
110 AM_MAKEINFOFLAGS=-I $(top_srcdir)/doc/examples -I $(top_builddir)/doc/examples
111 am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc/examples:$(top_builddir)/doc/examples
112
113 ################# Example programs ##############################
114
115 EXAMPLE_SYNTAX = \
116  doc/examples/autorecode.sps \
117  doc/examples/chisquare.sps \
118  doc/examples/compute.sps \
119  doc/examples/count.sps \
120  doc/examples/descriptives.sps \
121  doc/examples/flip.sps \
122  doc/examples/frequencies.sps \
123  doc/examples/means.sps \
124  doc/examples/one-sample-t.sps \
125  doc/examples/independent-samples-t.sps \
126  doc/examples/reliability.sps \
127  doc/examples/split.sps \
128  doc/examples/tutorial1.sps \
129  doc/examples/tutorial2.sps \
130  doc/examples/tutorial3.sps \
131  doc/examples/tutorial4.sps \
132  doc/examples/tutorial5.sps \
133  doc/examples/tutorial6.sps \
134  doc/examples/tutorial7.sps \
135  doc/examples/weight.sps
136
137
138 EXTRA_DIST += $(EXAMPLE_SYNTAX)
139
140 EXAMPLE_SPVS = $(EXAMPLE_SYNTAX:.sps=.spv) \
141         doc/examples/tutorial2a.spv \
142         doc/examples/tutorial2b.spv \
143         doc/examples/tutorial5a.spv \
144         doc/examples/tutorial5b.spv \
145         doc/examples/tutorial7a.spv \
146         doc/examples/tutorial7b.spv
147 EXAMPLE_TXTS = $(EXAMPLE_SPVS:.spv=.txt)
148 EXAMPLE_TEXIS = $(EXAMPLE_TXTS:.txt=.texi)
149 EXAMPLE_HTML = $(EXAMPLE_SPVS:.spv=.html)
150
151 example-spv: $(EXAMPLE_SPVS)
152 example-txts: $(EXAMPLE_TXTS)
153 example-texis: $(EXAMPLE_TEXIS)
154 example-html: $(EXAMPLE_HTML)
155 PHONY += example-spv example-txts example-texis example-html
156
157 $(top_builddir)/doc/pspp.info:  $(EXAMPLE_TEXIS)
158 $(top_builddir)/doc/pspp.ps:    $(EXAMPLE_TEXIS)
159 $(top_builddir)/doc/pspp.dvi:   $(EXAMPLE_TEXIS)
160 $(top_builddir)/doc/pspp.html:  $(EXAMPLE_HTML)
161 $(top_builddir)/doc/pspp.pdf:   $(EXAMPLE_TEXIS)
162 $(top_builddir)/doc/pspp.xml:   $(EXAMPLE_TEXIS)
163
164 CLEANFILES += $(EXAMPLE_TXTS) $(EXAMPLE_SPVS) $(EXAMPLE_TEXIS) $(EXAMPLE_HTML)
165 SUFFIXES += .sps .spv .txt .html .texi
166
167 # Use pspp to process a syntax file into an output file.
168 pspp = src/ui/terminal/pspp
169 $(EXAMPLE_SPVS): $(pspp)
170 .sps.spv:
171         $(AM_V_GEN)(cd $(top_srcdir)/examples \
172          && $(abs_top_builddir)/$(pspp) ../doc/examples/$(<F) -o - -O format=spv) > $@.tmp
173         $(AM_V_at)mv $@.tmp $@
174
175 # In some cases, the tutorial only wants some parts of the output.
176 pspp_output = utilities/pspp-output
177 convert = $(AM_V_GEN)$(pspp_output) convert $< $@
178 doc/examples/tutorial2a.spv: doc/examples/tutorial2.spv $(pspp_output)
179         $(convert) --command='Descriptives'
180 doc/examples/tutorial2b.spv: doc/examples/tutorial2.spv $(pspp_output)
181         $(convert) --label='Extreme Values'
182 doc/examples/tutorial5a.spv: doc/examples/tutorial5.spv $(pspp_output)
183         $(convert) --commands=examine --nth-command=1 --labels=descriptives
184 doc/examples/tutorial5b.spv: doc/examples/tutorial5.spv $(pspp_output)
185         $(convert) --commands=examine --nth-command=2 --labels=descriptives
186 doc/examples/tutorial7a.spv: doc/examples/tutorial7.spv $(pspp_output)
187         $(convert) --commands=regression --nth-command=1 --subtypes=coefficients
188 doc/examples/tutorial7b.spv: doc/examples/tutorial7.spv $(pspp_output)
189         $(convert) --commands=regression --nth-command=2 --subtypes=coefficients
190
191 # Convert an output file into a text file or HTML file.
192 $(EXAMPLE_TXTS) $(EXAMPLE_HTML): $(pspp_output)
193 .spv.txt:
194         $(AM_V_GEN)utilities/pspp-output convert $< $@
195 .spv.html:
196         $(AM_V_GEN)utilities/pspp-output convert $< $@ -O format=html -O bare=true
197
198 # Convert a text file into a Texinfo file.
199 .txt.texi:
200         $(AM_V_GEN)$(SED) -e 's/@/@@/g' $< > $@
201
202 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --css-ref=pspp-manual.css
203 install-html-local: html-local
204         $(MKDIR_P) $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html
205         $(INSTALL_DATA) ${top_srcdir}/doc/pspp-manual.css $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html
206
207
208 \f
209
210 desktopdir = $(datadir)/applications
211
212 doc/org.fsf.pspp.metainfo.xml: doc/org.fsf.pspp.metainfo.xml.in $(POFILES)
213         $(AM_V_GEN)$(MSGFMT) --xml --template $< -o $@ -d $(top_srcdir)/po || \
214           $(MSGFMT) -L appdata --xml --template $< -o $@ -d $(top_srcdir)/po
215
216 doc/org.fsf.pspp.desktop: doc/org.fsf.pspp.desktop.in $(POFILES)
217         $(AM_V_GEN)$(MSGFMT) --desktop --template $< -o $@ -d $(top_srcdir)/po
218
219 CLEANFILES+=doc/org.fsf.pspp.desktop \
220             doc/org.fsf.pspp.metainfo.xml
221
222 desktop_DATA = doc/org.fsf.pspp.desktop
223
224 appdatadir = $(datadir)/metainfo
225 dist_appdata_DATA = doc/org.fsf.pspp.metainfo.xml
226
227 EXTRA_DIST += doc/org.fsf.pspp.metainfo.xml.in \
228         doc/org.fsf.pspp.desktop.in