Re: [PATCH] documentation: Makefile accounts for SHELL_PATH setting
- From
Jeff King <peff@peff.net>
- Date
- Mar 21, 2009, 03:22 UTC
- Message-ID
- <20090321032240.GA31547@coredump.intra.peff.net>
- In-Reply-To
- <1237603220-22897-1-git-send-email-bwalton@artsci.utoronto.ca>
On Fri, Mar 20, 2009 at 10:40:20PM -0400, Ben Walton wrote:
> Take SHELL_PATH into account, if set, in Documentation/Makefile. This > allows the caller to provide a shell capable of running the install > scripts on systems where sh is not bash.
Makes sense.
> +#retain original (but broken) behaviour if SHELL_PATH isn't overridden > +ifndef SHELL_PATH > + SHELL_PATH = sh > +endif
The Makefile in t/Makefile does:
SHELL_PATH ?= $(SHELL)
which I think makes more sense (and yes, yours actually keeps the existing behavior, but it's probably better to inherit from SHELL in case it is set to something more useful).
> install-html: html > - sh ./install-webdoc.sh $(DESTDIR)$(htmldir) > + $(SHELL_PATH) ./install-webdoc.sh $(DESTDIR)$(htmldir)
You need a SHELL_PATH_SQ to handle paths with spaces; see t/Makefile for an example.
I wonder if both subdirs should simply be pulling from GIT-BUILD-OPTIONS, though, which would allow this to use the specified SHELL_PATH:
$ make SHELL_PATH=whatever $ cd Documentation && make
but maybe it is not worth caring about (since it may complicate building Documentation if you _haven't_ build the actual code).
-Peff