Hi Ralf, On Thu, 2009-04-16 at 20:49 +0200, Ralf Wildenhues wrote: > * Jürg Billeter wrote on Wed, Apr 15, 2009 at 08:56:44PM CEST: > > On Wed, 2009-04-15 at 20:42 +0200, Ralf Wildenhues wrote: > > > or even > > > valac -C b.vala > > > valac -C e.vala > > > > This would not work, valac requires all Vala source files of the same > > program / library on the same commandline. The reason is that the source > > files can depend on each other, but there is no header/include > > mechanism. > > Hmm. What if I do something like this: > > bin_PROGRAMS = foo > foo_SOURCES = foo1.vala foo2.vala > foo_LDADD = libbar.a > noinst_LIBRARIES = libbar.a > libbar_a_SOURCES = bar1.vala bar2.vala > > How would valac cope with the necessarily separate invocations for > foo*.vala and bar*.vala? And what happens if you try to put vala > code into shared libraries, and use them from other vala code?
In this case you instruct valac to generate a bar.vapi and a bar.h file and use those files in the program by specifying libbar_a_VALAFLAGS = --library bar -H bar.h foo_VALAFLAGS = bar.vapi A .vapi file contains declarations for Vala libraries, similar to a .h file for C libraries. Thanks, Jürg