make-w32
[Top][All Lists]
Advanced

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

RE: Complex pattern rules broken in win32-make (MINGW).


From: Peter Dons Tychsen
Subject: RE: Complex pattern rules broken in win32-make (MINGW).
Date: Wed, 3 Jan 2007 11:52:26 +0100

> Not if you enclose $@ and $< in double quotes -- which you should do
> anyway, since you can never know when the actual file name will have
> embedded spaces.

I dont see how the double quotes will help me in this case.
I agree that they should always be there to fix paths that have spaces
in them,
but the problem that some windows programs dont like the "/" will not go
away because of this.

Many DOS/WIN programs have built-in path analyzers which simply does not
take "/" into account at all.
If encounting a "/" instead of the "\" they will simply fail.
Other DOS/WIN programs handle this more gracefully (especially newer
programs), 
and even the windows core libraries handle this reasonably.

> Please start by showing us the minimal Makefile that can be used to
> reproduce the problem, and the error message(s) you see on your
> machine with variants 2) and 3).

Im on it. I will send it later.
I will create a minimal makefile which shows all 3 solutions failing.

/pedro

-----Original Message-----
From: Eli Zaretskii [mailto:address@hidden 
Sent: 2. januar 2007 22:48
To: Peter Dons Tychsen
Cc: address@hidden
Subject: Re: Complex pattern rules broken in win32-make (MINGW).

> Date: Tue, 2 Jan 2007 18:25:23 +0100
> From: "Peter Dons Tychsen" <address@hidden>
> 
> However, i am not sure i like the solution where i have to use "/"
> instead of "\".
> This solution can lead to other errors.
> 
> Consider the following example:
> 
> obj/%.o: src/%.c
>   some_odd_win_compiler -c -o $@ $<
> 
> Now the compiler will be called with (for src.o target):
> 
> # some_odd_win_compiler -c -o obj/src.o obj/src.c
> 
> This will not work for many dos/win tools, as they might puke on the
"/"
> in the path.

Not if you enclose $@ and $< in double quotes -- which you should do
anyway, since you can never know when the actual file name will have
embedded spaces.

> All of these scenarios fail:
> 
> 1) obj\%.o: src\%.c     - I understand why this will never work (See
> Eli/Pauls remarks).
>                           Is consistent with the way a DOS path is
> expressed in C ("c:\\some\\path").
> 2) obj/%.o: src/%.c     - This should work, as DOS/WIN make accepts
"/"
> as "\" for paths.
> 3) obj\\%.o: src\\%.c   - This should work, as the double "\" should
> undo the effect a single "\" has on a "%".
>                           (like other escaped sequences - escaped left
> to right, with no recursive parsing).
> 
> 2) & 3) probably fails due to the way (or maybe the order) in which
the
> rules and prequisite lines are parsed.
> 
> If i wanted to fix this, where should i start?

Please start by showing us the minimal Makefile that can be used to
reproduce the problem, and the error message(s) you see on your
machine with variants 2) and 3).

FWIW, I use variant 2) in all my Makefiles, and I have yet to see a
single case where it fails.

Thanks.

****         GN Netcom Group  NOTICE - AUTOMATICALLY INSERTED      ****

The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material.  Any review,  retransmission, dissemination or other use of, or
taking of any action in reliance upon,  this information by persons or
entities other than the intended recipient is prohibited.
Any opinions expressed in this email are those of the individual and not
necessarily the Company.

If  you receive this transmission in error, please email to
address@hidden, including a copy of this message. Please then
delete this email and destroy any copies of it.

************************************** DISCLAIMER END 
**********************************************





reply via email to

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