My idea was to generate simple source files for each header in the build directory, and then include everything into one or more static libraries. The tricky part could be handling generated headers, but I think that shouldn't be too much of a problem.
Originally I decided against this version because I thought that I had to somehow duplicate the list of special cases, but now I realized that I could refactor the list of special files into a separate file that gets loaded by both meson and the bash script - I'll look at this approach once more, maybe it will work.
