1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-21 16:02:15 +03:00

Make INSTALL makefile rule more robust

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 <tgl@sss.pgh.pa.us>
This commit is contained in:
Peter Eisentraut
2019-01-13 10:50:36 +01:00
parent 7291733ac9
commit bb874e30fb

View File

@ -103,7 +103,9 @@ ICONV = iconv
PANDOC = pandoc PANDOC = pandoc
INSTALL: % : %.html INSTALL: % : %.html
$(PANDOC) $< -t plain | $(ICONV) -f utf8 -t us-ascii//TRANSLIT > $@ $(PANDOC) -t plain -o $@.tmp $<
$(ICONV) -f utf8 -t us-ascii//TRANSLIT $@.tmp > $@
rm $@.tmp
INSTALL.html: %.html : stylesheet-text.xsl %.xml INSTALL.html: %.html : stylesheet-text.xsl %.xml
$(XMLLINT) --noout --valid $*.xml $(XMLLINT) --noout --valid $*.xml