[CMake] problem with SUBDIRS and MingGW-make

Axel Wachtler axel.wachtler at gmx.de
Sat Jul 2 03:32:21 EDT 2005



Cesar Rabak wrote:

> --- Axel Wachtler  escreveu:
>
>
> >Hallo all,
> >
> >Environment: cmake 2.0.5; mingw; windwos 2000;
> >
> >I use a Top-Level CmakeLists.txt file, which has
> >a statement:
> >
> >   SUBDIRS(../../MyApp ../../MyApp1 )
> >
> >The generated GNU-Makefile contains for the
> >subdirectories
> >for the "clean" and other (e.g. dependency) targets
> >rules like:
> >
> >clean__MyApp:
> >	@cd ../../MyApp; $(MAKE) clean
> >
> >The problem with MinGW-make is that it does not
> >handle the ";" correct, so the "$(MAKE) clean" is
> >not executed in ../../MyApp.
>
>
> I'm afraid your description of the cause is somewhat
> incorrect:
>
> It is not make that does not handle well the ';' but
> rather the command shell you are using.

You are right, command.com is the reason.

So I have not checked for a shell that comes with mingw.
For cygwin-bash the problem was, the avr-gcc is build
under mingw and expects DOS filenames, like c:/src/main.c
but the bash hands over /cygdrive/c/src/main.c, so that
avr-gcc could not open the file. (you can not mixup
mingw and cygwin based programs, another issue is, that
the PATH variable is of importance, because there are some
tools with equal names in DOS and MinGW but different
command line options.)
As soon as I'm back at my Windows Desktop (Tuesday),
I will try a shell coming with mingw.

> Did you try a unixy shell port to check this?

> The root problem IMHO is that for MingW the only
> option is "Unix Makefile" whereas some checks on the
> platform's OS could be used to produce Makefiles with
> the more amenable syntax you propose.

Yes, this would cleanly encapsulate the "-C GNUism"
so that it don't break the make on other Unixes.

Thanks and Best Regards

Axel

-- 
------------------------------------------------------------------
Axel Wachtler
Mail:        axel.wachtler at gmx.de
Fingerprint: FA2C 4FB1 AC18 5FA3 F4F1 1114 3F38 E0DF 8C3A DC95
Public Key:  http://www.keyserver.net
------------------------------------------------------------------
Why does NASA drink Coke? - Because they can't get 7up.




More information about the CMake mailing list