I’m working on compiling Xindy with a MinGW system. dmake always dies with an error, and I’ve narrowed it down to a couple of lines in the Makefile. Try running dmake on this:
SHELL = /bin/sh
some-target:
target=`echo info-recursive | sed s/-recursive//`;
If you are using the regular Windows CMD instead of a MinGW shell, you have to change the location for the SHELL variable to point to something like “C:/MinGW/msys/1.0/sh.exe”. Anyway, the above fails with:
CreateProcess failed (2).
dmake: Error executing 'bin/sh /S /c "target=`echo info-recursive | sed s/-recursive//`;"': No such file or directory
dmake: Error code -1, while making 'some-target'
Sed and sh are installed and they work fine. When I try and run the given command as output by the error message by itself, I get this:
$ /bin/sh /S /c "target=`echo info-recursive | sed s/-recursive//`;"
/bin/sh: /S: No such file or directory
So it seems that dmake (or something) is adding the ‘/S /c’, to the shell argument, and bash thinks it’s a file name and then fails when it can’t find it.
Does anyone have experience with this or know how I can fix this?
Brief examination of the dmake source code suggests that the problem is that
$(SHELL)is being set too late and is still empty at startup time (macros.mk, line 37):You may be able to work around this by adding
SHELL="C:/MinGW/msys/1.0/sh.exe"to your dmake command line invocation.(I haven’t used dmake in many years and so may be mistaken here, but I will be impressed if you can get what looks like an autoconfiscated makefile to work with dmake, which IIRC has a somewhat different flavour. It might be easier to find a GNU make or similar.)