[gnome-builder] autotools: override LANG for make all target



commit 04575ec6910c4963d7a95ede2e2945d7eb57a9f1
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jan 28 12:59:59 2018 -0800

    autotools: override LANG for make all target
    
    We need this to be in LANG=C so that we can parse the directory changes
    as the build proceeds. Otherwise, we cannot reliably locate the directory
    containing files with diagnostics.

 src/plugins/autotools/ide-autotools-make-stage.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
---
diff --git a/src/plugins/autotools/ide-autotools-make-stage.c 
b/src/plugins/autotools/ide-autotools-make-stage.c
index fddafdb22..8d77f8d9b 100644
--- a/src/plugins/autotools/ide-autotools-make-stage.c
+++ b/src/plugins/autotools/ide-autotools-make-stage.c
@@ -131,6 +131,18 @@ create_launcher (IdeAutotoolsMakeStage  *self,
 
   ide_subprocess_launcher_push_argv (launcher, make_target);
 
+  /*
+   * When doing the "make all" target, we need to force LANG=C so that
+   * we can parse the directory changes (Entering directory foo). Otherwise,
+   * we can't really give users diagnostics that are in the proper directory.
+   */
+  if (dzl_str_equal0 ("all", make_target))
+    {
+      ide_subprocess_launcher_setenv (launcher, "LANG", "C", TRUE);
+      ide_subprocess_launcher_setenv (launcher, "LC_ALL", "C", TRUE);
+      ide_subprocess_launcher_setenv (launcher, "LC_MESSAGES", "C", TRUE);
+    }
+
   return g_steal_pointer (&launcher);
 }
 


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