%% <[EMAIL PROTECTED]> writes: c> $(ALL_BLOCKS): c> @echo "the target is ->$@<-" c> ifeq ($@, $(filter $@, $(SOME_BLOCKS))) c> @echo "yes ->$@<=>$(filter $@, $(SOME_BLOCKS))<-" c> else c> @echo "no ->$@<=>$(filter $@, $(SOME_BLOCKS))<-" c> endif
You can't do that. Preprocessor commands like ifeq (as with the C preprocessor) are expanded as the makefile is parsed. Automatic variables like $@ are not valid until much later, when make tries to execute the command script. In this context $@ will ALWAYS be empty. You have to either use a shell if statement to test $@, or use the $(if ...) function inside the command script. -- ------------------------------------------------------------------------------- Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at: http://www.gnu.org http://make.paulandlesley.org "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
