On Fri, 2012-03-23 at 08:05 -0700, Mark Galeck (CW) wrote: > This works: > .PHONY: foobar% > OBJS := foobar0 foobar1 > > %: $(filter $*%,$(OBJS)) > @echo $@: $^ > > $(MAKEFILE_LIST) $(OBJS): ;
I guess that depends on what you mean by "works". The $* here evaluates to the empty string since automatic variables are not valid anywhere but inside recipes. So, $(filter %,$(OBJS)) obviously matches everything. But since OBJS only contains things that you want to match, you don't notice. If you changed your OBJS value to include something that didn't match the pattern you'd definitely see that it didn't work :-) _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
