[gnome-builder/gnome-builder-3-24] pipeline: translate relative paths for out-of-tree builds
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/gnome-builder-3-24] pipeline: translate relative paths for out-of-tree builds
- Date: Sat, 25 Mar 2017 02:56:01 +0000 (UTC)
commit 04ceeba4abbb4120758b7eff7df4e526a7812d3b
Author: Christian Hergert <chergert redhat com>
Date: Fri Mar 24 19:47:46 2017 -0700
pipeline: translate relative paths for out-of-tree builds
If we are building out of tree, we will get a path that is based on the
build directory. Instead, we need a path that is relative to the project
root. This will simply trim off the builddir prefix from the path to get
that effect.
https://bugzilla.gnome.org/show_bug.cgi?id=780467
libide/buildsystem/ide-build-pipeline.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/libide/buildsystem/ide-build-pipeline.c b/libide/buildsystem/ide-build-pipeline.c
index ae09b97..32a8a19 100644
--- a/libide/buildsystem/ide-build-pipeline.c
+++ b/libide/buildsystem/ide-build-pipeline.c
@@ -495,6 +495,15 @@ ide_build_pipeline_log_observer (IdeBuildLogStream stream,
gssize len;
enterdir += IDE_LITERAL_LENGTH (ENTERING_DIRECTORY_BEGIN);
+
+ /* Translate to relative paths for out-of-tree builds */
+ if (g_str_has_prefix (enterdir, self->builddir))
+ {
+ enterdir += strlen (self->builddir);
+ if (*enterdir == G_DIR_SEPARATOR)
+ enterdir++;
+ }
+
len = strlen (enterdir) - IDE_LITERAL_LENGTH (ENTERING_DIRECTORY_END);
if (len > 0)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]