Hello,
How do I write if-else-if condition (or nested if condition) in Makefile.am?
Code:
if NEWLIB_NANO_FORMATTED_IO
LIBADD_OBJS = \
$(lpfx)nano-vfprintf_float.$(oext) \
$(lpfx)nano-svfprintf.$(oext) \
..
else if NEWLIB_FORMATTED_IO
LIBADD_OBJS = \
$(lpfx)newlib-vfprintf.$(oext) $(lpfx)newlib-vfprintf_longdouble.$(oext) \
else
LIBADD_OBJS = \
..
$(lpfx)svfiwscanf.$(oext) $(lpfx)svfwscanf.$(oext) \
$(lpfx)vfiwscanf.$(oext) $(lpfx)vfwscanf.$(oext)
endif
Error:
stdio/Makefile.am:219: LIBADD_OBJS multiply defined in condition
NEWLIB_NANO_FORMATTED_IO ...
stdio/Makefile.am:202: ... `LIBADD_OBJS' previously defined here
stdio/Makefile.am:222: LIBADD_OBJS multiply defined in condition
NEWLIB_NANO_FORMATTED_IO ...
stdio/Makefile.am:219: ... `LIBADD_OBJS' previously defined here
Please help resolve.
Thanks,
Deepa