Skip to content

Commit ee7ec2f

Browse files
Ben Waltongitster
authored andcommitted
documentation: Makefile accounts for SHELL_PATH setting
Ensure that the Makefile that generates and installs the Documentation is aware of any SHELL_PATH setting. Use this value if found or the current setting for SHELL if not. This is an accommodation for systems where sh is not POSIX enough. Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent cced5fb commit ee7ec2f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Documentation/Makefile

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ ifdef DOCBOOK_SUPPRESS_SP
103103
XMLTO_EXTRA += -m manpage-suppress-sp.xsl
104104
endif
105105

106+
SHELL_PATH ?= $(SHELL)
107+
# Shell quote;
108+
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
109+
106110
#
107111
# Please note that there is a minor bug in asciidoc.
108112
# The version after 6.0.3 _will_ include the patch found here:
@@ -178,7 +182,7 @@ install-pdf: pdf
178182
$(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
179183

180184
install-html: html
181-
sh ./install-webdoc.sh $(DESTDIR)$(htmldir)
185+
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
182186

183187
../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
184188
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
@@ -240,7 +244,7 @@ user-manual.xml: user-manual.txt user-manual.conf
240244

241245
technical/api-index.txt: technical/api-index-skel.txt \
242246
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
243-
$(QUIET_GEN)cd technical && sh ./api-index.sh
247+
$(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh
244248

245249
$(patsubst %,%.html,$(API_DOCS) technical/api-index): %.html : %.txt
246250
$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
@@ -285,7 +289,7 @@ $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
285289

286290
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
287291
$(QUIET_GEN)$(RM) $@+ $@ && \
288-
sh ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \
292+
'$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \
289293
mv $@+ $@
290294

291295
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
@@ -299,14 +303,14 @@ $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
299303
mv $@+ $@
300304

301305
install-webdoc : html
302-
sh ./install-webdoc.sh $(WEBDOC_DEST)
306+
'$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)
303307

304308
quick-install: quick-install-man
305309

306310
quick-install-man:
307-
sh ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)
311+
'$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)
308312

309313
quick-install-html:
310-
sh ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)
314+
'$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)
311315

312316
.PHONY: .FORCE-GIT-VERSION-FILE

0 commit comments

Comments
 (0)