I have been redisigning my companies make system and recently ran into a
limitation. I believe there must be a better way and would appreciate it if
someone could help me out.
I frequesntly test a given macro for one of several values, then do a
different action depending of the value of the macro. In C\C++ I would use a
switch statement, in make I am force to a series of ifeq commands, as below.
Is there a better way?
#(from command line)
FOO == three
#(much later)
ifneq ($(FOO),)
ifeq ($(FOO),one)
FOO = 1
else # FOO == one
ifeq ($(FOO),two)
FOO = 2
else # FOO == two
if ($(FOO),three)
FOO = 3
else
FOO = 4
endif # FOO == two
endif # FOO == one
endif # FOO != NULL
_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make