[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ifeq ($(VAR), value1) OR ($(VAR), value2)
From: |
Noel Yap |
Subject: |
Re: ifeq ($(VAR), value1) OR ($(VAR), value2) |
Date: |
Tue, 20 Apr 2004 09:19:03 -0400 |
User-agent: |
Mozilla Thunderbird 0.5 (Windows/20040212) |
I know it's not pretty, but how about:
ifeq ($(VAR),value1)
tmp := 1
endif
ifeq ($(VAR),value2)
tmp := 1
endif
ifeq ($(tmp),1)
...
endif
Alternatively, you might be able to do:
and = $(if $(1),$(if $(2),1))
ifequal = $(if $(call and,$(filter 1,$(words $(1))),$(filter $(2),$(1))))
ifeq ($(call and,$(call ifequal,$(VAR),value1),$(call ifequal,$(VAR),value2))))
...
endif
I haven't tested the above and chances are there's some parentheses that are
off, but it should work with some tweaking.
HTH,
Noel
address@hidden wrote:
Hi all,
I am currntly writing a makefile and I would like to do the following :
ifeq ($(VAR), value1) OR ($(VAR), value2)
..........
..........
..........
endif
And I haven't find any "multiple" conditional syntax in the GNU make
manual... (chap 7)
Is it possible ? and what is the syntax ?
Thank you very much for your precious help !
Peio
:.________________
CONFIDENTIALITE : Ce message et les éventuelles pièces attachées sont
confidentiels. Si vous n'êtes pas dans la liste des destinataires,
veuillez informer l'expéditeur immédiatement et ne pas divulguer le
contenu à une tierce personne, ne pas l'utiliser pour quelque raison que
ce soit, ne pas stocker ou copier l'information qu'il contient sur un
quelconque support.
CONFIDENTIALITY : This e-mail and any attachments are confidential
and may be privileged. If you are not a named recipient, please notify
the sender immediately and do not disclose the contents to another
person, use it for any purpose or store or copy the information in any
medium.
------------------------------------------------------------------------
_______________________________________________
Help-make mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/help-make