I also don't know a solution to that problem, other than doing it all by hand. I don't even know an easy and reliable solution to implement a "safeguard", such as a
static_assert that fires off and breaks the build when new enums are added and the two versions are out of sync by accident.
The only way is to wait and see until either someone complains that their Code::Blocks crashes or that an
enum doesn't do what it should do.
enum_max also won't work for non-contiguous enums, which we unluckily have.
It would be "kind of trivial" if we could run a script in a language that has easy regex, such as perl or python or php to generate these. Then one would only call that script once during build given a list with all headers that you want it to consider, generating the squirrel binding from the existing headers.
Unluckily, this adds a serious dependency. If we use e.g. perl for that and someone doesn't have it installed (or can't find an install package for their system), then they can't build Code::Blocks at all any more, which kind of sucks.