specenum generator: Meson integration
Should this be further split to two; meson and autotools builds.
That would add complications; once the headers are generated automatically, we'd want to .gitignore them, but we can only do that once they're part of every build. Could still split it, but that would add a transitional period where they're auto-generated in one build, but still under version control.
Meson based build should place generated files to the builddir anyway, so I think we could do that (separately) first.
It's a bit shaky setup where meson build needs to use copy from builddir, despite another (possibly out-of-date) copy being in srcdir, but that's not much different from what we need to have in the future, and what we already have with generate_packets.py outputs. Even when files are not in the git repository, any autotools build (or unpacking from a tarball) places them there.
PoC, or, better-than-nothing implementation for meson attached. Assigning ticket to alienvalkyrie, as it's her call how to go forward.
Figured it'll be worth it later to put in the time and effort now for a system that's easily extendable — I'm defining the custom targets in a loop, so each extra def file added in the future only needs one extra line a la 'extras_enums': ['extras_enums.def', 'extras_enums_gen.h'], rather than copy&pasting the whole thing and adding references in multiple places. We've got about forty files to migrate, so this'll pay off.
Also I decided that yeah, we'll do autotools in a separate ticket ~> #48806
NB: Patch depends on #48785 since it includes the enums for freeciv-manual. The patch file itself might also textually depend on other patches (or rather, lack thereof) for the context lines (specifically the end of the manual sources list, which is affected by some other pending patches), but git should handle that without problem when the actual commits are being merged.
Part of #48675. Follow-up to #48702. Call the new script automatically as part of the build to generate the headers.
This ticket is for the meson build only; see discussion below. Autotools is handled in #48806