File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -155,12 +155,13 @@ XSLTPROC_FO_FLAGS += --stringparam img.src.path '$(srcdir)/'
155
155
% -US.fo : stylesheet-fo.xsl % -full.xml
156
156
$(XSLTPROC ) $(XMLINCLUDE ) $(XSLTPROCFLAGS ) $(XSLTPROC_FO_FLAGS ) --stringparam paper.type USletter -o $@ $^
157
157
158
+ # There is no easy way to pipe output and capture its return code,
159
+ # so add a final line to report the return code.
158
160
% .pdf : % .fo $(ALL_IMAGES )
159
- @# There is no easy way to pipe output and capture its return code, so output a special string on failure.
160
- { LANG=C $( FOP) -fo $< -pdf $@ 2>&1 ; [ " $$ ?" -ne 0 ] && echo " FOP_ERROR" ; } | \
161
- $(AWK ) ' BEGIN { warn = 0 } ! /^FOP_ERROR$$/ { print } /not available in font/ { warn = 1 } \
161
+ { LANG=C $( FOP) -fo $< -pdf $@ 2>&1 ; echo " FOP_RETURN $$ ?" ; } | \
162
+ $(AWK ) ' BEGIN { warn = 0 } $$1 != "FOP_RETURN" { print } /not available in font/ { warn = 1 } \
162
163
END { if (warn ! = 0) print(" \nFound characters that cannot be output in the PDF document; see README.non-ASCII" ); \
163
- if ($$ 0 ~ /^FOP_ERROR $$ / ) { exit 1 } }' 1>&2
164
+ if ($$ 2 ! = 0 ) { exit $$ 2 } }' 1>&2
164
165
165
166
166
167
# #
You can’t perform that action at this time.
0 commit comments