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