Hi,

(Windows 2k/XP(tested on both), Cygwin, make 3.80 and make 3.81 beta)

In make 3.80 I can read in an environment variable (ENVVAR1) of the form:

D:\rootdir\leafdir

I can use the line

MAKE_COMPATIBLE_ENVVAR1 = $(subst \,/,$(ENVVAR1))

I have sources located off this location on my hard drive so I can write:

PROJECT = MyProgram.exe

SOURCES = mainsourcefile.cpp \
$(MAKE_COMPATIBLE_ENVVAR1)/sourcedir/dir1/sourcefile1.cpp \
$(MAKE_COMPATIBLE_ENVVAR1)/sourcedir/dir1/sourcefile2.cpp \
$(MAKE_COMPATIBLE_ENVVAR1)/sourcedir/dir2/sourcefile3.cpp

OBJFILES = $(subst .cpp,.obj,$(SOURCES))

Assuming I have a variables defined as LINKER_DIRECTIVE and COMPILER_DIRECTIVE I can write the rules:

$(PROJECT) : $(OBJFILES)
$(LINKER_DIRECTIVE)

$(OBJFILES) : %.obj : %.cpp
$(COMPILER_DIRECTIVE)

In make 3.80 this works fine. The compiler is called to create each .obj file and perform the link to create the executable, however in make 3.81 make exits with the error:

Makefile:###: *** multiple target patterns. Stop.

where ### is the line number for the line:

[line ### = ]$(PROJECT) : $(OBJFILES)

Replacing the variable MAKE_COMPATIBLE_ENVVAR1 with a relative path such as ../../.. passes on both make 3.80 and make 3.81 without a problem.

This suggests to me that the ':' in the path names for the windows drives are being parsed as ':'s for additional target patterns. Is this a bug in make 3.80 or make 3.81?

What is the expected behaviour?

Thanks for you help.

Jamie



_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to