From: "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: [PATCH 1/1] Avoid illegal filenames when building Documentation on NTFS
Date: Thu, 04 Jul 2019 02:14:40 -0700 (PDT) [thread overview]
Message-ID: <1f0f4fe6fbf0e7a7eea1f3d49db183c70693a895.1562231679.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.216.git.gitgitgadget@gmail.com>
From: Johannes Schindelin <johannes.schindelin@gmx.de>
A `+` is not a valid part of a filename with Windows file systems (it is
reserved because the `+` operator meant file concatenation back in the
DOS days).
When building in Git for Windows' SDK, the `make.exe` that interprets
our `Makefile` is an MSYS2 program, which uses the MSYS2/Cygwin trick of
mapping such illegal characters into the private Unicode page, so as
long as you use programs that are aware of this trick (all MSYS2/Cygwin
programs are, however e.g. `git.exe` is not) things are all dandy.
Let's just not use the `+` character.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
Documentation/Makefile | 88 +++++++++++++++++++++---------------------
1 file changed, 44 insertions(+), 44 deletions(-)
diff --git a/Documentation/Makefile b/Documentation/Makefile
index dbf5a0f276..792ddf872e 100644
--- a/Documentation/Makefile
+++ b/Documentation/Makefile
@@ -297,9 +297,9 @@ docdep_prereqs = \
cmd-list.made $(cmds_txt)
doc.dep : $(docdep_prereqs) $(wildcard *.txt) $(wildcard config/*.txt) build-docdep.perl
- $(QUIET_GEN)$(RM) $@+ $@ && \
- $(PERL_PATH) ./build-docdep.perl >$@+ $(QUIET_STDERR) && \
- mv $@+ $@
+ $(QUIET_GEN)$(RM) $@.new $@ && \
+ $(PERL_PATH) ./build-docdep.perl >$@.new $(QUIET_STDERR) && \
+ mv $@.new $@
-include doc.dep
@@ -344,8 +344,8 @@ GIT-ASCIIDOCFLAGS: FORCE
fi
clean:
- $(RM) *.xml *.xml+ *.html *.html+ *.1 *.5 *.7
- $(RM) *.texi *.texi+ *.texi++ git.info gitman.info
+ $(RM) *.xml *.xml.new *.html *.html.new *.1 *.5 *.7
+ $(RM) *.texi *.texi.new *.texi.new.new git.info gitman.info
$(RM) *.pdf
$(RM) howto-index.txt howto/*.html doc.dep
$(RM) technical/*.html technical/api-index.txt
@@ -355,14 +355,14 @@ clean:
$(RM) GIT-ASCIIDOCFLAGS
$(MAN_HTML): %.html : %.txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
- $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
- $(TXT_TO_HTML) -d manpage -o $@+ $< && \
- mv $@+ $@
+ $(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
+ $(TXT_TO_HTML) -d manpage -o $@.new $< && \
+ mv $@.new $@
$(OBSOLETE_HTML): %.html : %.txto asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
- $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
- $(TXT_TO_HTML) -o $@+ $< && \
- mv $@+ $@
+ $(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
+ $(TXT_TO_HTML) -o $@.new $< && \
+ mv $@.new $@
manpage-base-url.xsl: manpage-base-url.xsl.in
$(QUIET_GEN)sed "s|@@MAN_BASE_URL@@|$(MAN_BASE_URL)|" $< > $@
@@ -372,14 +372,14 @@ manpage-base-url.xsl: manpage-base-url.xsl.in
$(XMLTO) -m $(MANPAGE_XSL) $(XMLTO_EXTRA) man $<
%.xml : %.txt asciidoc.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
- $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
- $(TXT_TO_XML) -d manpage -o $@+ $< && \
- mv $@+ $@
+ $(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
+ $(TXT_TO_XML) -d manpage -o $@.new $< && \
+ mv $@.new $@
user-manual.xml: user-manual.txt user-manual.conf asciidoctor-extensions.rb GIT-ASCIIDOCFLAGS
- $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
- $(TXT_TO_XML) -d book -o $@+ $< && \
- mv $@+ $@
+ $(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
+ $(TXT_TO_XML) -d book -o $@.new $< && \
+ mv $@.new $@
technical/api-index.txt: technical/api-index-skel.txt \
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
@@ -397,46 +397,46 @@ XSLT = docbook.xsl
XSLTOPTS = --xinclude --stringparam html.stylesheet docbook-xsl.css
user-manual.html: user-manual.xml $(XSLT)
- $(QUIET_XSLTPROC)$(RM) $@+ $@ && \
- xsltproc $(XSLTOPTS) -o $@+ $(XSLT) $< && \
- mv $@+ $@
+ $(QUIET_XSLTPROC)$(RM) $@.new $@ && \
+ xsltproc $(XSLTOPTS) -o $@.new $(XSLT) $< && \
+ mv $@.new $@
git.info: user-manual.texi
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split -o $@ user-manual.texi
user-manual.texi: user-manual.xml
- $(QUIET_DB2TEXI)$(RM) $@+ $@ && \
- $(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@++ && \
- $(PERL_PATH) fix-texi.perl <$@++ >$@+ && \
- rm $@++ && \
- mv $@+ $@
+ $(QUIET_DB2TEXI)$(RM) $@.new $@ && \
+ $(DOCBOOK2X_TEXI) user-manual.xml --encoding=UTF-8 --to-stdout >$@.new.new && \
+ $(PERL_PATH) fix-texi.perl <$@.new.new >$@.new && \
+ rm $@.new.new && \
+ mv $@.new $@
user-manual.pdf: user-manual.xml
- $(QUIET_DBLATEX)$(RM) $@+ $@ && \
- $(DBLATEX) -o $@+ $(DBLATEX_COMMON) $< && \
- mv $@+ $@
+ $(QUIET_DBLATEX)$(RM) $@.new $@ && \
+ $(DBLATEX) -o $@.new $(DBLATEX_COMMON) $< && \
+ mv $@.new $@
gitman.texi: $(MAN_XML) cat-texi.perl texi.xsl
- $(QUIET_DB2TEXI)$(RM) $@+ $@ && \
- ($(foreach xml,$(sort $(MAN_XML)),xsltproc -o $(xml)+ texi.xsl $(xml) && \
- $(DOCBOOK2X_TEXI) --encoding=UTF-8 --to-stdout $(xml)+ && \
- rm $(xml)+ &&) true) > $@++ && \
- $(PERL_PATH) cat-texi.perl $@ <$@++ >$@+ && \
- rm $@++ && \
- mv $@+ $@
+ $(QUIET_DB2TEXI)$(RM) $@.new $@ && \
+ ($(foreach xml,$(sort $(MAN_XML)),xsltproc -o $(xml).new texi.xsl $(xml) && \
+ $(DOCBOOK2X_TEXI) --encoding=UTF-8 --to-stdout $(xml).new && \
+ rm $(xml).new &&) true) > $@.new.new && \
+ $(PERL_PATH) cat-texi.perl $@ <$@.new.new >$@.new && \
+ rm $@.new.new && \
+ mv $@.new $@
gitman.info: gitman.texi
$(QUIET_MAKEINFO)$(MAKEINFO) --no-split --no-validate $*.texi
$(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
- $(QUIET_DB2TEXI)$(RM) $@+ $@ && \
- $(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@+ && \
- mv $@+ $@
+ $(QUIET_DB2TEXI)$(RM) $@.new $@ && \
+ $(DOCBOOK2X_TEXI) --to-stdout $*.xml >$@.new && \
+ mv $@.new $@
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
- $(QUIET_GEN)$(RM) $@+ $@ && \
- '$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@+ && \
- mv $@+ $@
+ $(QUIET_GEN)$(RM) $@.new $@ && \
+ '$(SHELL_PATH_SQ)' ./howto-index.sh $(sort $(wildcard howto/*.txt)) >$@.new && \
+ mv $@.new $@
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
$(QUIET_ASCIIDOC)$(TXT_TO_HTML) $*.txt
@@ -445,10 +445,10 @@ WEBDOC_DEST = /pub/software/scm/git/docs
howto/%.html: ASCIIDOC_EXTRA += -a git-relative-html-prefix=../
$(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt GIT-ASCIIDOCFLAGS
- $(QUIET_ASCIIDOC)$(RM) $@+ $@ && \
+ $(QUIET_ASCIIDOC)$(RM) $@.new $@ && \
sed -e '1,/^$$/d' $< | \
- $(TXT_TO_HTML) - >$@+ && \
- mv $@+ $@
+ $(TXT_TO_HTML) - >$@.new && \
+ mv $@.new $@
install-webdoc : html
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)
--
gitgitgadget
next prev parent reply other threads:[~2019-07-04 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-04 9:14 [PATCH 0/1] windows: avoid illegal filenames during a build Johannes Schindelin via GitGitGadget
2019-07-04 9:14 ` Johannes Schindelin via GitGitGadget [this message]
2019-07-08 19:23 ` [PATCH 1/1] Avoid illegal filenames when building Documentation on NTFS Junio C Hamano
2019-07-09 13:27 ` Johannes Schindelin
2019-07-09 14:43 ` Junio C Hamano
2019-07-10 10:08 ` Johannes Schindelin
2019-07-10 18:26 ` Junio C Hamano
2019-07-10 20:35 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1f0f4fe6fbf0e7a7eea1f3d49db183c70693a895.1562231679.git.gitgitgadget@gmail.com \
--to=gitgitgadget@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).