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>
maint
Ben Walton 2009-03-22 09:20:44 -04:00 committed by Junio C Hamano
parent cced5fbc24
commit ee7ec2f9de
1 changed files with 10 additions and 6 deletions

View File

@ -103,6 +103,10 @@ ifdef DOCBOOK_SUPPRESS_SP
XMLTO_EXTRA += -m manpage-suppress-sp.xsl XMLTO_EXTRA += -m manpage-suppress-sp.xsl
endif endif


SHELL_PATH ?= $(SHELL)
# Shell quote;
SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))

# #
# Please note that there is a minor bug in asciidoc. # Please note that there is a minor bug in asciidoc.
# The version after 6.0.3 _will_ include the patch found here: # The version after 6.0.3 _will_ include the patch found here:
@ -178,7 +182,7 @@ install-pdf: pdf
$(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir) $(INSTALL) -m 644 user-manual.pdf $(DESTDIR)$(pdfdir)


install-html: html install-html: html
sh ./install-webdoc.sh $(DESTDIR)$(htmldir) '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(DESTDIR)$(htmldir)


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


technical/api-index.txt: technical/api-index-skel.txt \ technical/api-index.txt: technical/api-index-skel.txt \
technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS)) technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
$(QUIET_GEN)cd technical && sh ./api-index.sh $(QUIET_GEN)cd technical && '$(SHELL_PATH_SQ)' ./api-index.sh


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


howto-index.txt: howto-index.sh $(wildcard howto/*.txt) howto-index.txt: howto-index.sh $(wildcard howto/*.txt)
$(QUIET_GEN)$(RM) $@+ $@ && \ $(QUIET_GEN)$(RM) $@+ $@ && \
sh ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \ '$(SHELL_PATH_SQ)' ./howto-index.sh $(wildcard howto/*.txt) >$@+ && \
mv $@+ $@ mv $@+ $@


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


install-webdoc : html install-webdoc : html
sh ./install-webdoc.sh $(WEBDOC_DEST) '$(SHELL_PATH_SQ)' ./install-webdoc.sh $(WEBDOC_DEST)


quick-install: quick-install-man quick-install: quick-install-man


quick-install-man: quick-install-man:
sh ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir) '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(DOC_REF) $(DESTDIR)$(mandir)


quick-install-html: quick-install-html:
sh ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir) '$(SHELL_PATH_SQ)' ./install-doc-quick.sh $(HTML_REF) $(DESTDIR)$(htmldir)


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