Paul, Paul D. Smith <[EMAIL PROTECTED]> 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
_______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
