Make INSTALL makefile rule more robust
authorPeter Eisentraut <[email protected]>
Sun, 13 Jan 2019 09:50:36 +0000 (10:50 +0100)
committerPeter Eisentraut <[email protected]>
Sun, 13 Jan 2019 09:50:36 +0000 (10:50 +0100)
With the previous rule, if pandoc was missing, a zero-length output
file would be created without an error from make.  To improve that,
write the rule as two separate commands without a pipe.

Reported-by: Tom Lane <[email protected]>
doc/src/sgml/Makefile

index 93b0b60cdb64b4c116c584c9a0b5c1a3742bde44..8326c7c67364ca5b4a530d5a73732bc659f77443 100644 (file)
@@ -103,7 +103,9 @@ ICONV = iconv
 PANDOC = pandoc
 
 INSTALL: % : %.html
-   $(PANDOC) $< -t plain | $(ICONV) -f utf8 -t us-ascii//TRANSLIT > $@
+   $(PANDOC) -t plain -o [email protected] $<
+   $(ICONV) -f utf8 -t us-ascii//TRANSLIT [email protected] > $@
 
 INSTALL.html: %.html : stylesheet-text.xsl %.xml
    $(XMLLINT) --noout --valid $*.xml