Install the documentation screenshots in the correct place.
[pspp] / doc / automake.mk
index 3d2377c258fcdb4e96a42ff82c488dcdcb71ea5a..31141e854436b530f5e6586904a23e0c33c856b4 100644 (file)
@@ -169,15 +169,34 @@ 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/$(<F) -o - -O format=spv) > $@.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'
@@ -208,7 +227,8 @@ $(FIGURE_TXTS) $(FIGURE_HTMLS): $(pspp_output)
 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) --css-ref=pspp-manual.css
 # Adjust the path for screenshot images.
 # But make sure these operations are idempotent.
-html-local:
+html-local: doc/pspp.html
+       test -d doc/pspp.html
        for h in doc/pspp.html/*.html; do \
                if grep -Fq '<img src="screenshots/' $$h; then continue; fi ; \
                $(SED) -i -e 's|<img src="\([^"]*\)"|<img src="screenshots/\1"|' $$h; \
@@ -280,9 +300,9 @@ doc-make: doc/doc-make.in Makefile
 
 # Install all the PNG files so that info readers can recognise them
 install-info-local:
-       $(MKDIR_P) $(DESTDIR)$(prefix)/share/info/
+       $(MKDIR_P) $(DESTDIR)$(prefix)/share/info/screenshots
        for p in $(INFO_SCREENSHOTS); do \
-               $(INSTALL_DATA) $$p $(DESTDIR)$(prefix)/share/info/ ;\
+               $(INSTALL_DATA) $$p $(DESTDIR)$(prefix)/share/info/screenshots ;\
        done
 
 uninstall-local: