Hello See attached v2, which uses a meson-integrated version while only duplicating some of the code (and adding some python scripts).
It uses static libraries, at first I tried to exclude it from the default build and add it as a test dependency, so it only gets built as part of `meson test` (but only once). I had multiple problems with this: * Meson before 1.7 ignores this and builds it anyway * Doing it in 2 steps is significantly slower than everything together, I guess it's better if the minimal work and real work compilations get mixed together. On my laptop, meson build time went from ~7 seconds to ~10 seconds with headerscheck enabled, and I didn't see any difference in configuration time. I also added a configuration flag for it in case somebody wants to disable it, or if it's slower in other environments, but it is enabled by default. The header-guessing part is duplicated instead of using a common configuration file as that seemed smaller overall. The python code is a bit uglier because it uses chained ifs - I'm not sure what's the minimum python version the postgres builds officially requires? The current meson version depends only on 3.6, so I didn't want to use pattern matching. Compared to headerscheck, this build can't use -fsyntax-only because meson needs build artifacts - but those are basically empty, so it shouldn't matter that much. And thanks to ninja, it's parallel! What do you think?
v2-0001-Integrate-headerscheck-into-the-meson-build.patch
Description: Binary data
