make-alpha
[Top][All Lists]
Advanced

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

Re: shortest stem


From: Paul Smith
Subject: Re: shortest stem
Date: Wed, 23 Sep 2009 17:39:23 -0400

On Wed, 2009-09-23 at 18:50 +0200, Boris Kolpackov wrote:

> > I'd really appreciate it if folks with larger, more complex secondary 
> > expansion environments would give it a whirl.
> 
> Sure, I have one of those.

Cool; I got the code working and passing the regression tests on Sunday
and I've been trying to find the time ever since to get the docs etc.
done.  Sigh.  Tonight, I think.

> > For example, what about:
> > 
> >     %.o : %.c
> >     %-d.o : %.y
> > 
> > ? Today this ordering will always choose to build the .o from the .c
> > file because it appears first.  After the change, how will this work?
> 
> For names which end on '-d.o' the second rule will be tried first. After
> that, the usual logic applies.
> 
> In general, I think the difference in behavior will be limited to
> very small number of cases, namely, where there is more than one
> pattern rule to build the same thing, and the rules differ in the
> 'specificity' of the target, e.g, '%.o' & '%-pic.o'. I don't think 
> such situations are very common.

Here's a thought.  What if we were even more picky, and ONLY re-ordered
rules where the prerequisites were also identical?

So, in my example above, it would work the same way as it does now
because the prerequisites were different.

I think that if we made this change, then your new modification would be
able to be turned on all the time and no switch would be required.  I
don't see ANY use in rules like this:

        %.o: %.c
        %-d.o: %.c

today, as the second one is by definition never used.  I'm OK with that
being enabled permanently, and telling people that if they have these
kinds of unused rules around causing problems, they should remove them.





reply via email to

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