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