summaryrefslogtreecommitdiff
path: root/src/lib/edje
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-02-03 11:49:38 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-02-03 12:36:38 -0200
commit8dc853f2300ea70a9116325db773da22c6343c3c (patch)
tree841bdd4af4acac518732cd0c189de991fa4ffd73 /src/lib/edje
parent75dc1b3fd711afa26f69f8244b64d2df9628fae4 (diff)
ifdef RUN_IN_TREE logic.
This logic is only needed for autotools, cmake will replicate the installation file structure and thus eina_prefix works out of box.
Diffstat (limited to 'src/lib/edje')
-rw-r--r--src/lib/edje/edje_edit.c2
-rw-r--r--src/lib/edje/edje_module.c8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index ee7c11997e..aaeb3a8a69 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -12469,6 +12469,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
12469#else 12469#else
12470# define BIN_EXT 12470# define BIN_EXT
12471#endif 12471#endif
12472#ifdef NEED_RUN_IN_TREE
12472#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) 12473#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
12473 if (getuid() == geteuid()) 12474 if (getuid() == geteuid())
12474#endif 12475#endif
@@ -12484,6 +12485,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
12484 embryo_cc_path[0] = '\0'; 12485 embryo_cc_path[0] = '\0';
12485 } 12486 }
12486 } 12487 }
12488#endif
12487 12489
12488 if (embryo_cc_path[0] == '\0') 12490 if (embryo_cc_path[0] == '\0')
12489 { 12491 {
diff --git a/src/lib/edje/edje_module.c b/src/lib/edje/edje_module.c
index cfd30088f2..68d3caa5ee 100644
--- a/src/lib/edje/edje_module.c
+++ b/src/lib/edje/edje_module.c
@@ -24,19 +24,24 @@ _edje_module_handle_load(const char *module)
24 const char *path; 24 const char *path;
25 Eina_List *l; 25 Eina_List *l;
26 Eina_Module *em = NULL; 26 Eina_Module *em = NULL;
27#ifdef NEED_RUN_IN_TREE
27 Eina_Bool run_in_tree; 28 Eina_Bool run_in_tree;
29#endif
28 30
29 EINA_SAFETY_ON_NULL_RETURN_VAL(module, NULL); 31 EINA_SAFETY_ON_NULL_RETURN_VAL(module, NULL);
30 32
31 em = (Eina_Module *)eina_hash_find(_registered_modules, module); 33 em = (Eina_Module *)eina_hash_find(_registered_modules, module);
32 if (em) return em; 34 if (em) return em;
33 35
36#ifdef NEED_RUN_IN_TREE
34 run_in_tree = !!getenv("EFL_RUN_IN_TREE"); 37 run_in_tree = !!getenv("EFL_RUN_IN_TREE");
38#endif
35 39
36 EINA_LIST_FOREACH(_modules_paths, l, path) 40 EINA_LIST_FOREACH(_modules_paths, l, path)
37 { 41 {
38 char tmp[PATH_MAX] = ""; 42 char tmp[PATH_MAX] = "";
39 43
44#ifdef NEED_RUN_IN_TREE
40#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) 45#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
41 if (getuid() == geteuid()) 46 if (getuid() == geteuid())
42#endif 47#endif
@@ -50,6 +55,7 @@ _edje_module_handle_load(const char *module)
50 tmp[0] = '\0'; 55 tmp[0] = '\0';
51 } 56 }
52 } 57 }
58#endif
53 59
54 if (tmp[0] == '\0') 60 if (tmp[0] == '\0')
55 snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s", 61 snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s",
@@ -79,6 +85,7 @@ _edje_module_init(void)
79 85
80 _registered_modules = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free)); 86 _registered_modules = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free));
81 87
88#ifdef NEED_RUN_IN_TREE
82#if defined(HAVE_GETUID) && defined(HAVE_GETEUID) 89#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
83 if (getuid() == geteuid()) 90 if (getuid() == geteuid())
84#endif 91#endif
@@ -94,6 +101,7 @@ _edje_module_init(void)
94 } 101 }
95 } 102 }
96 } 103 }
104#endif
97 105
98 /* 1. libedje.so/../edje/modules/ */ 106 /* 1. libedje.so/../edje/modules/ */
99 paths[0] = eina_module_symbol_path_get(_edje_module_init, "/edje/modules"); 107 paths[0] = eina_module_symbol_path_get(_edje_module_init, "/edje/modules");