On Thu, 15 Oct 2020 at 13:06, Reuben Thomas <r...@sc3d.org> wrote: > I've recently started using automake with Vala; it works very well! I'm > particularly impressed that the "make dist" rules include the C files, so > that the builder doesn't need a Vala compiler. > > There's one nit: I want to make multiple .c files from the same .vala > file, analogous to the way that you can make multiple .o files from the > same .c file, and it doesn't seem to work: automake generates two sets of > rules for the same .c file instead. >
I just noticed that in fact there seems to be a bug (or at least something I don't understand how to use!) in the Vala rules. In my case that I mentioned before: TESTS = estr > estr_SOURCES = estr.vala # so that automake doesn't try to just compile > estr.c > estr_VALAFLAGS = … > estr_CPPFLAGS = … > estr_LDFLAGS = … > > as well as > > zile_SOURCE = … estr.vala … > estr.vala is used twice. This causes two Makefile rules for estr.c to be generated, which conflict. Importantly, they satisfy different stamp files, so they could cause the file not to be rebuilt for one target. I guess I could work around this by building estr.vala into a library that is used by both its targets, but that seems a little convoluted; is there something I'm missing? -- https://rrt.sc3d.org