(automake-1.16.info)Vala Support


Next: Support for Other Languages Prev: Java Support with gcj Up: Programs
Enter node , (file) or (file)node

8.17 Vala Support
=================

Automake provides initial support for Vala
(<http://www.vala-project.org/>).  This requires valac version 0.7.0 or
later, and currently requires the user to use GNU ‘make’.

     foo_SOURCES = foo.vala bar.vala zardoc.c

   Any ‘.vala’ file listed in a ‘_SOURCES’ variable will be compiled
into C code by the Vala compiler.  The generated ‘.c’ files are
distributed.  The end user does not need to have a Vala compiler
installed.

   Automake ships with an Autoconf macro called ‘AM_PROG_VALAC’ that
will locate the Vala compiler and optionally check its version number.

 -- Macro: AM_PROG_VALAC ([MINIMUM-VERSION], [ACTION-IF-FOUND],
     [ACTION-IF-NOT-FOUND]) Search for a Vala compiler in ‘PATH’.  If it
     is found, the variable ‘VALAC’ is set to point to it (see below for
     more details).  This macro takes three optional arguments.  The
     first argument, if present, is the minimum version of the Vala
     compiler required to compile this package.  If a compiler is found
     and satisfies MINIMUM-VERSION, then ACTION-IF-FOUND is run (this
     defaults to do nothing).  Otherwise, ACTION-IF-NOT-FOUND is run.
     If ACTION-IF-NOT-FOUND is not specified, the default value is to
     print a warning in case no compiler is found, or if a too-old
     version of the compiler is found.

   There are a few variables that are used when compiling Vala sources:

‘VALAC’
     Absolute path to the Vala compiler, or simply ‘valac’ if no
     suitable compiler Vala could be found at configure runtime.

‘VALAFLAGS’
     Additional arguments for the Vala compiler.

‘AM_VALAFLAGS’
     The maintainer’s variant of ‘VALAFLAGS’.

          lib_LTLIBRARIES = libfoo.la
          libfoo_la_SOURCES = foo.vala

   Note that currently, you cannot use per-target ‘*_VALAFLAGS’ (Note:
Renamed Objects) to produce different C files from one Vala source
file.


automatically generated by info2www version 1.2.2.9