help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Enhancement of conditionals?


From: Shah, Bijal
Subject: RE: Enhancement of conditionals?
Date: Fri, 5 Mar 2004 13:26:51 -0000


The last mail wasn't quite ready... butterfingers :0

Bijal


The conditionals used make are very useful but can be difficult to work with where a variable might have a number of values.

Usually, this means you can be left with:

ifeq (0,$(FRED))
    FRED_PROCESS=$(call xxx,xxx)
then
ifeq (1,$(FRED))
    FRED_PROCESS=$(call yyy,yyy)
then
ifeq (2,$(FRED))
    FRED_PROCESS=$(call zzz,zzz)
then
    $(error FRED is not a value value.)
endif
endif
endif

This is quite difficult to maintain in some instants where the range of values for FRED is large.

I don't know if there is a better way of dealing with this using the syntax available today - any ideas anyone?

In the event of there being nothing, how possible would it be to add something approaching a "switch-case" like conditional added to make?

Maybe something like:

   caseeq (variable)
   in
      value pattern_1
         command_line_1
            . . .
         last_command_line
      endvalue
      value pattern_2
         command_line_1
            . . .
         last_command_line
      endvalue
      value pattern_3
         command_line_1
            . . .
         last_command_line
      endvalue
      value *
         command_1
            . . .
         last_command
      endvalue
   endcase


Opinions?
Bijal
=======================================================
Information contained in this email message is intended only for
use of the individual or entity named above. If the reader of this
message is not the intended recipient, or the employee or agent
responsible to deliver it to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please immediately notify us by email
to address@hidden and destroy the original message.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]