@@ -266,9 +266,9 @@ docdep_prereqs = \
266
266
cmd-list.made $(cmds_txt )
267
267
268
268
doc.dep : $(docdep_prereqs ) $(wildcard * .txt) build-docdep.perl
269
- $(QUIET_GEN )$(RM ) $@ + $@ && \
270
- $(PERL_PATH ) ./build-docdep.perl > $@ + $(QUIET_STDERR ) && \
271
- mv $@ + $@
269
+ $(QUIET_GEN )$(RM ) $@ .new $@ && \
270
+ $(PERL_PATH ) ./build-docdep.perl > $@ .new $(QUIET_STDERR ) && \
271
+ mv $@ .new $@
272
272
273
273
-include doc.dep
274
274
@@ -304,23 +304,23 @@ mergetools-list.made: ../git-mergetool--lib.sh $(wildcard ../mergetools/*)
304
304
date > $@
305
305
306
306
clean :
307
- $(RM ) * .xml * .xml+ * .html * .html+ * .1 * .5 * .7
308
- $(RM ) * .texi * .texi+ * .texi++ git.info gitman.info
307
+ $(RM ) * .xml * .xml.new * .html * .html.new * .1 * .5 * .7
308
+ $(RM ) * .texi * .texi.new * .texi.new.new git.info gitman.info
309
309
$(RM ) * .pdf
310
310
$(RM ) howto-index.txt howto/* .html doc.dep
311
311
$(RM ) technical/* .html technical/api-index.txt
312
312
$(RM ) $(cmds_txt ) $(mergetools_txt ) * .made
313
313
$(RM ) manpage-base-url.xsl
314
314
315
315
$(MAN_HTML ) : % .html : % .txt asciidoc.conf
316
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
317
- $(TXT_TO_HTML ) -d manpage -o $@ + $< && \
318
- mv $@ + $@
316
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
317
+ $(TXT_TO_HTML ) -d manpage -o $@ .new $< && \
318
+ mv $@ .new $@
319
319
320
320
$(OBSOLETE_HTML ) : % .html : % .txto asciidoc.conf
321
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
322
- $(TXT_TO_HTML ) -o $@ + $< && \
323
- mv $@ + $@
321
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
322
+ $(TXT_TO_HTML ) -o $@ .new $< && \
323
+ mv $@ .new $@
324
324
325
325
manpage-base-url.xsl : manpage-base-url.xsl.in
326
326
sed " s|@@MAN_BASE_URL@@|$( MAN_BASE_URL) |" $< > $@
@@ -330,14 +330,14 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
330
330
$(XMLTO ) -m $(MANPAGE_XSL ) $(XMLTO_EXTRA ) man $<
331
331
332
332
% .xml : % .txt asciidoc.conf
333
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
334
- $(TXT_TO_XML ) -d manpage -o $@ + $< && \
335
- mv $@ + $@
333
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
334
+ $(TXT_TO_XML ) -d manpage -o $@ .new $< && \
335
+ mv $@ .new $@
336
336
337
337
user-manual.xml : user-manual.txt user-manual.conf
338
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
339
- $(TXT_TO_XML ) -d book -o $@ + $< && \
340
- mv $@ + $@
338
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
339
+ $(TXT_TO_XML ) -d book -o $@ .new $< && \
340
+ mv $@ .new $@
341
341
342
342
technical/api-index.txt : technical/api-index-skel.txt \
343
343
technical/api-index.sh $(patsubst % ,% .txt,$(API_DOCS ) )
@@ -351,45 +351,45 @@ XSLT = docbook.xsl
351
351
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
352
352
353
353
user-manual.html : user-manual.xml $(XSLT )
354
- $(QUIET_XSLTPROC )$(RM ) $@ + $@ && \
355
- xsltproc $(XSLTOPTS ) -o $@ + $(XSLT ) $< && \
356
- mv $@ + $@
354
+ $(QUIET_XSLTPROC )$(RM ) $@ .new $@ && \
355
+ xsltproc $(XSLTOPTS ) -o $@ .new $(XSLT ) $< && \
356
+ mv $@ .new $@
357
357
358
358
git.info : user-manual.texi
359
359
$(QUIET_MAKEINFO )$(MAKEINFO ) --no-split -o $@ user-manual.texi
360
360
361
361
user-manual.texi : user-manual.xml
362
- $(QUIET_DB2TEXI )$(RM ) $@ + $@ && \
363
- $(DOCBOOK2X_TEXI ) user-manual.xml --encoding=UTF-8 --to-stdout > $@ ++ && \
364
- $(PERL_PATH ) fix-texi.perl < $@ ++ > $@ + && \
365
- rm $@ ++ && \
366
- mv $@ + $@
362
+ $(QUIET_DB2TEXI )$(RM ) $@ .new $@ && \
363
+ $(DOCBOOK2X_TEXI ) user-manual.xml --encoding=UTF-8 --to-stdout > $@ .new.new && \
364
+ $(PERL_PATH ) fix-texi.perl < $@ .new.new > $@ .new && \
365
+ rm $@ .new.new && \
366
+ mv $@ .new $@
367
367
368
368
user-manual.pdf : user-manual.xml
369
- $(QUIET_DBLATEX )$(RM ) $@ + $@ && \
370
- $(DBLATEX ) -o $@ + -p $(ASCIIDOC_DBLATEX_DIR ) /asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR ) /asciidoc-dblatex.sty $< && \
371
- mv $@ + $@
369
+ $(QUIET_DBLATEX )$(RM ) $@ .new $@ && \
370
+ $(DBLATEX ) -o $@ .new -p $(ASCIIDOC_DBLATEX_DIR ) /asciidoc-dblatex.xsl -s $(ASCIIDOC_DBLATEX_DIR ) /asciidoc-dblatex.sty $< && \
371
+ mv $@ .new $@
372
372
373
373
gitman.texi : $(MAN_XML ) cat-texi.perl
374
- $(QUIET_DB2TEXI )$(RM ) $@ + $@ && \
374
+ $(QUIET_DB2TEXI )$(RM ) $@ .new $@ && \
375
375
($( foreach xml,$( MAN_XML) ,$( DOCBOOK2X_TEXI) --encoding=UTF-8 \
376
- --to-stdout $(xml ) && ) true) > $@ ++ && \
377
- $(PERL_PATH ) cat-texi.perl $@ < $@ ++ > $@ + && \
378
- rm $@ ++ && \
379
- mv $@ + $@
376
+ --to-stdout $(xml ) && ) true) > $@ .new.new && \
377
+ $(PERL_PATH ) cat-texi.perl $@ < $@ .new.new > $@ .new && \
378
+ rm $@ .new.new && \
379
+ mv $@ .new $@
380
380
381
381
gitman.info : gitman.texi
382
382
$(QUIET_MAKEINFO )$(MAKEINFO ) --no-split --no-validate $* .texi
383
383
384
384
$(patsubst % .txt,% .texi,$(MAN_TXT ) ) : % .texi : % .xml
385
- $(QUIET_DB2TEXI )$(RM ) $@ + $@ && \
386
- $(DOCBOOK2X_TEXI ) --to-stdout $* .xml > $@ + && \
387
- mv $@ + $@
385
+ $(QUIET_DB2TEXI )$(RM ) $@ .new $@ && \
386
+ $(DOCBOOK2X_TEXI ) --to-stdout $* .xml > $@ .new && \
387
+ mv $@ .new $@
388
388
389
389
howto-index.txt : howto-index.sh $(wildcard howto/* .txt)
390
- $(QUIET_GEN )$(RM ) $@ + $@ && \
391
- ' $(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/* .txt) ) > $@ + && \
392
- mv $@ + $@
390
+ $(QUIET_GEN )$(RM ) $@ .new $@ && \
391
+ ' $(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/* .txt) ) > $@ .new && \
392
+ mv $@ .new $@
393
393
394
394
$(patsubst % ,% .html,$(ARTICLES ) ) : % .html : % .txt
395
395
$(QUIET_ASCIIDOC )$(TXT_TO_HTML ) $* .txt
@@ -398,10 +398,10 @@ WEBDOC_DEST = /pub/software/scm/git/docs
398
398
399
399
howto/% .html : ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
400
400
$(patsubst % .txt,% .html,$(wildcard howto/* .txt) ) : % .html : % .txt
401
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
401
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
402
402
sed -e ' 1,/^$$/d' $< | \
403
- $(TXT_TO_HTML ) - > $@ + && \
404
- mv $@ + $@
403
+ $(TXT_TO_HTML ) - > $@ .new && \
404
+ mv $@ .new $@
405
405
406
406
install-webdoc : html
407
407
' $(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST )
0 commit comments