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.
Signed-off-by: Jürg Billeter <j...@bitron.ch> --- automake.in | 19 ++++++++++--------- tests/Makefile.am | 3 +-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/automake.in b/automake.in index 20ef3bd..be52505 100755 --- a/automake.in +++ b/automake.in @@ -815,7 +815,7 @@ register_language ('name' => 'header', register_language ('name' => 'vala', 'Name' => 'Vala', 'config_vars' => ['VALAC'], - 'flags' => ['VALAFLAGS'], + 'flags' => [], 'compile' => '$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)', 'ccer' => 'VALAC', 'compiler' => 'VALACOMPILE', @@ -5953,14 +5953,15 @@ sub lang_vala_finish_target ($$) 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); diff --git a/tests/Makefile.am b/tests/Makefile.am index afcfda8..d700608 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -4,8 +4,7 @@ XFAIL_TESTS = \ all.test \ auxdir2.test \ cond17.test \ -txinfo5.test \ -vala5.test +txinfo5.test include $(srcdir)/parallel-tests.am -- 1.6.3