X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Fautomake.mk;h=31141e854436b530f5e6586904a23e0c33c856b4;hb=d1baacabfbff9bfc0178b2dd2ac82c245ba831cf;hp=37a62153cb53c02e65b055ecb104d2b0116a0328;hpb=6014da385d5f3f2a3971f0049d2d54c0dc6e95f8;p=pspp diff --git a/doc/automake.mk b/doc/automake.mk index 37a62153cb..31141e8544 100644 --- a/doc/automake.mk +++ b/doc/automake.mk @@ -81,8 +81,8 @@ doc/pspp.xml: doc/pspp.texi $(doc_pspp_TEXINFOS) doc/help-pages-list if BROKEN_DOCBOOK_XML touch $@ else - $(AM_V_GEN)$(MAKEINFO) $(AM_MAKEINFOFLAGS) --docbook -I $(top_srcdir) \ - $< -o $@ + $(AM_V_GEN)$(MAKEINFO) --docbook $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) \ + -I doc -I $(srcdir)/doc $< -o $@ endif docbookdir = $(docdir) @@ -106,13 +106,12 @@ EXTRA_DIST += \ doc/help-pages-list \ doc/pspp-manual.css - -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 +am__TEXINFO_TEX_DIR=:$(top_srcdir)/doc:$(top_builddir)/doc ################# Example programs ############################## FIGURE_SYNTAX = \ + doc/pspp-figures/aggregate.sps \ doc/pspp-figures/autorecode.sps \ doc/pspp-figures/chisquare.sps \ doc/pspp-figures/compute.sps \ @@ -124,7 +123,10 @@ FIGURE_SYNTAX = \ doc/pspp-figures/one-sample-t.sps \ doc/pspp-figures/independent-samples-t.sps \ doc/pspp-figures/reliability.sps \ + doc/pspp-figures/select-if.sps \ + doc/pspp-figures/sort-cases.sps \ doc/pspp-figures/split.sps \ + doc/pspp-figures/temporary.sps \ doc/pspp-figures/tutorial1.sps \ doc/pspp-figures/tutorial2.sps \ doc/pspp-figures/tutorial3.sps \ @@ -146,36 +148,55 @@ FIGURE_SPVS = $(FIGURE_SYNTAX:.sps=.spv) \ doc/pspp-figures/tutorial7b.spv FIGURE_TXTS = $(FIGURE_SPVS:.spv=.txt) FIGURE_TEXIS = $(FIGURE_TXTS:.txt=.texi) -FIGURE_HTML = $(FIGURE_SPVS:.spv=.html) -FIGURE_PDF = $(FIGURE_SPVS:.spv=.pdf) +FIGURE_HTMLS = $(FIGURE_SPVS:.spv=.html) +FIGURE_PDFS = $(FIGURE_SPVS:.spv=.pdf) -figure-spv: $(FIGURE_SPVS) +figure-spvs: $(FIGURE_SPVS) figure-txts: $(FIGURE_TXTS) figure-texis: $(FIGURE_TEXIS) -figure-html: $(FIGURE_HTML) -figure-pdf: $(FIGURE_PDF) -PHONY += figure-spv figure-txts figure-texis figure-html figure-pdf +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_HTML) +$(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_HTML) +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) +if cross_compiling +pspp = native/src/ui/terminal/pspp +pspp_output = native/utilities/pspp-output + +native/Makefile: + $(MKDIR_P) native + (cd native && $(top_srcdir)/configure --without-gui) + +native/gl/libgl.la: native/Makefile + (cd native && flock --verbose $(top_builddir)/native-lock $(MAKE) gl/libgl.la) + +$(pspp): native/gl/libgl.la + (cd native && flock --verbose $(top_builddir)/native-lock $(MAKE) src/ui/terminal/pspp) + +$(pspp_output): native/gl/libgl.la + (cd native && flock --verbose $(top_builddir)/native-lock $(MAKE) utilities/pspp-output) +else +pspp = src/ui/terminal/pspp$(EXEEXT) +pspp_output = utilities/pspp-output$(EXEEXT) +endif + +$(FIGURE_SPVS): $(pspp) .sps.spv: $(AM_V_GEN)(cd $(top_srcdir)/examples \ && $(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' @@ -191,26 +212,36 @@ 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_HTML): $(pspp_output) +$(FIGURE_TXTS) $(FIGURE_HTMLS): $(pspp_output) .spv.txt: - $(AM_V_GEN)utilities/pspp-output convert $< $@ + $(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 + $(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) -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: - -install-html-local: html-local +# Adjust the path for screenshot images. +# But make sure these operations are idempotent. +html-local: doc/pspp.html + test -d doc/pspp.html + for h in doc/pspp.html/*.html; do \ + if grep -Fq ' $@ + + +# Install all the PNG files so that info readers can recognise them +install-info-local: + $(MKDIR_P) $(DESTDIR)$(prefix)/share/info/screenshots + for p in $(INFO_SCREENSHOTS); do \ + $(INSTALL_DATA) $$p $(DESTDIR)$(prefix)/share/info/screenshots ;\ + done + +uninstall-local: + for p in $(INFO_SCREENSHOTS); do \ + f=`basename $$p ` ; \ + $(RM) $(DESTDIR)$(prefix)/share/info/$$f ; \ + done + +EXTRA_DIST+= $(SCREENSHOTS) doc/doc-make.in doc/screengrab + +EXTRA_DIST+= $(EPS_SCREENSHOTS) $(PDF_SCREENSHOTS) $(INFO_SCREENSHOTS)