[Top][All Lists]

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

bug#44010: Per-compilation C files

From: Reuben Thomas
Subject: bug#44010: Per-compilation C files
Date: Thu, 15 Oct 2020 13:06:19 +0100

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.

The use case is a Vala file directly translated from a C file, which contains a test bracketed with #if TEST … #endif.

In the C version of the project I have:

TESTS = estr
estr_CPPFLAGS = …
estr_LDADD = …

as well as

zile_SOURCES = … estr.c …

for the main program, and for the test program, automake generates a rule for estr-estr.$(OBJEXT).

In the Vala version, I have

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 …

A quick look at `automake.in` suggests that the problem is that this intelligence applies specifically to object files, rather than to arbitrary compilation steps?


reply via email to

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