../llvm/configure fails in Cygwin with space character in path name?

config.status: executing projects/Makefile commands
config.status: executing bindings/Makefile commands
config.status: executing bindings/ocaml/Makefile.ocaml commands
=== configuring in projects/sample (/home/Jon Smith/cl/build/projects/sample
configure: running /bin/sh ../../../llvm/projects/sample/configure
--prefix=/usr/local --cache-file=/dev/null
configure: error: cannot find install-sh or install.sh in /home/Jon
Smith/cl/llvm/autoconf "../../../llvm/projects/sample"//home/Jon
configure: error: ../../../llvm/projects/sample/configure failed for

I don't think autoconf build scripts would be tolerant of whitespace pathname.
To build tools and liibs, I recommend you should build them on desired tree.

Anyway, I think it might be a little problematic if built tools did
not accept whitespace pathnames. Then, please file a bug.


Why shouldn't they accept paths with spaces in them? *nix supports that, generally. So long as the paths are properly escaped in any input, things should work. If they don't, it's a bug.

GNU Make doesn't handle embedded spaces:

$ cat Makefile
all: foo\ bar

foo\ bar: foo\ bar.o

$ ls
foo bar.c Makefile

$ make
make: *** No rule to make target `foo bar.o', needed by `foo bar'. Stop.

Make seems unable to find the link from "foo bar.c" to "foo bar.o"
Shell quoting with ' ' does not apply.

It's probably best to avoid spaces in filenames from the outset.


GNU Make doesn't handle embedded spaces:

Actually it does.
It's just not pretty.
See CMCrossroads | Configuration Management (CM and SCM) Q&A and Advice
(Google it as "GNU Make meets file names with spaces in them", including the quotes.)

Note that the more obscure techniques can be reliably used in an LLVM context, since LLVM relies on GNU Make anyway.
I do not know whether this will stay so in the future; I guess that's for the LLVM team to answer.

$ cat Makefile
all: foo\ bar

foo\ bar: foo\ bar.o

The above URL tells me you need to double the backslashes.
I.e. your Makefile should look like this:

all: foo\\ bar
foo\\ bar: foo\\ bar.o

(Disclaimer: I haven't tested this.)

It's probably best to avoid spaces in filenames from the outset.

That's actually the strategy that the above-linked text recommends.
(It's also a shame.)


I'll review patches handling this sort of thing, but it's so far down my list of priorities
that it'll never get done if someone waits for me to do it.