1 ## PSPP - a program for statistical analysis.
2 ## Copyright (C) 2019, 2020 Free Software Foundation, Inc.
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.
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.
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/>.
17 ## Process this file with automake to produce Makefile.in -*- makefile -*-
19 info_TEXINFOS = doc/pspp.texi doc/pspp-dev.texi
21 doc_pspp_TEXINFOS = doc/version.texi \
23 doc/command-index.texi \
24 doc/concept-index.texi \
26 doc/data-selection.texi \
27 doc/expressions.texi \
30 doc/flow-control.texi \
31 doc/function-index.texi \
33 doc/introduction.texi \
37 doc/pspp-convert.texi \
38 doc/pspp-output.texi \
39 doc/pspp-dump-sav.texi \
41 doc/not-implemented.texi \
43 doc/transformation.texi \
51 doc_pspp_dev_TEXINFOS = doc/version-dev.texi \
53 doc/dev/concepts.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/encrypted-file-wrappers.texi \
65 dist_man_MANS += doc/pspp.1 \
68 EXTRA_DIST += doc/get-commands.pl \
72 $(srcdir)/doc/ni.texi: $(top_srcdir)/src/language/command.def doc/get-commands.pl
73 $(AM_V_GEN)$(PERL) $(top_srcdir)/doc/get-commands.pl $(top_srcdir)/src/language/command.def > $@
75 $(srcdir)/doc/tut.texi:
76 $(AM_V_GEN)echo "@set example-dir $(examplesdir)" > $@
79 doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) doc/help-pages-list
83 $(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \
87 docbookdir = $(docdir)
88 dist_docbook_DATA = doc/pspp.xml
91 CLEANFILES += pspp-dev.dvi $(docbook_DATA) doc/pspp.info* doc/pspp.xml
94 doc: $(INFO_DEPS) $(DVIS) $(PDFS) $(PSS) $(HTMLS) $(dist_docbook_DATA)
97 doc/help-pages-list: $(UI_FILES)
98 $(AM_V_GEN)cat $^ | grep '"help[-_]page"' | \
99 $(SED) -e 's% *<property name="help[-_]page">\([^<]*\)</property>%//*[@id='"'"'\1'"'"']%' \
100 -e 's%#%'"'"']/*[@id='"'"'%g' > $@,tmp
105 doc/help-pages-list \
109 AM_MAKEINFOFLAGS=-I $(top_srcdir)/doc/examples -I $(top_builddir)/doc/examples
110 am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc/examples:$(top_builddir)/doc/examples
112 ################# Example programs ##############################
115 doc/examples/autorecode.sps \
116 doc/examples/chisquare.sps \
117 doc/examples/compute.sps \
118 doc/examples/count.sps \
119 doc/examples/descriptives.sps \
120 doc/examples/flip.sps \
121 doc/examples/frequencies.sps \
122 doc/examples/means.sps \
123 doc/examples/one-sample-t.sps \
124 doc/examples/independent-samples-t.sps \
125 doc/examples/reliability.sps \
126 doc/examples/split.sps \
127 doc/examples/tutorial1.sps \
128 doc/examples/tutorial2.sps \
129 doc/examples/tutorial3.sps \
130 doc/examples/tutorial4.sps \
131 doc/examples/tutorial5.sps \
132 doc/examples/tutorial6.sps \
133 doc/examples/tutorial7.sps \
134 doc/examples/weight.sps
137 EXTRA_DIST += $(EXAMPLE_SYNTAX)
139 EXAMPLE_SPVS = $(EXAMPLE_SYNTAX:.sps=.spv) \
140 doc/examples/tutorial2a.spv \
141 doc/examples/tutorial2b.spv \
142 doc/examples/tutorial5a.spv \
143 doc/examples/tutorial5b.spv \
144 doc/examples/tutorial7a.spv \
145 doc/examples/tutorial7b.spv
146 EXAMPLE_TXTS = $(EXAMPLE_SPVS:.spv=.txt)
147 EXAMPLE_TEXIS = $(EXAMPLE_TXTS:.txt=.texi)
148 EXAMPLE_HTML = $(EXAMPLE_SPVS:.spv=.html)
150 example-spv: $(EXAMPLE_SPVS)
151 example-txts: $(EXAMPLE_TXTS)
152 example-texis: $(EXAMPLE_TEXIS)
153 example-html: $(EXAMPLE_HTML)
154 PHONY += example-spv example-txts example-texis example-html
156 $(top_builddir)/doc/pspp.info: $(EXAMPLE_TEXIS)
157 $(top_builddir)/doc/pspp.ps: $(EXAMPLE_TEXIS)
158 $(top_builddir)/doc/pspp.dvi: $(EXAMPLE_TEXIS)
159 $(top_builddir)/doc/pspp.html: $(EXAMPLE_HTML)
160 $(top_builddir)/doc/pspp.pdf: $(EXAMPLE_TEXIS)
161 $(top_builddir)/doc/pspp.xml: $(EXAMPLE_TEXIS)
163 CLEANFILES += $(EXAMPLE_TXTS) $(EXAMPLE_SPVS) $(EXAMPLE_TEXIS) $(EXAMPLE_HTML)
164 SUFFIXES += .sps .spv .txt .html .texi
166 # Use pspp to process a syntax file into an output file.
167 pspp = src/ui/terminal/pspp
168 $(EXAMPLE_SPVS): $(pspp)
170 $(AM_V_GEN)(cd $(top_srcdir)/examples \
171 && $(abs_top_builddir)/$(pspp) ../doc/examples/$(<F) -o - -O format=spv) > $@.tmp
172 $(AM_V_at)mv $@.tmp $@
174 # In some cases, the tutorial only wants some parts of the output.
175 pspp_output = utilities/pspp-output
176 convert = $(AM_V_GEN)$(pspp_output) convert $< $@
177 doc/examples/tutorial2a.spv: doc/examples/tutorial2.spv $(pspp_output)
178 $(convert) --command='Descriptives'
179 doc/examples/tutorial2b.spv: doc/examples/tutorial2.spv $(pspp_output)
180 $(convert) --label='Extreme Values'
181 doc/examples/tutorial5a.spv: doc/examples/tutorial5.spv $(pspp_output)
182 $(convert) --commands=examine --nth-command=1 --labels=descriptives
183 doc/examples/tutorial5b.spv: doc/examples/tutorial5.spv $(pspp_output)
184 $(convert) --commands=examine --nth-command=2 --labels=descriptives
185 doc/examples/tutorial7a.spv: doc/examples/tutorial7.spv $(pspp_output)
186 $(convert) --commands=regression --nth-command=1 --subtypes=coefficients
187 doc/examples/tutorial7b.spv: doc/examples/tutorial7.spv $(pspp_output)
188 $(convert) --commands=regression --nth-command=2 --subtypes=coefficients
190 # Convert an output file into a text file or HTML file.
192 # (For HTML, use sed to include only the contents of <body>.)
193 $(EXAMPLE_TXTS) $(EXAMPLE_HTML): $(pspp_output)
195 $(AM_V_GEN)utilities/pspp-output convert $< $@
197 $(AM_V_GEN)utilities/pspp-output convert $< - -O format=html \
198 | $(SED) -e '\%</body%,$$d' -e '0,/<body/d' > $@.tmp
199 $(AM_V_at)mv $@.tmp $@
201 # Convert a text file into a Texinfo file.
203 $(AM_V_GEN)sed 's/@/@@/g' < $< > $@.tmp
204 $(AM_V_at)mv $@.tmp $@
206 # Insert the link tag for the cascading style sheet.
207 # But make sure these operations are idempotent.
209 for h in doc/pspp.html/*.html; do \
210 if grep -Fq '<link rel="stylesheet"' $$h; then continue; fi ; \
211 $(SED) -i -e '/^<\/head>/i \\\
212 <link rel="stylesheet" href="pspp-manual.css">' $$h; \
215 install-html-local: html-local
216 $(MKDIR_P) $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html
217 $(INSTALL_DATA) ${top_srcdir}/doc/pspp-manual.css $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html
222 desktopdir = $(datadir)/applications
224 doc/org.fsf.pspp.metainfo.xml: doc/org.fsf.pspp.metainfo.xml.in $(POFILES)
225 $(AM_V_GEN)$(MSGFMT) --xml --template $< -o $@ -d $(top_srcdir)/po || \
226 $(MSGFMT) -L appdata --xml --template $< -o $@ -d $(top_srcdir)/po
228 doc/org.fsf.pspp.desktop: doc/org.fsf.pspp.desktop.in $(POFILES)
229 $(AM_V_GEN)$(MSGFMT) --desktop --template $< -o $@ -d $(top_srcdir)/po
231 CLEANFILES+=doc/org.fsf.pspp.desktop \
232 doc/org.fsf.pspp.metainfo.xml
234 desktop_DATA = doc/org.fsf.pspp.desktop
236 appdatadir = $(datadir)/metainfo
237 dist_appdata_DATA = doc/org.fsf.pspp.metainfo.xml
239 EXTRA_DIST += doc/org.fsf.pspp.metainfo.xml.in \
240 doc/org.fsf.pspp.desktop.in