summaryrefslogtreecommitdiff
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
parent75dc1b3fd711afa26f69f8244b64d2df9628fae4 (diff)
downloadefl-8dc853f2300ea70a9116325db773da22c6343c3c.tar.gz
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.
-rw-r--r--configure.ac1
-rw-r--r--src/bin/edje/edje_cc_out.c2
-rw-r--r--src/bin/edje/edje_cc_parse.c2
-rw-r--r--src/bin/embryo/embryo_cc_sc1.c2
-rw-r--r--src/lib/ecore/ecore.c2
-rw-r--r--src/lib/ecore_con/ecore_con_proxy_helper.c4
-rw-r--r--src/lib/ecore_evas/ecore_evas_module.c10
-rw-r--r--src/lib/ecore_imf/ecore_imf_module.c2
-rw-r--r--src/lib/edje/edje_edit.c2
-rw-r--r--src/lib/edje/edje_module.c8
-rw-r--r--src/lib/eeze/eeze_sensor.c2
-rw-r--r--src/lib/elementary/elm_module.c2
-rw-r--r--src/lib/elementary/elm_web2.c2
-rw-r--r--src/lib/emotion/emotion_modules.c2
-rw-r--r--src/lib/ethumb/ethumb.c2
-rw-r--r--src/lib/evas/file/evas_module.c12
-rw-r--r--src/tests/ecore/ecore_suite.c2
-rw-r--r--src/tests/ecore_con/ecore_con_suite.c2
-rw-r--r--src/tests/ector/suite/ector_suite.c2
-rw-r--r--src/tests/edje/edje_suite.c2
-rw-r--r--src/tests/eet/eet_suite.c2
-rw-r--r--src/tests/eeze/eeze_suite.c2
-rw-r--r--src/tests/efreet/efreet_suite.c2
-rw-r--r--src/tests/eina/eina_suite.c2
-rw-r--r--src/tests/eio/eio_suite.c2
-rw-r--r--src/tests/eldbus/eldbus_suite.c2
-rw-r--r--src/tests/elementary/elm_suite.c2
-rw-r--r--src/tests/elocation/elocation_suite.c2
-rw-r--r--src/tests/elput/elput_suite.c2
-rw-r--r--src/tests/elua/elua_suite.c2
-rw-r--r--src/tests/emile/emile_suite.c2
-rw-r--r--src/tests/eo/suite/eo_suite.c2
-rw-r--r--src/tests/eolian/eolian_suite.c2
-rw-r--r--src/tests/evas/evas_suite.c2
-rw-r--r--src/tests/evil/evil_suite.c2
35 files changed, 95 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a4e6dff3a9..68d608d203 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5566,6 +5566,7 @@ AC_ARG_ENABLE([cancel-ok],
],[])
AC_SUBST(ELM_EDJE_DEFINES)
+AC_DEFINE([NEED_RUN_IN_TREE], [1], [Need EFL_RUN_IN_TREE=1 trick])
## Disable warning for OS that have a specifc configuration
case "$host_os" in
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 7c483b5939..1d33bdd012 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -2221,6 +2221,7 @@ data_write_scripts(Eet_File *ef)
#else
# define BIN_EXT
#endif
+#ifdef NEED_RUN_IN_TREE
if (getenv("EFL_RUN_IN_TREE"))
{
snprintf(embryo_cc_path, sizeof(embryo_cc_path),
@@ -2231,6 +2232,7 @@ data_write_scripts(Eet_File *ef)
if (!ecore_file_exists(embryo_cc_path))
embryo_cc_path[0] = '\0';
}
+#endif
if (embryo_cc_path[0] == '\0')
{
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index c30f598317..c55738d809 100644
--- a/src/bin/edje/edje_cc_parse.c
+++ b/src/bin/edje/edje_cc_parse.c
@@ -1050,6 +1050,7 @@ compile(void)
*/
buf2[0] = '\0';
+#ifdef NEED_RUN_IN_TREE
if (getenv("EFL_RUN_IN_TREE"))
{
snprintf(buf2, sizeof(buf2),
@@ -1058,6 +1059,7 @@ compile(void)
if (!ecore_file_exists(buf2))
buf2[0] = '\0';
}
+#endif
if (buf2[0] == '\0')
snprintf(buf2, sizeof(buf2),
diff --git a/src/bin/embryo/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c
index 0d94b249a7..2cacbe5bf9 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -572,6 +572,7 @@ parseoptions(int argc, char **argv, char *iname, char *oname,
int i, stack_size;
size_t len;
+#ifdef NEED_RUN_IN_TREE
str[0] = '\0';
if (getenv("EFL_RUN_IN_TREE"))
{
@@ -582,6 +583,7 @@ parseoptions(int argc, char **argv, char *iname, char *oname,
}
if (str[0] == '\0')
+#endif
snprintf(str, sizeof(str), "%s/include/", e_prefix_data_get());
/* use embryo include dir always */
diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c
index 9d4270a228..6c0a31e185 100644
--- a/src/lib/ecore/ecore.c
+++ b/src/lib/ecore/ecore.c
@@ -137,6 +137,7 @@ ecore_system_modules_load(void)
{
char buf[PATH_MAX] = "";
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -173,6 +174,7 @@ ecore_system_modules_load(void)
}
}
}
+#endif
snprintf(buf, sizeof(buf), "%s/ecore/system",
eina_prefix_lib_get(_ecore_pfx));
diff --git a/src/lib/ecore_con/ecore_con_proxy_helper.c b/src/lib/ecore_con/ecore_con_proxy_helper.c
index eda91e9989..8fb9e0ff6a 100644
--- a/src/lib/ecore_con/ecore_con_proxy_helper.c
+++ b/src/lib/ecore_con/ecore_con_proxy_helper.c
@@ -57,10 +57,13 @@ _efl_net_proxy_helper_spawn(void)
char buf[PATH_MAX];
Eina_List *l;
Efl_Net_Proxy_Helper_Req *req;
+#ifdef NEED_RUN_IN_TREE
static int run_in_tree = -1;
+#endif
if (!_efl_net_proxy_helper_works) return;
if (_efl_net_proxy_helper_exe) return;
+#ifdef NEED_RUN_IN_TREE
if (run_in_tree == -1)
{
run_in_tree = 0;
@@ -77,6 +80,7 @@ _efl_net_proxy_helper_spawn(void)
(buf, sizeof(buf),
PACKAGE_BUILD_DIR"/src/bin/ecore_con/utils/efl_net_proxy_helper"HELPER_EXT);
else
+#endif
snprintf
(buf, sizeof(buf),
"%s/ecore_con/utils/"MODULE_ARCH"/efl_net_proxy_helper"HELPER_EXT,
diff --git a/src/lib/ecore_evas/ecore_evas_module.c b/src/lib/ecore_evas/ecore_evas_module.c
index a587ee93aa..71ca38a0f5 100644
--- a/src/lib/ecore_evas/ecore_evas_module.c
+++ b/src/lib/ecore_evas/ecore_evas_module.c
@@ -57,6 +57,7 @@ _ecore_evas_vnc_server_module_load(void)
if (_ecore_evas_vnc)
return _ecore_evas_vnc;
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -71,6 +72,7 @@ _ecore_evas_vnc_server_module_load(void)
return _ecore_evas_vnc;
}
}
+#endif
prefix = eina_module_symbol_path_get(_ecore_evas_vnc_server_module_load,
"/ecore_evas");
@@ -93,19 +95,24 @@ _ecore_evas_engine_load(const char *engine)
const char *path;
Eina_List *l;
Eina_Module *em = NULL;
+#ifdef NEED_RUN_IN_TREE
Eina_Bool run_in_tree;
+#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(engine, NULL);
em = (Eina_Module *)eina_hash_find(_registered_engines, engine);
if (em) return em;
+#ifdef NEED_RUN_IN_TREE
run_in_tree = !!getenv("EFL_RUN_IN_TREE");
+#endif
EINA_LIST_FOREACH(_engines_paths, l, path)
{
char tmp[PATH_MAX] = "";
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -119,6 +126,7 @@ _ecore_evas_engine_load(const char *engine)
tmp[0] = '\0';
}
}
+#endif
if (tmp[0] == '\0')
snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s",
@@ -150,6 +158,7 @@ _ecore_evas_engine_init(void)
// _registered_engines = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free));
_registered_engines = eina_hash_string_small_new(NULL);
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -165,6 +174,7 @@ _ecore_evas_engine_init(void)
}
}
}
+#endif
/* 1. libecore_evas.so/../ecore_evas/engines/ */
paths[0] = eina_module_symbol_path_get(_ecore_evas_engine_init, "/ecore_evas/engines");
diff --git a/src/lib/ecore_imf/ecore_imf_module.c b/src/lib/ecore_imf/ecore_imf_module.c
index 1d5747ebfe..7ec902a233 100644
--- a/src/lib/ecore_imf/ecore_imf_module.c
+++ b/src/lib/ecore_imf/ecore_imf_module.c
@@ -52,6 +52,7 @@ ecore_imf_module_init(void)
"ECORE_IMF", "ecore_imf", "checkme",
PACKAGE_BIN_DIR, PACKAGE_LIB_DIR,
PACKAGE_DATA_DIR, PACKAGE_DATA_DIR);
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -88,6 +89,7 @@ ecore_imf_module_init(void)
}
}
}
+#endif
env = getenv("ECORE_IMF_MODULE");
#ifdef BUILD_ECORE_IMF_WAYLAND
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)
#else
# define BIN_EXT
#endif
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -12484,6 +12485,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
embryo_cc_path[0] = '\0';
}
}
+#endif
if (embryo_cc_path[0] == '\0')
{
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)
const char *path;
Eina_List *l;
Eina_Module *em = NULL;
+#ifdef NEED_RUN_IN_TREE
Eina_Bool run_in_tree;
+#endif
EINA_SAFETY_ON_NULL_RETURN_VAL(module, NULL);
em = (Eina_Module *)eina_hash_find(_registered_modules, module);
if (em) return em;
+#ifdef NEED_RUN_IN_TREE
run_in_tree = !!getenv("EFL_RUN_IN_TREE");
+#endif
EINA_LIST_FOREACH(_modules_paths, l, path)
{
char tmp[PATH_MAX] = "";
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -50,6 +55,7 @@ _edje_module_handle_load(const char *module)
tmp[0] = '\0';
}
}
+#endif
if (tmp[0] == '\0')
snprintf(tmp, sizeof(tmp), "%s/%s/%s/%s",
@@ -79,6 +85,7 @@ _edje_module_init(void)
_registered_modules = eina_hash_string_small_new(EINA_FREE_CB(eina_module_free));
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -94,6 +101,7 @@ _edje_module_init(void)
}
}
}
+#endif
/* 1. libedje.so/../edje/modules/ */
paths[0] = eina_module_symbol_path_get(_edje_module_init, "/edje/modules");
diff --git a/src/lib/eeze/eeze_sensor.c b/src/lib/eeze/eeze_sensor.c
index 32f7a78042..284f7885e6 100644
--- a/src/lib/eeze/eeze_sensor.c
+++ b/src/lib/eeze/eeze_sensor.c
@@ -104,6 +104,7 @@ eeze_sensor_modules_load(void)
* is one of these items. We do load the modules from the builddir if the
* environment is set. Normal case is to use installed modules from system
*/
+#ifdef NEED_RUN_IN_TREE
if (
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
(getuid() == geteuid()) &&
@@ -122,6 +123,7 @@ eeze_sensor_modules_load(void)
}
}
else
+#endif
{
snprintf(buf, sizeof(buf), "%s/eeze/modules/sensor",
eina_prefix_lib_get(pfx));
diff --git a/src/lib/elementary/elm_module.c b/src/lib/elementary/elm_module.c
index febb15ec5c..03f70dc032 100644
--- a/src/lib/elementary/elm_module.c
+++ b/src/lib/elementary/elm_module.c
@@ -131,12 +131,14 @@ _elm_module_load(Elm_Module *m)
if (m->module) return EINA_TRUE;
if (strchr(m->name, '/')) return EINA_FALSE;
+#ifdef NEED_RUN_IN_TREE
if (getenv("ELM_RUN_IN_TREE"))
{
snprintf(buf, sizeof(buf),
ELM_TOP_BUILD_DIR "/src/modules/%s/.libs/module"EFL_SHARED_EXTENSION, m->name);
}
else
+#endif
{
snprintf(buf, sizeof(buf), "%s/elementary/modules/%s/%s/module"EFL_SHARED_EXTENSION,
_elm_lib_dir, m->name, MODULE_ARCH);
diff --git a/src/lib/elementary/elm_web2.c b/src/lib/elementary/elm_web2.c
index 3e644df292..c3dda02310 100644
--- a/src/lib/elementary/elm_web2.c
+++ b/src/lib/elementary/elm_web2.c
@@ -173,11 +173,13 @@ _elm_web_init(const char *engine)
{
char buf[PATH_MAX];
+#ifdef NEED_RUN_IN_TREE
if (getenv("ELM_RUN_IN_TREE"))
snprintf(buf, sizeof(buf),
ELM_TOP_BUILD_DIR"/src/modules/web/%s/.libs/module"EFL_SHARED_EXTENSION,
engine);
else
+#endif
snprintf(buf, sizeof(buf),
"%s/elementary/modules/web/%s/%s/module"EFL_SHARED_EXTENSION,
_elm_lib_dir, engine, MODULE_ARCH);
diff --git a/src/lib/emotion/emotion_modules.c b/src/lib/emotion/emotion_modules.c
index 719b5d3e85..5b9666f07a 100644
--- a/src/lib/emotion/emotion_modules.c
+++ b/src/lib/emotion/emotion_modules.c
@@ -62,6 +62,7 @@ _emotion_modules_load(void)
if (_emotion_modules_loaded) return;
_emotion_modules_loaded = EINA_TRUE;
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -101,6 +102,7 @@ _emotion_modules_load(void)
}
}
}
+#endif
snprintf(buf, sizeof(buf), "%s/emotion/modules", eina_prefix_lib_get(_emotion_pfx));
_emotion_modules = eina_module_arch_list_get(_emotion_modules, buf, MODULE_ARCH);
diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index 73ec5b9e0c..7737b01fb9 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -154,6 +154,7 @@ _ethumb_plugins_load(void)
if (_plugins_loaded) return;
_plugins_loaded = EINA_TRUE;
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -182,6 +183,7 @@ _ethumb_plugins_load(void)
}
}
}
+#endif
snprintf(buf, sizeof(buf), "%s/ethumb/modules", eina_prefix_lib_get(_pfx));
_plugins = eina_module_arch_list_get(_plugins, buf, MODULE_ARCH);
diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index 67f565657f..f05870ad2b 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -110,6 +110,7 @@ evas_module_paths_init(void)
{
char *libdir, *path;
+#ifdef NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -125,6 +126,7 @@ evas_module_paths_init(void)
}
}
}
+#endif
/* 1. libevas.so/../evas/modules/ */
libdir = (char *)_evas_module_libdir_get();
@@ -408,9 +410,11 @@ evas_module_engine_list(void)
unsigned int i;
const char *s, *s2;
char buf[PATH_MAX];
+#ifdef NEED_RUN_IN_TREE
Eina_Bool run_in_tree;
run_in_tree = !!getenv("EFL_RUN_IN_TREE");
+#endif
EINA_LIST_FOREACH(evas_module_paths, l, s)
{
@@ -424,6 +428,7 @@ evas_module_engine_list(void)
{
const char *fname = fi->path + fi->name_start;
+#ifdef NEED_RUN_IN_TREE
buf[0] = '\0';
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
@@ -439,6 +444,7 @@ evas_module_engine_list(void)
}
if (buf[0] == '\0')
+#endif
snprintf(buf, sizeof(buf), "%s/engines/%s/%s",
s, fname, MODULE_ARCH);
@@ -513,7 +519,9 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
Evas_Module *em;
Eina_Module *en;
Eina_List *l;
+#ifdef NEED_RUN_IN_TREE
Eina_Bool run_in_tree;
+#endif
if ((unsigned int)type > 5) return NULL;
@@ -524,7 +532,9 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
return NULL;
}
+#ifdef NEED_RUN_IN_TREE
run_in_tree = !!getenv("EFL_RUN_IN_TREE");
+#endif
EINA_LIST_FOREACH(evas_module_paths, l, path)
{
@@ -540,6 +550,7 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
}
buffer[0] = '\0';
+#if NEED_RUN_IN_TREE
#if defined(HAVE_GETUID) && defined(HAVE_GETEUID)
if (getuid() == geteuid())
#endif
@@ -552,6 +563,7 @@ evas_module_find_type(Evas_Module_Type type, const char *name)
buffer[0] = '\0';
}
}
+#endif
if (buffer[0] == '\0')
snprintf(buffer, sizeof(buffer), "%s/%s/%s/%s/%s",
diff --git a/src/tests/ecore/ecore_suite.c b/src/tests/ecore/ecore_suite.c
index 0dbde6daa4..76656c4de7 100644
--- a/src/tests/ecore/ecore_suite.c
+++ b/src/tests/ecore/ecore_suite.c
@@ -40,7 +40,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Ecore", etc);
diff --git a/src/tests/ecore_con/ecore_con_suite.c b/src/tests/ecore_con/ecore_con_suite.c
index 21585ae93e..1ef8b84d50 100644
--- a/src/tests/ecore_con/ecore_con_suite.c
+++ b/src/tests/ecore_con/ecore_con_suite.c
@@ -21,7 +21,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Ecore_Con", etc);
diff --git a/src/tests/ector/suite/ector_suite.c b/src/tests/ector/suite/ector_suite.c
index fa491df6ec..9f04a644b9 100644
--- a/src/tests/ector/suite/ector_suite.c
+++ b/src/tests/ector/suite/ector_suite.c
@@ -36,7 +36,9 @@ main(int argc, char *argv[])
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Ector", etc);
diff --git a/src/tests/edje/edje_suite.c b/src/tests/edje/edje_suite.c
index 416a0ec3f8..0ec7d5c95a 100644
--- a/src/tests/edje/edje_suite.c
+++ b/src/tests/edje/edje_suite.c
@@ -18,7 +18,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Edje", etc);
diff --git a/src/tests/eet/eet_suite.c b/src/tests/eet/eet_suite.c
index 3d8bb2d31c..a1d7840327 100644
--- a/src/tests/eet/eet_suite.c
+++ b/src/tests/eet/eet_suite.c
@@ -33,7 +33,9 @@ main(int argc, char *argv[])
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
memcpy(argv0, argv[0], strlen(argv[0]) + 1);
diff --git a/src/tests/eeze/eeze_suite.c b/src/tests/eeze/eeze_suite.c
index 8f8d3659a8..d96ab9138d 100644
--- a/src/tests/eeze/eeze_suite.c
+++ b/src/tests/eeze/eeze_suite.c
@@ -21,7 +21,9 @@ main(int argc, char *argv[])
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Eeze", etc);
diff --git a/src/tests/efreet/efreet_suite.c b/src/tests/efreet/efreet_suite.c
index 732e1010a1..463215354e 100644
--- a/src/tests/efreet/efreet_suite.c
+++ b/src/tests/efreet/efreet_suite.c
@@ -19,7 +19,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Efreet", etc);
diff --git a/src/tests/eina/eina_suite.c b/src/tests/eina/eina_suite.c
index e7e1b623d9..8e833356f3 100644
--- a/src/tests/eina/eina_suite.c
+++ b/src/tests/eina/eina_suite.c
@@ -129,7 +129,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
_mempool_init();
diff --git a/src/tests/eio/eio_suite.c b/src/tests/eio/eio_suite.c
index e08cc8fd89..b5b63d1ff2 100644
--- a/src/tests/eio/eio_suite.c
+++ b/src/tests/eio/eio_suite.c
@@ -31,7 +31,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
eina_init();
diff --git a/src/tests/eldbus/eldbus_suite.c b/src/tests/eldbus/eldbus_suite.c
index 4f3c6bb37a..a1240785e0 100644
--- a/src/tests/eldbus/eldbus_suite.c
+++ b/src/tests/eldbus/eldbus_suite.c
@@ -26,7 +26,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Eldbus", etc);
diff --git a/src/tests/elementary/elm_suite.c b/src/tests/elementary/elm_suite.c
index ed06e0aead..dee4d09351 100644
--- a/src/tests/elementary/elm_suite.c
+++ b/src/tests/elementary/elm_suite.c
@@ -94,8 +94,10 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
putenv("ELM_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Elementary", etc);
diff --git a/src/tests/elocation/elocation_suite.c b/src/tests/elocation/elocation_suite.c
index 6b2cc46809..c9ff759e82 100644
--- a/src/tests/elocation/elocation_suite.c
+++ b/src/tests/elocation/elocation_suite.c
@@ -220,7 +220,9 @@ main(void)
SRunner *sr;
int failed_count;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
s = elocation_suite();
sr = srunner_create(s);
diff --git a/src/tests/elput/elput_suite.c b/src/tests/elput/elput_suite.c
index b56b84e714..35132162aa 100644
--- a/src/tests/elput/elput_suite.c
+++ b/src/tests/elput/elput_suite.c
@@ -20,7 +20,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc)) return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
count =
_efl_suite_build_and_run(argc - 1, (const char **)argv + 1, "Elput", etc);
diff --git a/src/tests/elua/elua_suite.c b/src/tests/elua/elua_suite.c
index 1bf0ec81c3..1ad5ac164b 100644
--- a/src/tests/elua/elua_suite.c
+++ b/src/tests/elua/elua_suite.c
@@ -20,7 +20,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Elua", etc);
diff --git a/src/tests/emile/emile_suite.c b/src/tests/emile/emile_suite.c
index 2c968cfc34..7fc70631e5 100644
--- a/src/tests/emile/emile_suite.c
+++ b/src/tests/emile/emile_suite.c
@@ -19,7 +19,9 @@ main(int argc, char *argv[])
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Emile", etc);
diff --git a/src/tests/eo/suite/eo_suite.c b/src/tests/eo/suite/eo_suite.c
index 15cf8bc1ec..a9e6cc7444 100644
--- a/src/tests/eo/suite/eo_suite.c
+++ b/src/tests/eo/suite/eo_suite.c
@@ -25,7 +25,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Eo", etc);
diff --git a/src/tests/eolian/eolian_suite.c b/src/tests/eolian/eolian_suite.c
index c640a57e7f..1704b7f81b 100644
--- a/src/tests/eolian/eolian_suite.c
+++ b/src/tests/eolian/eolian_suite.c
@@ -25,7 +25,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Eolian", etc);
diff --git a/src/tests/evas/evas_suite.c b/src/tests/evas/evas_suite.c
index 3021f2c582..45418c9775 100644
--- a/src/tests/evas/evas_suite.c
+++ b/src/tests/evas/evas_suite.c
@@ -32,7 +32,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
evas_init();
diff --git a/src/tests/evil/evil_suite.c b/src/tests/evil/evil_suite.c
index bc8bd79025..aeae25ebe0 100644
--- a/src/tests/evil/evil_suite.c
+++ b/src/tests/evil/evil_suite.c
@@ -54,7 +54,9 @@ main(int argc, char **argv)
if (!_efl_test_option_disp(argc, argv, etc))
return 0;
+#ifdef NEED_RUN_IN_TREE
putenv("EFL_RUN_IN_TREE=1");
+#endif
failed_count = _efl_suite_build_and_run(argc - 1, (const char **)argv + 1,
"Evil", etc);