On 11.05.2011 9:39, Ajay Jain wrote:
HI,
I am finding it difficult to comprehend and, or and not operations in
Make. What I would like to achieve is as follows:
ifeq ("X","A)&& ifeq("X","B) ..&& ifeq ("X","Z")
...
endif
I need some permutations of&&, ||& ! operations.
Though I do see the following in Manuals - $(or
condition1[,condition2[,condition3...]]), $(and
condition1[,condition2[,condition3...]]) but using them is a
challenge.
There are many solutions. But they look not so clear as in C-lang notations.
This for logical AND:
ifeq 'yes' '$(DEBUG)'
ifeq 'no' '$(OPTIM)'
...
endif
else
...
endif
For logical OR operation you can use variable with 2 values - one empty
(for false),
another anything (for true).
After evaluating COND == 1 if COND1 or COND2 == 1:
COND =
ifeq '' '$(COND1)'
COND = 1
endif
ifeq '' '$(COND2)'
COND = 1
endif
Or shortly:
ifneq '' '$(COND1)$(COND2)'
# here if COND1 or COND2 are true
endif
So tips you can found in http://gmsl.sourceforge.net/
--
С уважением, Александр Гавенко.
_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make