doc: Avoid using stdout in Makefile rule to generate .spv files.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 21 Feb 2023 01:48:54 +0000 (17:48 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 21 Feb 2023 04:01:03 +0000 (20:01 -0800)
When pspp writes anything to stdout, also writing the .spv file to stdout
causes confusing corruption.  This avoids the problem.

doc/automake.mk

index aea1a6d6c77b45ecdf51ef33819989666832dcd1..110e379d11059b0c411eeb88544cd5191d8f68c5 100644 (file)
@@ -238,8 +238,8 @@ 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_GEN)of=`pwd`/$@.tmp; (cd "$(top_srcdir)/examples" \
+         && "$(abs_top_builddir)/$(pspp)" ../doc/pspp-figures/$(<F) -o $$of -O format=spv)
        $(AM_V_at)mv $@.tmp $@
 
 # In some cases, the tutorial only wants some parts of the output.