Adding C-preprocessor to build chain?
I don't want to get into a philosophical debate about the value/dangers of the C-preprocessor macros. I strongly believe they are a dangerous power tool, like an electric circular saw compared to a hand saw. But they are the ONLY why to get significant compile time processing accomplished. There are many things I could elaborate that are good and powerful usages that cannot be done with out C-preprocessor like macros.
Is there a way to hook a process, pre-build, that could be integrated to run the c-preprocessor? It would bring real compile time arbitrary computation to the table. I have done it before with C# using make files in a non-Unity context but I would really like to have it be built into my Unity environment so that the debugging and compiling in the editor would just do the pre-processing.
Any ideas? (And please don't talk about static classes etc. I can give examples where those do not work if you really want.)