@matheusbsbs / matheus-bagliano / commits / c6a5ad21e5
Fork 0

Documentation/Makefile: break up texi pipeline

Most shells define the exit value of a pipeline as the exit value of the last process. For each texi rule, run the DOCBOOK2X_TEXI tool and the "fixup" script in their own non-pipeline commands so that make will notice an error exit code. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Chris Johnsen committed Mar 27, 2009 at 01:49 UTC c6a5ad21e57ce38a0add04a2708ccf02ed17af39
1 file changed +7 -4
Documentation/Makefile
+7 -4
@@ -178,7 +178,7 @@ cmd-list.made: cmd-list.perl ../command-list.txt $(MAN1_TXT)
178
179 clean:
180 $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
181 - $(RM) *.texi *.texi+ git.info gitman.info
181 + $(RM) *.texi *.texi+ *.texi++ git.info gitman.info
182 $(RM) howto-index.txt howto/*.html doc.dep
183 $(RM) technical/api-*.html technical/api-index.txt
184 $(RM) $(cmds_txt) *.made
@@ -221,8 +221,9 @@ git.info: user-manual.texi
221
222 user-manual.texi: user-manual.xml
223 $(QUIET_DB2TEXI)$(RM) $@+ $@ && \
224 - $(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout | \
225 - $(PERL_PATH) fix-texi.perl >$@+ && \
224 + $(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@++ && \
225 + $(PERL_PATH) fix-texi.perl <$@++ >$@+ && \
226 + rm $@++ && \
227 mv $@+ $@
228
229 user-manual.pdf: user-manual.xml
@@ -233,7 +234,9 @@ user-manual.pdf: user-manual.xml
234 gitman.texi: $(MAN_XML) cat-texi.perl
235 $(QUIET_DB2TEXI)$(RM) $@+ $@ && \
236 ($(foreach xml,$(MAN_XML),$(DOCBOOK2X_TEXI) --encoding=UTF-8 \
236 - --to-stdout $(xml) &&) true) | $(PERL_PATH) cat-texi.perl $@ >$@+ && \
237 + --to-stdout $(xml) &&) true) > $@++ && \
238 + $(PERL_PATH) cat-texi.perl $@ <$@++ >$@+ && \
239 + rm $@++ && \
240 mv $@+ $@
241
242 gitman.info: gitman.texi