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>
Ben Walton committed
Mar 22, 2009 at 09:20 UTC
ee7ec2f9ded03700f2b95cc1d4b3d60ed374132a
1 file changed
+10
-6
Documentation/Makefile
+10
-6
@@ -103,6 +103,10 @@ ifdef DOCBOOK_SUPPRESS_SP
103
XMLTO_EXTRA += -m manpage-suppress-sp.xsl
104
endif
105
106
+SHELL_PATH ?= $(SHELL)
107
+# Shell quote;
108
+SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
109
+
110
#
111
# Please note that there is a minor bug in asciidoc.
112
# The version after 6.0.3 _will_ include the patch found here:
@@ -178,7 +182,7 @@ install-pdf: pdf
182
$(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)
183
184
install-html: html
181
- sh ./install-webdoc.sh $(DESTDIR)$(htmldir)
185
+ '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)
186
187
../GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
188
$(QUIET_SUBDIR0)../ $(QUIET_SUBDIR1) GIT-VERSION-FILE
@@ -240,7 +244,7 @@ user-manual.xml: user-manual.txt user-manual.conf
244
245
technical/api-index.txt: technical/api-index-skel.txt \
246
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
248
249
$(patsubst %,%.html,$(API_DOCS) technical/api-index): %.html : %.txt
250
$(QUIET_ASCIIDOC)$(ASCIIDOC) -b xhtml11 -f asciidoc.conf \
@@ -285,7 +289,7 @@ $(patsubst %.txt,%.texi,$(MAN_TXT)): %.texi : %.xml
289
290
howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
291
$(QUIET_GEN)$(RM) $@+ $@ && \
288
- sh ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \
292
+ '$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \
293
mv $@+ $@
294
295
$(patsubst %,%.html,$(ARTICLES)) : %.html : %.txt
@@ -299,14 +303,14 @@ $(patsubst %.txt,%.html,$(wildcard howto/*.txt)): %.html : %.txt
303
mv $@+ $@
304
305
install-webdoc : html
302
- sh ./install-webdoc.sh $(WEBDOC_DEST)
306
+ '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)
307
308
quick-install: quick-install-man
309
310
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)
312
313
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)
315
316
.PHONY: .FORCE-GIT-VERSION-FILE