+2009-05-17 Jürg Billeter <j@bitron.ch>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Vala: Fix build when using per-target VALAFLAGS.
+ This does not yet implement full per-target support for VALAFLAGS,
+ however, this change at least fixes building when there is only one
+ target per source file, which is the most common situation.
+ * automake.in: Remove `VALAFLAGS' from `flags' in language struct.
+ (lang_vala_finish_target): Handle `*_VALAFLAGS rewriting' manually
+ here; check `VALAFLAGS' user variables.
+ * tests/Makefile.am (XFAIL_TESTS): Remove vala5.test.
+ * doc/automake.texi (Vala Support): Document per-target flag
+ limitations.
+
2009-05-11 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
For PR automake/540:
register_language ('name' => 'vala',
'Name' => 'Vala',
'config_vars' => ['VALAC'],
- 'flags' => ['VALAFLAGS'],
+ 'flags' => [],
'compile' => '$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)',
'ccer' => 'VALAC',
'compiler' => 'VALACOMPILE',
my $compile = $self->compile;
- # Rewrite each occurrence of `AM_$flag' in the compile
- # rule into `${derived}_$flag' if it exists.
- for my $flag (@{$self->flags})
- {
- my $val = "${derived}_$flag";
- $compile =~ s/\(AM_$flag\)/\($val\)/
- if set_seen ($val);
- }
+ # Rewrite each occurrence of `AM_VALAFLAGS' in the compile
+ # rule into `${derived}_VALAFLAGS' if it exists.
+ my $val = "${derived}_VALAFLAGS";
+ $compile =~ s/\(AM_VALAFLAGS\)/\($val\)/
+ if set_seen ($val);
+
+ # VALAFLAGS is a user variable (per GNU Standards),
+ # it should not be overridden in the Makefile...
+ check_user_variables ['VALAFLAGS'];
my $dirname = dirname ($name);
@end example
@end vtable
+Note that currently, you cannot use per-target @code{*_VALAFLAGS}
+(@pxref{Renamed Objects}) to produce different C files from one Vala
+source file.
+
@node Support for Other Languages
@comment node-name, next, previous, up