On Thu, 2020-02-20 at 22:17 -0300, Alexandre Oliva wrote:
> mkheaders.in uses substitutions of @SHELL@ to run fixinc.sh and
> mkinstalldirs. Problem is, SHELL comes from CONFIG_SHELL for the
> build system, and it needs not match whatever is available at an
> unrelated host system after installation, when mkheaders is supposed
> to be run.
>
> I considered ditching the hardcoding altogether, but decided to retain
> it, but allowing CONFIG_SHELL and SHELL to override it, if any of them
> can successfully run mkinstalldirs, and if those and the substituted
> @SHELL@ fail, fallback to /bin/sh and to plain execution of the
> script, which appears to enable at least one shell on a system that
> doesn't typicall have a shell to recognize a script by #!/bin/sh and
> reinvoke itself to run it.
>
> If all of these fail, we fail, but only after telling the user to
> retry after setting CONFIG_SHELL, that fixincl itself also uses.
>
> Tested with a x86_64-linux-gnu native, and on various combinations of
> build, host and targets, including cross and canadian crosses involving
> host systems that don't have a built-in Bourne Shell. I'm going ahead
> and checking it in as part of the build machinery, though I acknowledge
> this might be stretching configury a bit. Please let me know if you
> have any objections to this stretching, or to the change itself.
>
>
> for fixincludes/ChangeLog
>
> * mkheaders.in: Don't require build-time shell on host.
OK
jeff
>