Re: [Vala] [ANNOUNCE] Vala 0.7.0 - Compiler for the GObject type system
- From: Andrea Del Signore <sejerpz tin it>
- To: Yu Feng <rainwoodman gmail com>
- Cc: vala-list gnome org
- Subject: Re: [Vala] [ANNOUNCE] Vala 0.7.0 - Compiler for the GObject type system
- Date: Mon, 06 Apr 2009 14:21:59 +0200
On Mon, 2009-04-06 at 01:52 -0400, Yu Feng wrote:
Hi Jürg,
On Sun, 2009-04-05 at 17:54 +0200, Jürg Billeter wrote:
We are pleased to announce version 0.7.0 of Vala, a compiler for the
GObject type system.
Vala 0.7.0 is now available for download at:
http://download.gnome.org/sources/vala/0.7/
Changes since 0.6.0
* Do not generate header files unless requested by the -H commandline
option. This requires changes in the build system of Vala projects.
Are there any references on how to port a project to the new header
schema?
Hi Yu,
this are my .02 cents on the argument because I tried to port Vtg just
yesterday. At the moment I didn't manage to compile it yet, but I think
that I'm hitting a vala bug and not a automake problem.
From what Jürg told me yesterday we have two main case: library and
programs.
The library is the most "complex" one (nothing really complex...) to
port and you need to do:
1) change the generated C source line
From:
vbftest_SOURCES = \
libvbf.vala.stamp \
$(vbftest_VALASOURCES:.vala=.c) \
$(vbftest_VALASOURCES:.vala=.h) \
$(NULL)
To:
vbftest_SOURCES = \
libvbf.vala.stamp \
$(vbftest_VALASOURCES:.vala=.c) \
$(NULL)
2) Add the -H switch to the valac compile line like in this example:
$(VALAC) $(DEBUG) -C -H vbf.h --library vbf-1.0 --vapidir ../vapi --pkg
gio-2.0 --pkg config --pkg vala-1.0 --pkg utils --basedir
$(top_srcdir)/vbf $^
Note the -H vbf.h, so the vala compiler will generate the vbf.h header
of all the exported (public) symbols
3) Add the generated header (vbf.h in this example) to the _HEADERS
automake directive:
noinst_HEADERS = \
vbf.h \
$(NULL)
The step 3 can be done in two variants, the above one is what I used for
an utility library statically linked with my app. The automake manual
says that for this case is better to include the vbf.h directly in the
_SOURCES but I haven't tried it yet.
The following snippet is taken from the libgee library included with the
vala sources and it's the other way of doing it:
geeincludedir = $(includedir)/vala-1.0
geeinclude_HEADERS = \
gee.h \
$(NULL)
Where gee.vala.stamp is defined in the BUILT_SOURCES directive as
always.
For programs only the first step should be required.
Hope this helps.
Cheers,
Andrea
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]