On Sat, 27 Apr 2024 at 20:36, Reuben Thomas <
rrt@sc3d.org> wrote:
Reuben, any chance you can whomp up a test for this patch?
No problem, I will do this when I can find a moment. Since I don't actually need this fix after all, it may not be quick!
I found a moment, but not a fix. In fact, a fix is not in general possible (or at least, not without a considerable amount of messing around). The problem is that the Vala compiler needs to be able to see all the symbols in the program, so you have to give it all the source files at once, so you can't give it source files that contain alternative (duplicate) definitions of the same symbol.
Hence, having conditionally-added sources like this is not compatible with shipping all C sources in the tarball, or to put it another way, with making the Vala compiler optional. But I think this is a great feature of Automake's Vala support! (Certainly, I believe it is unique.)
So if Automake had in future a mode where it shipped only Vala sources, then in that mode it would make sense to conditionally-include Vala sources, and that would work.
As a consolation, I attach another patch that fixes some English in comments in one of the Vala tests.