[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: A buggy behaviour on Mingw32, Win64.
From: |
Eli Zaretskii |
Subject: |
Re: A buggy behaviour on Mingw32, Win64. |
Date: |
Wed, 14 Aug 2019 17:38:17 +0300 |
> From: Андрей Демидов
> <address@hidden>
> Date: Wed, 14 Aug 2019 02:28:36 +0300
>
> Although it seems to have nothing to do with SHELL itself -- I have heard of
> MAKESHELL, -- no matter, what I
> set the SHELL variable to -- even if it is in UNIX-style, Make tries to run
> the (expected, mind you, so it's not the
> variable's fault!) shell using Windows path instead, which happens to contain
> a whitespace.
>
> Namely: the SHELL var. in the Make file was originally set to "/bin/sh",
> which resulted in creating a Widows
> process from exe file "C:\Program Files\Git\usr\bin\sh.exe". Apparently, this
> is where the "sh" shell resides in
> underlying Windows, so naturally, "/bin/sh" must lead to the aforementioned
> Windows exe file (because many
> "built-in" utilities are there too). So that's not the problem.
>
> The problem is the "Program Files" folder: because of the whitespace Make
> fails to cook the recipe. I dare not
> to re-install Git and Git Bash as well to another, whitespaceless location,
> because I'm afraid of what I might
> lose then. Even if I could find a way to re-install it safely without any
> data loss, the whitespace is still a
> problem: no user must be forced to avoid whitespaces in file names. Thus I
> consider it a bug: a command line
> must be wrapped in quot. marks, if it contains a whitespace. I don't know,
> how to make Make do it.
Try setting SHELL in the environment while quoting the file name:
set SHELL="C:\Program Files\Git\usr\bin\sh.exe"
and then run Make again. You may need to use "make -e" to have the
environment override the setting inside the Makefile.
Alternatively, you could copy 'C:\Program Files\Git\usr\bin\sh.exe' to
a directory without whitespace and put that directory ahead of
'C:\Program Files\Git\usr\bin' on PATH. Just sh.exe, nothing else.
As yet another alternative, you could create a directory symlink to
'C:\Program Files\Git\usr\bin' (using the mklink command) and put that
symlink on your PATH ahead of 'C:\Program Files\Git\usr\bin'.
> This is what happens, when I try to build liblzma:
In general, I don't recommend using the native Windows port of Make
for building packages whose Makefiles assume a Posixy shell. Use MSYS
instead. But maybe liblzma is simple enough that it will work for you
with some tweaking.