File tree 1 file changed +5
-3
lines changed
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -156,9 +156,11 @@ XSLTPROC_FO_FLAGS += --stringparam img.src.path '$(srcdir)/'
156
156
$(XSLTPROC ) $(XMLINCLUDE ) $(XSLTPROCFLAGS ) $(XSLTPROC_FO_FLAGS ) --stringparam paper.type USletter -o $@ $^
157
157
158
158
% .pdf : % .fo $(ALL_IMAGES )
159
- LANG=C $(FOP ) -fo $< -pdf $@ 2>&1 | \
160
- awk ' BEGIN { warn = 0 } { print } /not available in font/ { warn = 1 } \
161
- END { if (warn ! = 0) print(" \nFound characters that cannot be output in the PDF document; see README.non-ASCII" ) }' 1>&2
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 } \
162
+ 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
162
164
163
165
164
166
# #
You can’t perform that action at this time.
0 commit comments