This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

code generation using the C preprocessor and CCS



I'm using X-macros to generate code, both struct definitions and code which refers to the structs.

If you haven't heard of the X-macros technique, it's essentially using the C preprocessor itself as a limited code generator. Here's a reference from Dr Dobbs:
http://drdobbs.com/184401387

This all works fine except that CCS doesn't understand the X-macros, and so the struct definitions aren't available when navigating the project (Open Declaration). I'm thinking I could solve this by running the C preprocessor first by itself to generate C code. Then the output would be compiled along with other source. How would I go about setting up CCS to do run the C preprocessor before compiling its output?

I'm tempted to run the preprocessor manually but that has the disadvantage that a team-mate might modify the output, rather than the source.