[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Windows path names and multiple targets.. bug in make 3.81?
From: |
Jamie Allsop |
Subject: |
Windows path names and multiple targets.. bug in make 3.81? |
Date: |
Sat, 08 May 2004 10:56:40 +0100 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 |
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
- Windows path names and multiple targets.. bug in make 3.81?,
Jamie Allsop <=