Supposing I have:
#define foo 1 #define bar 1
#define foo 0
How can I generate a merged.h that looks like this, given I want app.h to redefine anything already defined in sdk.h:
#define foo 0 #define bar 1
One approach might be "don't do this, just let the preprocessor do it for you". I've tried that and it's not going to work for my situation I don't think. I'm really looking for an approach using a basic shell script.