[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pattern rules and pattern-specific-variables problem
From: |
Boris Kolpackov |
Subject: |
Re: pattern rules and pattern-specific-variables problem |
Date: |
Tue, 23 Aug 2005 19:13:28 +0200 |
User-agent: |
Mutt/1.5.6+20040907i |
Paul,
Paul D. Smith <address@hidden> writes:
> bk> The idea is quite simple. Right now make will "apply" all matching
> bk> pattern-specific variables in the order of definition. Proposed
> bk> change will apply them in a different order: from the most generic
> bk> to the most specialized.
>
> Hm. Unless we can pre-sort the patterns by, say, the length of the
> pattern string _before_ expansion (in our example "foo%bar" is 7 chars,
> which is longer than "f%bar" at 5 chars, so f%bar would be matched first
> and foo%bar would be matched second) and have it always do the right
> thing, there doesn't seem to be any efficient way to manage this.
I believe you are right, pre-sorting pattern rules and pattern-specific
variables to be longest-first should do the trick.
> Offhand I can't think of an instance where sorting by length would give
> the wrong answer, but I haven't had my tea yet this morning :-).
It's actually quite easy to prove formally ;-).
> bk> We can leave the old behavior by default and allow makefile
> bk> writers to turn on the new behavior via MAKEFLAGS:
>
> bk> MAKEFLAGS += --enable-pattern-specialization
>
> Yes... as you know, I just hate to add these kinds of flags to modify
> basic behavior though: every extra option increases the potential
> testing axes exponentially.
I agree knobs are evil but sometimes there is just no choice.
thanks,
-boris
signature.asc
Description: Digital signature
- pattern rules and pattern-specific-variables problem, Shawn Halpenny, 2005/08/14
- Re: pattern rules and pattern-specific-variables problem, Boris Kolpackov, 2005/08/15
- Re: pattern rules and pattern-specific-variables problem, Shawn Halpenny, 2005/08/15
- Re: pattern rules and pattern-specific-variables problem, Boris Kolpackov, 2005/08/16
- Re: pattern rules and pattern-specific-variables problem, Paul D. Smith, 2005/08/21
- Re: pattern rules and pattern-specific-variables problem, Shawn Halpenny, 2005/08/22
- Re: pattern rules and pattern-specific-variables problem, Paul D. Smith, 2005/08/22
- Re: pattern rules and pattern-specific-variables problem, Boris Kolpackov, 2005/08/22
- Re: pattern rules and pattern-specific-variables problem, Paul D. Smith, 2005/08/22
- Re: pattern rules and pattern-specific-variables problem,
Boris Kolpackov <=
- Re: pattern rules and pattern-specific-variables problem, Paul D. Smith, 2005/08/24
- Re: pattern rules and pattern-specific-variables problem, Greg Chicares, 2005/08/24
- Re: pattern rules and pattern-specific-variables problem, Boris Kolpackov, 2005/08/24