[PATCH] automake: avoid harmful directory change before invoking valac

Yanko Kaneti <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <[email protected]>
The current am__cd right before invoking valac invalidates
any relative flags setup done before that.

https://bugzilla.gnome.org/show_bug.cgi?id=740825
---
 bin/automake.in | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/automake.in b/bin/automake.in
index 4cee0d0..3082207 100644
--- a/bin/automake.in
+++ b/bin/automake.in
@@ -5476,6 +5476,7 @@ sub lang_vala_finish_target
   my $silent = silent_flag ();
   my $stampfile = "\$(srcdir)/${derived}_vala.stamp";
 
+  map { !/^\// && ($_ = "\$(srcdir)\/" . $_) } @vala_sources;
   $output_rules .=
     "\$(srcdir)/${derived}_vala.stamp: @vala_sources\n".
 # Since the C files generated from the vala sources depend on the
@@ -5485,7 +5486,7 @@ sub lang_vala_finish_target
 # Thus we need to create the stamp file *before* invoking valac, and to
 # move it to its final location only after valac has been invoked.
     "\t${silent}rm -f \$\@ && echo stamp > \$\@-t\n".
-    "\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n".
+    "\t${verbose}$compile -d \$(srcdir) @vala_sources\n".
     "\t${silent}mv -f \$\@-t \$\@\n";
 
   push_dist_common ($stampfile);
-- 
2.2.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.