[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: behavior on Win depends on whether \ or / is used??

From: Mark Galeck (CW)
Subject: RE: behavior on Win depends on whether \ or / is used??
Date: Wed, 9 Dec 2009 18:42:04 -0800

Here's another example, now this one is just terrible, I spent several hours 
tracking down this problem:  

Again, 2 subdirectories foobar0 and foobar1, and only in foobar1 there is a 
file foobar.s  . There is no file foobar.o .  

The makefile is:

vpath %.s .\foobar0 .\foobar1   

%.o : %.s 
                echo $<


This behaves as expected:

C:\tmp>make foobar.o
echo .\foobar1/foobar.s

But, that is after my change!  The last line in the makefile is generated 
automatically - it comes out of what make outputs as $< to some rule, and make, 
outputs forward slashes!  If I keep it the way make wants it 


Now this bombs!  Because it says

C:\tmp>make foobar.o
echo .\foobar0/foobar.s

and of course, the file foobar0/foobar.s does not exist - and then later make 
dutifully exclaims "cannot open file foobar0/foobar.s for reading" - well yes 
you can't, why did you think you found it???

What is going on here, can someone enlighten me?

How do I get vpaths and forward slashes, output by make itself, to behave on 
Windows? It seems to me that the only solution, in those more complex cases 
like above, is every time make  outputs a forward slash, to edit it myself to 
backslash, before I give it back to make!!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]