Can anyone suggest a way to accomplish multiple pattern-specific variable assignments? This fragment illustrates what I'm trying to do.
----------snip---------- CC_GCC=gcc CC_OTHER=another-cc CFLAGS = -DBASIC foo-%.o : CFLAGS += -DVARIANT=FOO bar-%.o : CFLAGS += -DVARIANT=BAR %-gcc.o : CFLAGS += -DGCC %-other.o : CFLAGS += -DOTHERCC %-gcc.o: %.c $(CC_GCC) $(CFLAGS) -o $@ -c $< %-other.o: %.c $(CC_OTHER) $(CFLAGS) -o $@ -c $< ----------snip---------- $ make foo-gcc.o gcc -DBASIC -DVARIANT=FOO -o foo-gcc.o -c foo.c What happens is that only the first matching pattern is used to append to CFLAGS - as you'd expect from the documentation and from previous threads on this list. Is there any way to do this kind of thing? Thanks, -- Adrian Ashley [EMAIL PROTECTED] _______________________________________________ Help-make mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/help-make