summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-10-31 12:41:13 +0100
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-10-31 12:41:13 +0100
commit153f861b91221d14842c495efa0b1f10d9455855 (patch)
treea73c27f5ffc6738074613051c8bfaf371b1a5833 /doc
parent0faf1588b9e820c20351c92afa44c9d0e8a3a412 (diff)
parent0494881b53d6a125c1e4feeb03101de351085a1b (diff)
downloadautomake-153f861b91221d14842c495efa0b1f10d9455855.tar.gz
Merge branch 'maint'
* maint: vala tests: source test-init.sh, not ./defs tests: fix a spurious typo-related failure tests: remove spurious leftover use of 'Exit' tests: can check our recipes avoid trailing backslashes vala: improve comments to AM_PROG_VALAC news: update w.r.t. recent vala changes vala: if no proper compiler found, set $(VALAC) to 'valac' vala: AM_PROG_VALAC should not produce an error for tool-old valac docs: document recent changes to AM_PROG_VALAC tests: enhance tests on AM_PROG_VALAC vala: style fixes in vala.m4 vala: add action arguments, for when no proper vala compiler is found Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r--doc/automake.texi26
1 files changed, 15 insertions, 11 deletions
diff --git a/doc/automake.texi b/doc/automake.texi
index 40d3fc0b7..0118a2125 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -6839,28 +6839,32 @@ foo_SOURCES = foo.vala bar.vala zardoc.c
@end example
Any @file{.vala} file listed in a @code{_SOURCES} variable will be
-compiled into C code by the Vala compiler. The generated @file{.c} files are
-distributed. The end user does not need to have a Vala compiler installed.
+compiled into C code by the Vala compiler. The generated @file{.c} files
+are distributed. The end user does not need to have a Vala compiler installed.
Automake ships with an Autoconf macro called @code{AM_PROG_VALAC}
that will locate the Vala compiler and optionally check its version
number.
-@defmac AM_PROG_VALAC (@ovar{minimum-version})
-Try to find a Vala compiler in @env{PATH}. If it is found, the variable
-@code{VALAC} is set. Optionally a minimum release number of the compiler
-can be requested:
-
-@example
-AM_PROG_VALAC([0.7.0])
-@end example
+@defmac AM_PROG_VALAC (@ovar{minimum-version}, @ovar{action-if-found},
+ @ovar{action-if-not-found})
+Search for a Vala compiler in @env{PATH}. If it is found, the variable
+@code{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 @var{minimum-version},
+then @var{action-if-found} is run (this defaults to do nothing).
+Otherwise, @var{action-if-not-found} is run. If @var{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.
@end defmac
There are a few variables that are used when compiling Vala sources:
@vtable @code
@item VALAC
-Path to the Vala compiler.
+Absolute path to the Vala compiler, or simply @samp{valac} if no
+suitable compiler Vala could be found at configure runtime.
@item VALAFLAGS
Additional arguments for the Vala compiler.