bug-make
[Top][All Lists]
Advanced

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

Re: [bug #31002] make picks wrong pattern rule


From: Edward Welbourne
Subject: Re: [bug #31002] make picks wrong pattern rule
Date: Mon, 13 Sep 2010 13:36:40 +0200

> Roland, I think you overstate the seriousness of the problem.

... and I think you are understating it.

> There are not many makefiles that both define multiple pattern rules 
> and rely on their order for selection.

Mine do.  Not that I realized it until things didn't work as I 
expected, after which I had to juggle the order until everything 
worked.  The colleague who's inherited maintenance of that may have a 
hard time sorting that out - juggling the order won't help him, with 
the new rule.  Either he's lucky and it works, or he's not and we're 
going to have to make drastic changes to get round it - which 
management isn't going to like, because I'm really meant to be doing 
other things these days, not dabbling in black magic with my old 
apprentice.  Telling our colleagues not to upgrade to 3.82 may be the 
only practical option.

The down-side of the new rule is that there's no way to bypass it: the 
longest-stem rule is always going to select the longest-stem rule 
applicable, there's nothing the makefile author can do to cause the 
less-frequently-desired rule to be applied, when it happens to be what 
they need.  The order-dependency was kludgy, but at least I only had 
to juggle the order to get it all to work.

The problem with a rule that is "what people usually prefer" is, 
generally, that you have to think quite carefully about how the 
UNusual case is to be handled.  It's like buildings with steps up to 
the entrance - most people find that nicer to use than a sloped ramp, 
but those who do can still use a sloped ramp, while those who simply 
cannot use stairs need a sloped ramp !

        Eddy.



reply via email to

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