barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8dc853f2300ea70a9116325db773da22c6343c3c

commit 8dc853f2300ea70a9116325db773da22c6343c3c
Author: Gustavo Sverzut Barbieri <barbi...@profusion.mobi>
Date:   Fri Feb 3 11:49:38 2017 -0200

    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.
---
 configure.ac                               |  1 +
 src/bin/edje/edje_cc_out.c                 |  2 ++
 src/bin/edje/edje_cc_parse.c               |  2 ++
 src/bin/embryo/embryo_cc_sc1.c             |  2 ++
 src/lib/ecore/ecore.c                      |  2 ++
 src/lib/ecore_con/ecore_con_proxy_helper.c |  4 ++++
 src/lib/ecore_evas/ecore_evas_module.c     | 10 ++++++++++
 src/lib/ecore_imf/ecore_imf_module.c       |  2 ++
 src/lib/edje/edje_edit.c                   |  2 ++
 src/lib/edje/edje_module.c                 |  8 ++++++++
 src/lib/eeze/eeze_sensor.c                 |  2 ++
 src/lib/elementary/elm_module.c            |  2 ++
 src/lib/elementary/elm_web2.c              |  2 ++
 src/lib/emotion/emotion_modules.c          |  2 ++
 src/lib/ethumb/ethumb.c                    |  2 ++
 src/lib/evas/file/evas_module.c            | 12 ++++++++++++
 src/tests/ecore/ecore_suite.c              |  2 ++
 src/tests/ecore_con/ecore_con_suite.c      |  2 ++
 src/tests/ector/suite/ector_suite.c        |  2 ++
 src/tests/edje/edje_suite.c                |  2 ++
 src/tests/eet/eet_suite.c                  |  2 ++
 src/tests/eeze/eeze_suite.c                |  2 ++
 src/tests/efreet/efreet_suite.c            |  2 ++
 src/tests/eina/eina_suite.c                |  2 ++
 src/tests/eio/eio_suite.c                  |  2 ++
 src/tests/eldbus/eldbus_suite.c            |  2 ++
 src/tests/elementary/elm_suite.c           |  2 ++
 src/tests/elocation/elocation_suite.c      |  2 ++
 src/tests/elput/elput_suite.c              |  2 ++
 src/tests/elua/elua_suite.c                |  2 ++
 src/tests/emile/emile_suite.c              |  2 ++
 src/tests/eo/suite/eo_suite.c              |  2 ++
 src/tests/eolian/eolian_suite.c            |  2 ++
 src/tests/evas/evas_suite.c                |  2 ++
 src/tests/evil/evil_suite.c                |  2 ++
 35 files changed, 95 insertions(+)

diff --git a/configure.ac b/configure.ac
index a4e6dff..68d608d 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 7c483b5..1d33bdd 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 c30f598..c55738d 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 0d94b24..2cacbe5 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 9d4270a..6c0a31e 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 eda91e9..8fb9e0f 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 a587ee9..71ca38a 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 1d5747e..7ec902a 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 ee7c119..aaeb3a8 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 cfd3008..68d3caa 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 32f7a78..284f788 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 febb15e..03f70dc 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 3e644df..c3dda02 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 719b5d3..5b9666f 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 73ec5b9..7737b01 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 67f5656..f05870a 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 0dbde6d..76656c4 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 21585ae..1ef8b84 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 fa491df..9f04a64 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 416a0ec..0ec7d5c 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 3d8bb2d..a1d7840 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 8f8d365..d96ab91 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 732e101..4632153 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 e7e1b62..8e83335 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 e08cc8f..b5b63d1 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 4f3c6bb..a124078 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 ed06e0a..dee4d09 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 6b2cc46..c9ff759 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 b56b84e..3513216 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 1bf0ec8..1ad5ac1 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 2c968cf..7fc7063 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 15cf8bc..a9e6cc7 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 c640a57..1704b7f 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 3021f2c..45418c9 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 bc8bd79..aeae25e 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);

-- 


Reply via email to