X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=doc%2Fautomake.mk;h=a44ab26587eee204b748d79d8c1ad23144d37433;hb=392dc8858f3ff779ad92b74518d65db9db4d7cd4;hp=5e09c6cbfbfc06f85f297839e45e3cd8a5d0e2b8;hpb=5987926fc7ef9f1ded52a8513d1b1be03d040c7f;p=pspp diff --git a/doc/automake.mk b/doc/automake.mk index 5e09c6cbfb..a44ab26587 100644 --- a/doc/automake.mk +++ b/doc/automake.mk @@ -59,6 +59,7 @@ doc_pspp_dev_TEXINFOS = doc/version-dev.texi \ doc/dev/pc+-file-format.texi \ doc/dev/portable-file-format.texi \ doc/dev/spv-file-format.texi \ + doc/dev/tlo-file-format.texi \ doc/dev/encrypted-file-wrappers.texi \ doc/dev/q2c.texi @@ -106,73 +107,104 @@ EXTRA_DIST += \ doc/pspp-manual.css -AM_MAKEINFOFLAGS=-I $(top_srcdir)/doc/examples -I $(top_builddir)/doc/examples -am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc/examples:$(top_builddir)/doc/examples +AM_MAKEINFOFLAGS=-I $(top_srcdir)/doc/pspp-figures -I $(top_builddir)/doc/pspp-figures +am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc/pspp-figures:$(top_builddir)/doc/pspp-figures ################# Example programs ############################## -EXAMPLE_SYNTAX = \ - doc/examples/autorecode.sps \ - doc/examples/chisquare.sps \ - doc/examples/compute.sps \ - doc/examples/count.sps \ - doc/examples/descriptives.sps \ - doc/examples/flip.sps \ - doc/examples/frequencies.sps \ - doc/examples/means.sps \ - doc/examples/one-sample-t.sps \ - doc/examples/independent-samples-t.sps \ - doc/examples/reliability.sps \ - doc/examples/split.sps \ - doc/examples/weight.sps - - -EXTRA_DIST += $(EXAMPLE_SYNTAX) - -EXAMPLE_OUTPUTS = $(EXAMPLE_SYNTAX:.sps=.out) -EXAMPLE_HTML = $(EXAMPLE_SYNTAX:.sps=.html) - -example-outputs: $(EXAMPLE_OUTPUTS) -example-html: $(EXAMPLE_HTML) -PHONY += example-outputs example-html - -$(top_builddir)/doc/pspp.info: $(EXAMPLE_OUTPUTS) -$(top_builddir)/doc/pspp.ps: $(EXAMPLE_OUTPUTS) -$(top_builddir)/doc/pspp.dvi: $(EXAMPLE_OUTPUTS) -$(top_builddir)/doc/pspp.html: $(EXAMPLE_HTML) -$(top_builddir)/doc/pspp.pdf: $(EXAMPLE_OUTPUTS) -$(top_builddir)/doc/pspp.xml: $(EXAMPLE_OUTPUTS) - -# The examples cannot be built until the binary has been built -pspp = $(abs_top_builddir)/src/ui/terminal/pspp -$(EXAMPLE_OUTPUTS): $(pspp) -$(EXAMPLE_HTML): $(pspp) - -CLEANFILES += $(EXAMPLE_OUTPUTS) - -SUFFIXES: .sps - -# use pspp to process a syntax file and reap the output into a text file -.sps.out: +FIGURE_SYNTAX = \ + doc/pspp-figures/autorecode.sps \ + doc/pspp-figures/chisquare.sps \ + doc/pspp-figures/compute.sps \ + doc/pspp-figures/count.sps \ + doc/pspp-figures/descriptives.sps \ + doc/pspp-figures/flip.sps \ + doc/pspp-figures/frequencies.sps \ + doc/pspp-figures/means.sps \ + doc/pspp-figures/one-sample-t.sps \ + doc/pspp-figures/independent-samples-t.sps \ + doc/pspp-figures/reliability.sps \ + doc/pspp-figures/split.sps \ + doc/pspp-figures/tutorial1.sps \ + doc/pspp-figures/tutorial2.sps \ + doc/pspp-figures/tutorial3.sps \ + doc/pspp-figures/tutorial4.sps \ + doc/pspp-figures/tutorial5.sps \ + doc/pspp-figures/tutorial6.sps \ + doc/pspp-figures/tutorial7.sps \ + doc/pspp-figures/weight.sps + + +EXTRA_DIST += $(FIGURE_SYNTAX) + +FIGURE_SPVS = $(FIGURE_SYNTAX:.sps=.spv) \ + doc/pspp-figures/tutorial2a.spv \ + doc/pspp-figures/tutorial2b.spv \ + doc/pspp-figures/tutorial5a.spv \ + doc/pspp-figures/tutorial5b.spv \ + doc/pspp-figures/tutorial7a.spv \ + doc/pspp-figures/tutorial7b.spv +FIGURE_TXTS = $(FIGURE_SPVS:.spv=.txt) +FIGURE_TEXIS = $(FIGURE_TXTS:.txt=.texi) +FIGURE_HTMLS = $(FIGURE_SPVS:.spv=.html) +FIGURE_PDFS = $(FIGURE_SPVS:.spv=.pdf) + +figure-spvs: $(FIGURE_SPVS) +figure-txts: $(FIGURE_TXTS) +figure-texis: $(FIGURE_TEXIS) +figure-htmls: $(FIGURE_HTMLS) +figure-pdfs: $(FIGURE_PDFS) +PHONY += figure-spv figure-txts figure-texis figure-htmls figure-pdfs + +$(top_builddir)/doc/pspp.info: $(FIGURE_TEXIS) +$(top_builddir)/doc/pspp.ps: $(FIGURE_TEXIS) +$(top_builddir)/doc/pspp.dvi: $(FIGURE_TEXIS) +$(top_builddir)/doc/pspp.html: $(FIGURE_HTMLS) +$(top_builddir)/doc/pspp.pdf: $(FIGURE_TEXIS) +$(top_builddir)/doc/pspp.xml: $(FIGURE_TEXIS) + +CLEANFILES += $(FIGURE_TXTS) $(FIGURE_SPVS) $(FIGURE_TEXIS) $(FIGURE_HTMLS) +SUFFIXES += .sps .spv .txt .html .texi .pdf + +# Use pspp to process a syntax file into an output file. +pspp = src/ui/terminal/pspp +$(FIGURE_SPVS): $(pspp)$(EXEEXT) +.sps.spv: $(AM_V_GEN)(cd $(top_srcdir)/examples \ - && $(pspp) ../doc/examples/$( $@.tmp && mv $@.tmp $@ - -# Use pspp to process a syntax file and reap the output into a html file -# Then, use sed to delete everything up to and including and -# everything after and including -.sps.html: - $(AM_V_GEN)(cd $(top_srcdir)/examples \ - && $(pspp) ../doc/examples/$( $@.tmp && mv $@.tmp $@ - -# Insert the link tag for the cascading style sheet. -# But make sure these operations are idempotent. + && $(abs_top_builddir)/$(pspp) ../doc/pspp-figures/$( $@.tmp + $(AM_V_at)mv $@.tmp $@ + +# In some cases, the tutorial only wants some parts of the output. +pspp_output = utilities/pspp-output +convert = $(AM_V_GEN)$(pspp_output) convert $< $@ +doc/pspp-figures/tutorial2a.spv: doc/pspp-figures/tutorial2.spv $(pspp_output) + $(convert) --command='Descriptives' +doc/pspp-figures/tutorial2b.spv: doc/pspp-figures/tutorial2.spv $(pspp_output) + $(convert) --label='Extreme Values' +doc/pspp-figures/tutorial5a.spv: doc/pspp-figures/tutorial5.spv $(pspp_output) + $(convert) --commands=examine --nth-command=1 --labels=descriptives +doc/pspp-figures/tutorial5b.spv: doc/pspp-figures/tutorial5.spv $(pspp_output) + $(convert) --commands=examine --nth-command=2 --labels=descriptives +doc/pspp-figures/tutorial7a.spv: doc/pspp-figures/tutorial7.spv $(pspp_output) + $(convert) --commands=regression --nth-command=1 --subtypes=coefficients +doc/pspp-figures/tutorial7b.spv: doc/pspp-figures/tutorial7.spv $(pspp_output) + $(convert) --commands=regression --nth-command=2 --subtypes=coefficients + +# Convert an output file into a text file or HTML file. +$(FIGURE_TXTS) $(FIGURE_HTMLS): $(pspp_output) +.spv.txt: + $(AM_V_GEN)utilities/pspp-output convert $< $@ +.spv.pdf: + $(AM_V_GEN)utilities/pspp-output convert $< $@ -O left-margin=0pt -O right-margin=0pt -O top-margin=0pt -O bottom-margin=0pt -O paper-size=6x20in -O font-size=12000 --table-look=$(HOME)/pspp/spss15/Looks/report.tlo +.spv.html: + $(AM_V_GEN)utilities/pspp-output convert $< $@ -O format=html -O bare=true + +# Convert a text file into a Texinfo file. +.txt.texi: + $(AM_V_GEN)$(SED) -e 's/@/@@/g' $< > $@ + +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --css-ref=pspp-manual.css html-local: - for h in doc/pspp.html/*.html; do \ - if grep -Fq '/i \\\ -' $$h; \ - done install-html-local: html-local $(MKDIR_P) $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html