|
From: | chuckbox70-mailinglist |
Subject: | confusing ifeq behavior |
Date: | Tue, 6 Sep 2005 08:54:49 -0700 (PDT) |
Hi,
I am seeing what appears to be a false positive with the 'ifeq' conditional in make. An example of the problem can be reproduced in the following snippette:
ALL_BLOCKS := a b c d e
SOME_BLOCKS := c d
$(ALL_BLOCKS):
@echo "the target is ->$@<-"
ifeq ($@, $(filter $@, $(SOME_BLOCKS)))
@echo "yes ->$@<=>$(filter $@, $(SOME_BLOCKS))<-"
else
@echo "no ->$@<=>$(filter $@, $(SOME_BLOCKS))<-"
endif
Basically i am trying to check if the given letter is in a subset of the full list of letters.
make d
the target is ->d<-
yes ->d<=>d<-
make a
the target is ->a<-
yes ->a<=><-
I have tried many variations in syntax without success. Can anyone explain this?
thanks,
-chuck
[Prev in Thread] | Current Thread | [Next in Thread] |