[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: complex gmake conditionals: NOT ( ifndef(arg1) AND ifdef(arg2) )
From: |
Noel Yap |
Subject: |
Re: complex gmake conditionals: NOT ( ifndef(arg1) AND ifdef(arg2) ) |
Date: |
Wed, 19 May 2004 16:13:11 -0400 |
User-agent: |
Mozilla Thunderbird 0.5 (Windows/20040212) |
Boris Kolpackov wrote:
<address@hidden> writes:
But what do I do with something like
#if ! ( (defined ( val3 ) ) || ( ! defined (val4) ) )
key2 val5
#endif
ifeq ($(val3)$(if $(val4),,t),)
I created logical functions (ie and, not, or, xor) to make this kind of thing a
little more legible so the above becomes:
ifneq ($(call logical-not,$(call logical-or,$(val3),$(call
logical-not,$(val4)))),) # I did say a /little/ more legible. OTOH, it may
be less legible depending on your tastes.
endif
or, if you want it simplified:
ifneq ($(call logical-and,$(call logical-not,$(val3)),$(val4)),)
endif
I'll leave it as an exercize to the reader to implement them for themselves :-)
Noel