[gnome-builder] autotools: give configure and make a stdin pipe



commit b4f719b0273121e25a020cfb801d3f7a343bf5a6
Author: Christian Hergert <chergert redhat com>
Date:   Wed Mar 15 00:12:17 2017 -0700

    autotools: give configure and make a stdin pipe
    
    Sometimes libtool wants stdin (doing things like <0) so we need to pass in
    a valid stdin rather than /dev/null.

 plugins/autotools/ide-autotools-make-stage.c     |    5 +++++
 plugins/autotools/ide-autotools-pipeline-addin.c |    9 ++++++---
 2 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/plugins/autotools/ide-autotools-make-stage.c b/plugins/autotools/ide-autotools-make-stage.c
index 59432e1..79b97e2 100644
--- a/plugins/autotools/ide-autotools-make-stage.c
+++ b/plugins/autotools/ide-autotools-make-stage.c
@@ -102,6 +102,11 @@ create_launcher (IdeAutotoolsMakeStage  *self,
   if (NULL == (launcher = ide_build_pipeline_create_launcher (pipeline, error)))
     return NULL;
 
+  ide_subprocess_launcher_set_flags (launcher,
+                                     G_SUBPROCESS_FLAGS_STDIN_PIPE |
+                                     G_SUBPROCESS_FLAGS_STDOUT_PIPE |
+                                     G_SUBPROCESS_FLAGS_STDERR_PIPE);
+
   ide_subprocess_launcher_push_argv (launcher, self->make);
 
   /* Force disable previous V=1 that might be set by environment
diff --git a/plugins/autotools/ide-autotools-pipeline-addin.c 
b/plugins/autotools/ide-autotools-pipeline-addin.c
index f08575a..bd69784 100644
--- a/plugins/autotools/ide-autotools-pipeline-addin.c
+++ b/plugins/autotools/ide-autotools-pipeline-addin.c
@@ -174,11 +174,14 @@ register_configure_stage (IdeAutotoolsPipelineAddin  *self,
   g_assert (IDE_IS_AUTOTOOLS_PIPELINE_ADDIN (self));
   g_assert (IDE_IS_BUILD_PIPELINE (pipeline));
 
-  launcher = ide_build_pipeline_create_launcher (pipeline, error);
-
-  if (launcher == NULL)
+  if (NULL == (launcher = ide_build_pipeline_create_launcher (pipeline, error)))
     return FALSE;
 
+  ide_subprocess_launcher_set_flags (launcher,
+                                     G_SUBPROCESS_FLAGS_STDIN_PIPE |
+                                     G_SUBPROCESS_FLAGS_STDOUT_PIPE |
+                                     G_SUBPROCESS_FLAGS_STDERR_PIPE);
+
   configure_path = ide_build_pipeline_build_srcdir_path (pipeline, "configure", NULL);
   ide_subprocess_launcher_push_argv (launcher, configure_path);
 


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