From: Keith M. <kei...@to...> - 2007-03-14 11:35:19
|
Felix Kater wrote: > when I execute mingw32-make on a windows console I get infinite > recursion [when executing something like]: > > MY_FILE=../dir_0/ > all: ; $(MAKE) -C $(MY_FILE) && echo "done!" > > It seems that mingw32-make does not find "..\dir_0\Makefile" since > everything right to -C (including "&& echo ..."!) is interpreted as > a path. > since windows knows the "&&" command, I believe that this > is a bug in mingw32-make. I have reported that. Don't hold your breath, waiting for us to fix it :-) In fact, I'd like to mark existing versions of mingw32-make as deprecated, since I just downloaded http://ftp.gnu.org/pub/gnu/make/make-3.81.tar.bz2, to my /opt/packages directory, (MSYS path), then did:-- 1) From my MSYS shell prompt: $ cd ~/sandbox/mingw $ tar xjf /opt/packages/make-3.81.tar.bz2 $ mkdir make-3.81/build $ cd make-3.81/build $ ../configure --prefix=`cd /usr/local && pwd -W` \ --disable-dependency-tracking \ --disable-nls \ --enable-case-insensitive-file-system \ --disable-job-server \ --disable-rpath \ --program-prefix=mingw32- [...output snipped; (one expected warning, no errors)...] $ make [...output snipped; (no errors)...] $ mkdir -p /d/usr/sandbox/dir_{0,1} $ cat > /d/usr/sandbox/dir_0/Makefile all: ; echo "Working (in dir_0)..." ^D $ cat > /d/usr/sandbox/dir_1/Makefile MY_FILE_DIR = ../dir_0/ all: ; $(MAKE) -C $(MY_FILE_DIR) && echo "Done." ^D (Note: `^D' is `Ctrl-D', to end the here redirection). $ cp make.exe /d/sandbox/gmake.exe (Note: the `program-prefix' doesn't get applied, until doing a `make install'; I pre-empted that, by simply doing a copy to the unusual destination). 2) I then switched to a cmd.exe window:-- D:\usr> cd \usr\sandbox\dir_1 D:\usr\sandbox\dir_1> path D:\USR\SANDBOX;%PATH% D:\usr\sandbox\dir_1> gmake gmake -C ../dir_0/ && echo "Done." gmake[1]: Entering directory `D:/usr/sandbox/dir_0' echo "Working (in dir_0)..." "Working (in dir_0)..." gmake[1]: Leaving directory `D:/usr/sandbox/dir_0' "Done." Since that appears to work exactly as you expect, I suggest you replace your existing mingw32-make.exe, with a fresh build from pristine GNU sources. Regards, Keith. |