Re: Questions about Git-Gui Makefile and GNU File Name and Text Functions
- From
Paul Smith <paul@mad-scientist.net>
- Date
- Jun 3, 2020, 14:34 UTC
- Message-ID
- <c931a1a5bf041057fa75febf6c05b7435ce27881.camel@mad-scientist.net>
- In-Reply-To
- <CAGiZ90kHSZEjw2ApU4kyGqCCH0KJS2Fe1mbvkJy4W2YKXs_-=w@mail.gmail.com>
On Wed, 2020-06-03 at 02:56 -0500, Edua Vioz wrote:
> Would the outcome of $(dir C:/Program > Files/Git/mingw64/libexec/git-core) be "C:/Program > Files/Git/mingw64/libexec/" or "C:/ Files/Git/mingw64/libexec/"?
I'm not super-familiar with the Git build system so maybe there are mitigations for this there but: GNU make always treats whitespace as a word separator so it will apply the "dir" function to each word. So:
$(dir C:/Program Files/Git/mingw64/libexec/git-core)
is equivalent to writing:
$(dir C:/Program) $(dir Files/Git/mingw64/libexec/git-core)
and the expected result is:
C:/ Files/Git/mingw64/libexec
> If the latter, is there no way for the $(dir) File Name function to > be told to respect white-spaces in files' directories?
No. Make in general, and GNU make in particular, doesn't expect to be given paths with whitespace in them.
Again I'm not an expert in the Git build system but my understanding is that the install can be relocatable: in that case I recommend you build it into a location where there is no whitespace in the path, then move it wherever you like after building.
> Additionally, would $(notdir C:/Program > Files/Git/mingw64/libexec/git-core) result in "Program git-core"?
Yes. All GNU make functions work the same way.