Re: [Vala] Vala support for automake
- From: Yu Feng <rainwoodman gmail com>
- To: Jürg Billeter <j bitron ch>
- Cc: Ralf Wildenhues <Ralf Wildenhues gmx de>, vala-list gnome org, automake-patches gnu org
- Subject: Re: [Vala] Vala support for automake
- Date: Sat, 25 Apr 2009 21:51:50 -0400
Is it possible to also add valadoc support in automake together with
vala support?
Yu
On Thu, 2009-04-16 at 21:19 +0200, Jürg Billeter wrote:
On Thu, 2009-04-16 at 21:09 +0200, Ralf Wildenhues wrote:
* Jürg Billeter wrote on Thu, Apr 16, 2009 at 09:02:30PM CEST:
On Thu, 2009-04-16 at 20:49 +0200, Ralf Wildenhues wrote:
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.
How is the semantic relationship between the .vapi name and its library?
s/^lib//; s/\.a$//; s/$/.vapi/ ?
What about shared libraries, do they have .vapi's, too?
Yes, shared libraries have .vapi files, too. They are installed
into /usr/share/vala/vapi/ by default.
The .so name and the .vapi name do not need to match in any way, the
convention for shared libraries is to use the pkg-config name, if
applicable. When writing the .vapi file, the compiler just uses the
argument of the --library option and appends .vapi.
What if I want to build one big shared (or static) library from a set of
convenience archives (uninstalled .a libraries with PIC code)? Do you
have means to generate a .vapi for the big library from the .vapi's of
the several small ones (plus maybe a couple of loose objects, too)?
That's where it starts getting a bit tricky. While generating the
big .vapi file is as simple as concatenating the .vapi files of the
convenience libraries, I don't know how we can avoid a manual `cat' rule
without making it a lot more complex.
Thanks,
Jürg
_______________________________________________
Vala-list mailing list
Vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]