On Sun, 2006-12-31 at 06:28 +0200, Eli Zaretskii wrote:

> > This rule breaks down:
> > 
> > obj\%.o: src\%.c
> > 
> > This should however be handled correctly on windows... no ?
> 
> It cannot be fixed easily, as the backslash is required to be able to
> use a literal percent character.

Eli is correct.  The GNU make manual defines the sequence "\%" to be a
literal "%" (the backslash escapes the percent so it's not treated as a
pattern match character).

It's remotely possible that you can get what you want this way:

  obj\\%.o: src\\%.c

since GNU make defines that a backslash can be used to escape a
backslash that would otherwise escape a percent; so the above should
resolve to what you want.

However, I can't say for sure this will work.  In general it's best to
follow Eli's excellent advice and use "/" instead of "\" in your
makefiles, even on Windows.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist


_______________________________________________
Make-w32 mailing list
Make-w32@gnu.org
http://lists.gnu.org/mailman/listinfo/make-w32

Reply via email to