bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70557: Fix compilation of Vala files conditionally added to _SOURCES


From: Reuben Thomas
Subject: bug#70557: Fix compilation of Vala files conditionally added to _SOURCES
Date: Mon, 29 Apr 2024 00:06:31 +0200

On Sat, 27 Apr 2024 at 20:36, Reuben Thomas <rrt@sc3d.org> wrote:
On Sat, 27 Apr 2024 at 00:53, Karl Berry <karl@freefriends.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.

I guess it is worth documenting this limitation of the current Vala support. If you agree with my reasoning above, then I will prepare a documentation patch based on it.

--
https://rrt.sc3d.org

Attachment: 0002-vala-fix-some-English-in-test-comments.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]