tags:

views:

10

answers:

0

Anyone know how to write an m4 macro to accepts an arbitrary list of parameters?

Here is an example for what I want to implement:

ADD_OBJECTS_TO_LAYOUT(`LAYOUT_1', (`OBJ_ID_SQUARE', `COLOR_ID_RED'))
ADD_OBJECTS_TO_LAYOUT(`LAYOUT_2', (`OBJ_ID_SQUARE', `COLOR_ID_RED'), (`OBJ_ID_CIRCLE', `COLOR_ID_GREEN'))
ADD_OBJECTS_TO_LAYOUT(`LAYOUT_3', (`OBJ_ID_CIRCLE', `COLOR_ID_GREEN'), (`OBJ_ID_CIRCLE', `COLOR_ID_BLUE'), (`OBJ_ID_TIRANGLE', `COLOR_ID_RED'))