[gnome-builder] libide: check for in-tree builds using Makefile.
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: check for in-tree builds using Makefile.
- Date: Mon, 23 Mar 2015 23:47:32 +0000 (UTC)
commit cea5a133495e2fcaba9e5c81980ff41da69bc6f5
Author: Christian Hergert <christian hergert me>
Date: Sun Mar 1 17:57:38 2015 -0800
libide: check for in-tree builds using Makefile.
libide/autotools/ide-autotools-builder.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
---
diff --git a/libide/autotools/ide-autotools-builder.c b/libide/autotools/ide-autotools-builder.c
index 84c53e1..cfd3304 100644
--- a/libide/autotools/ide-autotools-builder.c
+++ b/libide/autotools/ide-autotools-builder.c
@@ -167,15 +167,22 @@ ide_autotools_builder_get_build_directory (IdeAutotoolsBuilder *self)
{
IdeVcs *vcs;
GFile *working_directory;
- g_autoptr(GFile) configure_file = NULL;
- g_autofree gchar *configure_path = NULL;
+ g_autoptr(GFile) makefile_file = NULL;
+ g_autofree gchar *makefile_path = NULL;
vcs = ide_context_get_vcs (context);
working_directory = ide_vcs_get_working_directory (vcs);
- configure_file = g_file_get_child (working_directory, "configure");
- configure_path = g_file_get_path (configure_file);
-
- if (g_file_test (configure_path, G_FILE_TEST_IS_EXECUTABLE))
+ makefile_file = g_file_get_child (working_directory, "Makefile");
+ makefile_path = g_file_get_path (makefile_file);
+
+ /*
+ * NOTE:
+ *
+ * It would be nice if this was done asynchronously, but if this isn't fast, we will have
+ * stalled in so many other places that the app will probably be generally unusable. So
+ * I'm going to cheat for now and make this function synchronous.
+ */
+ if (g_file_test (makefile_path, G_FILE_TEST_EXISTS))
return g_object_ref (working_directory);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]