OK, I'm really not a macro guy. I started fooling around trying to write one, and all those %, &, ! symbols, substitution, things magically turning into other things, etc., just about made my head explode.
So I'm seeking your help. Here's what I want to do. Given a list of identifiers and associated numbers like so:
<IMAGE_REL_ARM_MOV32, 2>
<IMAGE_REL_ARM_SECREL, 3>
<IMAGE_REL_ARM_SECTION, 4>
<IMAGE_REL_ARM_BRANCH11,5>
*
I'd like to see the following as output:
IMAGE_REL_ARM_MOV32 equ 2
IMAGE_REL_ARM_SECREL equ 3
IMAGE_REL_ARM_SECTION equ 4
IMAGE_REL_ARM_BRANCH11 equ 5
(Actually the output would ideally be in the form of ECHO statements, so the output could be redirected to a text fiile.)
I also need to be able to separate the identifiers (like IMAGE_REL_ARM_MOV32) and be able to use them in a conditional statement to see if they're already defined:
IFNDEF (identifier)
... do something
... do something else
ENDIF
* The angle brackets around these are just a guess as to how to format these. May not be needed at all. I'm assuming these would be fed into a FOR loop.