[gnome-builder] build: allow using style-schemes out of tree



commit a78ee843e53d7725daf1ebda1503cda2b875af14
Author: Christian Hergert <christian hergert me>
Date:   Thu Jan 21 11:39:20 2016 -0800

    build: allow using style-schemes out of tree
    
    When using our `make run` and associated helpers, we should also use the
    style schemes from in-tree, preferred over installed style-schemes.

 Makefile.am              |    4 ++++
 libide/Makefile.am       |    1 +
 libide/ide-application.c |    4 ++++
 3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 94bf34f..aa02f9d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -74,6 +74,7 @@ run:
        PEAS_DEBUG=1 \
        GB_IN_TREE_PLUGINS=1 \
        GB_IN_TREE_FONTS=1 \
+       GB_IN_TREE_STYLE_SCHEMES=1 \
        GI_TYPELIB_PATH="libide:$(GI_TYPELIB_PATH)" \
        GOBJECT_DEBUG=instance-count \
        PATH=$(top_builddir)/src:${PATH} \
@@ -83,6 +84,7 @@ strace:
        PEAS_DEBUG=1 \
        GB_IN_TREE_PLUGINS=1 \
        GB_IN_TREE_FONTS=1 \
+       GB_IN_TREE_STYLE_SCHEMES=1 \
        GI_TYPELIB_PATH="libide:$(GI_TYPELIB_PATH)" \
        GOBJECT_DEBUG=instance-count \
        PATH=$(top_builddir)/src:${PATH} \
@@ -92,6 +94,7 @@ debug:
        PEAS_DEBUG=1 \
        GB_IN_TREE_PLUGINS=1 \
        GB_IN_TREE_FONTS=1 \
+       GB_IN_TREE_STYLE_SCHEMES=1 \
        GI_TYPELIB_PATH="libide:$(GI_TYPELIB_PATH)" \
        G_DEBUG=fatal-criticals \
        GOBJECT_DEBUG=instance-count \
@@ -102,6 +105,7 @@ valgrind:
        PEAS_DEBUG=1 \
        GB_IN_TREE_PLUGINS=1 \
        GB_IN_TREE_FONTS=1 \
+       GB_IN_TREE_STYLE_SCHEMES=1 \
        GI_TYPELIB_PATH="libide:$(GI_TYPELIB_PATH)" \
        G_DEBUG=fatal-criticals \
        G_SLICE=always-malloc \
diff --git a/libide/Makefile.am b/libide/Makefile.am
index eef1348..8b465d5 100644
--- a/libide/Makefile.am
+++ b/libide/Makefile.am
@@ -405,6 +405,7 @@ libide_1_0_la_includes = \
        -DPACKAGE_LOCALE_DIR=\""${datadir}/locale"\" \
        -DPACKAGE_LIBDIR=\""${libdir}"\" \
        -DBUILDDIR=\""${abs_top_builddir}"\" \
+       -DSRCDIR=\""${abs_top_srcdir}"\" \
        -I$(top_builddir)/libide \
        -I$(top_srcdir)/contrib/egg \
        -I$(top_srcdir)/contrib/gd \
diff --git a/libide/ide-application.c b/libide/ide-application.c
index 9b1c596..772bec7 100644
--- a/libide/ide-application.c
+++ b/libide/ide-application.c
@@ -142,6 +142,10 @@ ide_application_register_search_paths (IdeApplication *self)
 
   gtk_source_style_scheme_manager_append_search_path (gtk_source_style_scheme_manager_get_default (),
                                                       PACKAGE_DATADIR"/gtksourceview-3.0/styles/");
+
+  if (g_getenv ("GB_IN_TREE_STYLE_SCHEMES") != NULL)
+    gtk_source_style_scheme_manager_prepend_search_path (gtk_source_style_scheme_manager_get_default (),
+                                                         SRCDIR"/data/style-schemes");
 }
 
 static void


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