windows: EXEEXT was at wrong place
[pspp] / doc / automake.mk
index c94608e98a3cd63917caf3dc285037626679aeb1..9f801bc8accbf3c17b41b6fef7101706f4c29a4e 100644 (file)
@@ -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
 
@@ -146,12 +147,14 @@ EXAMPLE_SPVS = $(EXAMPLE_SYNTAX:.sps=.spv) \
 EXAMPLE_TXTS = $(EXAMPLE_SPVS:.spv=.txt)
 EXAMPLE_TEXIS = $(EXAMPLE_TXTS:.txt=.texi)
 EXAMPLE_HTML = $(EXAMPLE_SPVS:.spv=.html)
+EXAMPLE_PDF = $(EXAMPLE_SPVS:.spv=.pdf)
 
 example-spv: $(EXAMPLE_SPVS)
 example-txts: $(EXAMPLE_TXTS)
 example-texis: $(EXAMPLE_TEXIS)
 example-html: $(EXAMPLE_HTML)
-PHONY += example-spv example-txts example-texis example-html
+example-pdf: $(EXAMPLE_PDF)
+PHONY += example-spv example-txts example-texis example-html example-pdf
 
 $(top_builddir)/doc/pspp.info:  $(EXAMPLE_TEXIS)
 $(top_builddir)/doc/pspp.ps:    $(EXAMPLE_TEXIS)
@@ -161,11 +164,11 @@ $(top_builddir)/doc/pspp.pdf:   $(EXAMPLE_TEXIS)
 $(top_builddir)/doc/pspp.xml:   $(EXAMPLE_TEXIS)
 
 CLEANFILES += $(EXAMPLE_TXTS) $(EXAMPLE_SPVS) $(EXAMPLE_TEXIS) $(EXAMPLE_HTML)
-SUFFIXES += .sps .spv .txt .html .texi
+SUFFIXES += .sps .spv .txt .html .texi .pdf
 
 # Use pspp to process a syntax file into an output file.
 pspp = src/ui/terminal/pspp
-$(EXAMPLE_SPVS): $(pspp)
+$(EXAMPLE_SPVS): $(pspp)$(EXEEXT)
 .sps.spv:
        $(AM_V_GEN)(cd $(top_srcdir)/examples \
          && $(abs_top_builddir)/$(pspp) ../doc/examples/$(<F) -o - -O format=spv) > $@.tmp
@@ -188,28 +191,20 @@ doc/examples/tutorial7b.spv: doc/examples/tutorial7.spv $(pspp_output)
        $(convert) --commands=regression --nth-command=2 --subtypes=coefficients
 
 # Convert an output file into a text file or HTML file.
-#
-# (For HTML, use sed to include only the contents of <body>.)
 $(EXAMPLE_TXTS) $(EXAMPLE_HTML): $(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 > $@.tmp
-       $(AM_V_at)mv $@.tmp $@
+       $(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 's/@/@@/g' < $< > $@.tmp
-       $(AM_V_at)mv $@.tmp $@
+       $(AM_V_GEN)$(SED) -e 's/@/@@/g' $< > $@
 
-# Insert the link tag for the cascading style sheet.
-# But make sure these operations are idempotent.
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --css-ref=pspp-manual.css
 html-local:
-       for h in doc/pspp.html/*.html; do \
-               if grep -Fq '<link rel="stylesheet"' $$h; then continue; fi ; \
-               $(SED) -i -e '/^<\/head>/i \\\
-<link rel="stylesheet" href="pspp-manual.css">' $$h; \
-       done
 
 install-html-local: html-local
        $(MKDIR_P) $(DESTDIR)$(prefix)/share/doc/pspp/pspp.html