git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Ben WaltonNext: Ben Walton
Message 2 of 4 in “documentation: Makefile accounts for SHELL_PATH setting”
  1. documentation: Makefile accounts for SHELL_PATH settingBen Walton, Mar 21, 2009
  2. Jeff KingMar 21, 2009
  3. Ben WaltonMar 21, 2009
  4. Jeff KingMar 22, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.