make-w32
[Top][All Lists]
Advanced

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

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


From: Eli Zaretskii
Subject: Re: behavior on Win depends on whether \ or / is used??
Date: Mon, 14 Dec 2009 23:28:48 +0200

> From: "Mark Galeck (CW)" <address@hidden>
> Date: Sun, 13 Dec 2009 22:21:27 -0800
> Accept-Language: en-US
> acceptlanguage: en-US
> Cc: 
> 
> The makefile is:
> 
> 
> SHELL=cmd.exe
>               
> vpath %.s ..\foobar0 ..\foobar1
> 
> %.o: %.s
>               echo $<
>               
> ..\foobar0\foobar.s:
> 
> 
> Now, again, please excuse me if I repeat myself, from last time:
> 
> First.  The behavior with the above makefile, with the _backward_ slashes, is 
> perfectly fine...  it does find the file foobar.s in directory foobar1, no 
> matter the backslashes, it does echo what it's supposed to echo.  
> 
> So I don't understand why you are saying that make fails in this case, that 
> it does not find in vpath what it should, ...  Nothing like that, it works 
> perfectly fine.  

I say that Make ``fails'' because it works contrary to what its code
intended it to do.  If I convert your Makefile to its Unix equivalent:

  SHELL = /bin/sh

  vpath %.s ./foobar0 ./foobar1

  %.o: %.s
          echo $<

  ./foobar0/foobar.s:;

and run Make on GNU/Linux, I see the same error message:

  make: *** No rule to make target `foobar.s', needed by `foobar.o'.  Stop.

So Make is _supposed_ to behave like that, on GNU/Linux as on
Windows.  The reason it does _not_ behave like that on Windows when
you use backslashes is because the backslashes are handled
inconsistently by the Windows port of Make.  The details are in my
previous message in this thread.

The different behavior, to me, is a ``failure'', because Make does not
do what its programmer meant.  It just so happens that my ``failure''
is your ``success''.  But that's a matter of definitions.  I hope you
at least agree with me that the behavior on Windows with forward
slashes is identical to what Make does on GNU/Linux, while the
behavior with backslashes is different.  I hope you also agree that
Make should behave the same with forward and backslashes alike, at
least ideally.

Now, whether the behavior we see on GNU/Linux is correct or not, is a
different question.  I hope Paul will chime in and help us out here,
because I don't understand what the code in question is doing and why,
nor do I understand the commentary in the code which is supposed to
explain that.

Paul?




reply via email to

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