automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] Vala: Fix build when using per-target VALAFLAGS


From: Jürg Billeter
Subject: [PATCH 1/3] Vala: Fix build when using per-target VALAFLAGS
Date: Fri, 15 May 2009 15:50:55 +0200

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 <address@hidden>
---
 automake.in       |   19 ++++++++++---------
 tests/Makefile.am |    3 +--
 tests/Makefile.in |    3 +--
 3 files changed, 12 insertions(+), 13 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
 
diff --git a/tests/Makefile.in b/tests/Makefile.in
index ce8e779..bc77d23 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -229,8 +229,7 @@ XFAIL_TESTS = \
 all.test                                       \
 auxdir2.test                                   \
 cond17.test                                    \
-txinfo5.test                                   \
-vala5.test
+txinfo5.test
 
 parallel_tests = \
 check-p.test \
-- 
1.6.3






reply via email to

[Prev in Thread] Current Thread [Next in Thread]