Can not build on Windows: syntax error in shell scripts
I'm not sure if this is a cairo/pixman bug or automake/autoconf but put shortly, scipts are vulnerable to paths with whitespace or other special characters.
configure
works but needs --disable-dependency-tracking
otherwise it errors with:
configure.log
:
make: *** [.deps/alpha-test.Po] Error 2
config.status:1488: $? = 2
config.status:1483: cd test && sed -e '/# am--include-marker/d' Makefile | make -f - am--depfiles
process_begin: CreateProcess(NULL, /usr/bin/mkdir -p .deps, ...) failed.
make (e=2): The system cannot find the file specified.
make: *** [.deps/a1-trap-test.Po] Error 2
config.status:1488: $? = 2
config.status:1492: error: in `/g/Files/C++/repos/pixman-0.38.4':
config.status:1494: error: Something went wrong bootstrapping makefile fragments
for automatic dependency tracking. Try re-running configure with the
'--disable-dependency-tracking' option to at least be able to build
the package (albeit without support for automatic dependency tracking).
See `config.log' for more details
After ./configure --disable-dependency-tracking
:
$ make
/usr/bin/sh: -c: line 0: syntax error near unexpected token `('
/usr/bin/sh: -c: line 0: `test -f config.h || C:/Program Files (x86)/GnuWin32/bin/make stamp-h1'
make: *** [config.h] Error 1
The issue is not quite easy to workaround, particulary because most libraries and tools install by default in C:/Program Files
on Windows.
Example line from generated makefile:
$(MAKE) $(AM_MAKEFLAGS) all-recursive
it should be:
"$(MAKE)" "$(AM_MAKEFLAGS)" all-recursive
Edit: I have read the autoconf documentation and it explicitly documents it does not support any special characters in paths so it's likely there is no solution for this problem.
The Makefile.win32 assumes MSVC, which is not my compiler. Would it be possible to tame it to support GCC or Clang on Windows?