%% "Adrian Ashley" <[EMAIL PROTECTED]> writes: aa> Tried that:
Oh right. Duh. Need to remember to drink my morning tea before responding :). aa> I hesitate to call this a bug, as the documentation does say that aa> pattern rule matching proceeds until the first match and then aa> stops. But perhaps there's a case for arguing that if the effect aa> is only to set target- or pattern-specific variables, then all aa> patterns which match should do so cumulatively (perhaps excepting aa> terminal ones?) Not sure what you mean by "terminal ones" in this context, but I agree that stopping at the first pattern is perhaps not useful behavior for target-specific variable patterns. I'll think about this. aa> Or is there a Cunning Trick? Well, you can always fall back to old-fashioned recursive variables :) CC_GCC=gcc CC_OTHER=another-cc CFLAGS = -DBASIC foo-%.o : CFLAGS += -DVARIANT=FOO bar-%.o : CFLAGS += -DVARIANT=BAR gcc-CFLAGS = -DGCC other-CFLAGS = -DOTHERCC CCTYPE = $($(patsubst $*-%.o,%,$@)-CFLAGS) %-gcc.o: %.c $(CC_GCC) $(CCTYPE) $(CFLAGS) -o $@ -c $< %-other.o: %.c $(CC_OTHER) $(CCTYPE) $(CFLAGS) -o $@ -c $< -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://www.paulandlesley.org/gmake/ "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make