@@ -298,9 +298,9 @@ docdep_prereqs = \
298
298
cmd-list.made $(cmds_txt )
299
299
300
300
doc.dep : $(docdep_prereqs ) $(wildcard * .txt) $(wildcard config/* .txt) build-docdep.perl
301
- $(QUIET_GEN )$(RM ) $@ + $@ && \
302
- $(PERL_PATH ) ./build-docdep.perl > $@ + $(QUIET_STDERR ) && \
303
- mv $@ + $@
301
+ $(QUIET_GEN )$(RM ) $@ .new $@ && \
302
+ $(PERL_PATH ) ./build-docdep.perl > $@ .new $(QUIET_STDERR ) && \
303
+ mv $@ .new $@
304
304
305
305
-include doc.dep
306
306
@@ -345,8 +345,8 @@ GIT-ASCIIDOCFLAGS: FORCE
345
345
fi
346
346
347
347
clean :
348
- $(RM ) * .xml * .xml+ * .html * .html+ * .1 * .5 * .7
349
- $(RM ) * .texi * .texi+ * .texi++ git.info gitman.info
348
+ $(RM ) * .xml * .xml.new * .html * .html.new * .1 * .5 * .7
349
+ $(RM ) * .texi * .texi.new * .texi.new.new git.info gitman.info
350
350
$(RM ) * .pdf
351
351
$(RM ) howto-index.txt howto/* .html doc.dep
352
352
$(RM ) technical/* .html technical/api-index.txt
@@ -356,14 +356,14 @@ clean:
356
356
$(RM ) GIT-ASCIIDOCFLAGS
357
357
358
358
$(MAN_HTML ) : % .html : % .txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
359
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
360
- $(TXT_TO_HTML ) -d manpage -o $@ + $< && \
361
- mv $@ + $@
359
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
360
+ $(TXT_TO_HTML ) -d manpage -o $@ .new $< && \
361
+ mv $@ .new $@
362
362
363
363
$(OBSOLETE_HTML ) : % .html : % .txto asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
364
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
365
- $(TXT_TO_HTML ) -o $@ + $< && \
366
- mv $@ + $@
364
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
365
+ $(TXT_TO_HTML ) -o $@ .new $< && \
366
+ mv $@ .new $@
367
367
368
368
manpage-base-url.xsl : manpage-base-url.xsl.in
369
369
$(QUIET_GEN ) sed " s|@@MAN_BASE_URL@@|$( MAN_BASE_URL) |" $< > $@
@@ -373,14 +373,14 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
373
373
$(XMLTO ) -m $(MANPAGE_XSL ) $(XMLTO_EXTRA ) man $<
374
374
375
375
% .xml : % .txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
376
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
377
- $(TXT_TO_XML ) -d manpage -o $@ + $< && \
378
- mv $@ + $@
376
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
377
+ $(TXT_TO_XML ) -d manpage -o $@ .new $< && \
378
+ mv $@ .new $@
379
379
380
380
user-manual.xml : user-manual.txt user-manual.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
381
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
382
- $(TXT_TO_XML ) -d book -o $@ + $< && \
383
- mv $@ + $@
381
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
382
+ $(TXT_TO_XML ) -d book -o $@ .new $< && \
383
+ mv $@ .new $@
384
384
385
385
technical/api-index.txt : technical/api-index-skel.txt \
386
386
technical/api-index.sh $(patsubst % ,% .txt,$(API_DOCS ) )
@@ -398,46 +398,46 @@ XSLT = docbook.xsl
398
398
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
399
399
400
400
user-manual.html : user-manual.xml $(XSLT )
401
- $(QUIET_XSLTPROC )$(RM ) $@ + $@ && \
402
- xsltproc $(XSLTOPTS ) -o $@ + $(XSLT ) $< && \
403
- mv $@ + $@
401
+ $(QUIET_XSLTPROC )$(RM ) $@ .new $@ && \
402
+ xsltproc $(XSLTOPTS ) -o $@ .new $(XSLT ) $< && \
403
+ mv $@ .new $@
404
404
405
405
git.info : user-manual.texi
406
406
$(QUIET_MAKEINFO )$(MAKEINFO ) --no-split -o $@ user-manual.texi
407
407
408
408
user-manual.texi : user-manual.xml
409
- $(QUIET_DB2TEXI )$(RM ) $@ + $@ && \
410
- $(DOCBOOK2X_TEXI ) user-manual.xml --encoding=UTF-8 --to-stdout > $@ ++ && \
411
- $(PERL_PATH ) fix-texi.perl < $@ ++ > $@ + && \
412
- rm $@ ++ && \
413
- mv $@ + $@
409
+ $(QUIET_DB2TEXI )$(RM ) $@ .new $@ && \
410
+ $(DOCBOOK2X_TEXI ) user-manual.xml --encoding=UTF-8 --to-stdout > $@ .new.new && \
411
+ $(PERL_PATH ) fix-texi.perl < $@ .new.new > $@ .new && \
412
+ rm $@ .new.new && \
413
+ mv $@ .new $@
414
414
415
415
user-manual.pdf : user-manual.xml
416
- $(QUIET_DBLATEX )$(RM ) $@ + $@ && \
417
- $(DBLATEX ) -o $@ + $(DBLATEX_COMMON ) $< && \
418
- mv $@ + $@
416
+ $(QUIET_DBLATEX )$(RM ) $@ .new $@ && \
417
+ $(DBLATEX ) -o $@ .new $(DBLATEX_COMMON ) $< && \
418
+ mv $@ .new $@
419
419
420
420
gitman.texi : $(MAN_XML ) cat-texi.perl texi.xsl
421
- $(QUIET_DB2TEXI )$(RM ) $@ + $@ && \
422
- ($( foreach xml,$( sort $( MAN_XML) ) ,xsltproc -o $( xml) + texi.xsl $( xml) && \
423
- $(DOCBOOK2X_TEXI ) --encoding=UTF-8 --to-stdout $(xml ) + && \
424
- rm $(xml ) + && ) true) > $@ ++ && \
425
- $(PERL_PATH ) cat-texi.perl $@ < $@ ++ > $@ + && \
426
- rm $@ ++ && \
427
- mv $@ + $@
421
+ $(QUIET_DB2TEXI )$(RM ) $@ .new $@ && \
422
+ ($( foreach xml,$( sort $( MAN_XML) ) ,xsltproc -o $( xml) .new texi.xsl $( xml) && \
423
+ $(DOCBOOK2X_TEXI ) --encoding=UTF-8 --to-stdout $(xml ) .new && \
424
+ rm $(xml ) .new && ) true) > $@ .new.new && \
425
+ $(PERL_PATH ) cat-texi.perl $@ < $@ .new.new > $@ .new && \
426
+ rm $@ .new.new && \
427
+ mv $@ .new $@
428
428
429
429
gitman.info : gitman.texi
430
430
$(QUIET_MAKEINFO )$(MAKEINFO ) --no-split --no-validate $* .texi
431
431
432
432
$(patsubst % .txt,% .texi,$(MAN_TXT ) ) : % .texi : % .xml
433
- $(QUIET_DB2TEXI )$(RM ) $@ + $@ && \
434
- $(DOCBOOK2X_TEXI ) --to-stdout $* .xml > $@ + && \
435
- mv $@ + $@
433
+ $(QUIET_DB2TEXI )$(RM ) $@ .new $@ && \
434
+ $(DOCBOOK2X_TEXI ) --to-stdout $* .xml > $@ .new && \
435
+ mv $@ .new $@
436
436
437
437
howto-index.txt : howto-index.sh $(wildcard howto/* .txt)
438
- $(QUIET_GEN )$(RM ) $@ + $@ && \
439
- ' $(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/* .txt) ) > $@ + && \
440
- mv $@ + $@
438
+ $(QUIET_GEN )$(RM ) $@ .new $@ && \
439
+ ' $(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/* .txt) ) > $@ .new && \
440
+ mv $@ .new $@
441
441
442
442
$(patsubst % ,% .html,$(ARTICLES ) ) : % .html : % .txt
443
443
$(QUIET_ASCIIDOC )$(TXT_TO_HTML ) $* .txt
@@ -446,10 +446,10 @@ WEBDOC_DEST = /pub/software/scm/git/docs
446
446
447
447
howto/% .html : ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
448
448
$(patsubst % .txt,% .html,$(wildcard howto/* .txt) ) : % .html : % .txt GIT-ASCIIDOCFLAGS
449
- $(QUIET_ASCIIDOC )$(RM ) $@ + $@ && \
449
+ $(QUIET_ASCIIDOC )$(RM ) $@ .new $@ && \
450
450
sed -e ' 1,/^$$/d' $< | \
451
- $(TXT_TO_HTML ) - > $@ + && \
452
- mv $@ + $@
451
+ $(TXT_TO_HTML ) - > $@ .new && \
452
+ mv $@ .new $@
453
453
454
454
install-webdoc : html
455
455
' $(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST )
0 commit comments