You can use e.g. cog which puts the generated code into the file itself: http://nedbatchelder.com/code/cog/
Then all you need to do is to remember to run the preprocessor after you've made a change to the generator code.
But it still is a cludge. It would be better if C/C++ had a better preprocessor.