lib_elua_libelua_la_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ELUA_CFLAGS@ \
-DLOCALE_DIR=\"@LOCALE_DIR@\" \
- -DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/elua\"
bin_elua_elua_CPPFLAGS = -I$(top_builddir)/src/lib/efl @ELUA_CFLAGS@ \
-DLOCALE_DIR=\"@LOCALE_DIR@\" \
- -DPACKAGE_SRC_DIR=\"$(abs_top_srcdir)\" \
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/elua\"
_ELUA_GEN_DEP = @elua_bin@
else
ELUA_GEN = ELUA_EOLIAN_LIBRARY_PATH=$(top_builddir)/src/lib/eolian/.libs \
- EFL_RUN_IN_TREE=1 $(top_builddir)/src/bin/elua/elua${EXEEXT} lualian
+ $(top_builddir)/src/bin/elua/elua${EXEEXT} \
+ -I$(abs_top_srcdir)/src/bindings/luajit \
+ -C$(abs_top_srcdir)/src/scripts/elua/core \
+ -M$(abs_top_srcdir)/src/scripts/elua/modules \
+ -A$(abs_top_srcdir)/src/scripts/elua/apps \
+ lualian
_ELUA_GEN_DEP = bin/elua/elua${EXEEXT} scripts/elua/apps/lualian.lua \
scripts/elua/modules/lualian.lua \
scripts/elua/modules/getopt.lua scripts/elua/core/util.lua \
elua_require_ref = luaL_ref(L, LUA_REGISTRYINDEX);
lua_pushvalue(L, 2);
elua_appload_ref = luaL_ref(L, LUA_REGISTRYINDEX);
- if (getenv("EFL_RUN_IN_TREE"))
+ if (!corepath)
{
- corepath = PACKAGE_SRC_DIR "/src/scripts/elua/core";
- modpath = PACKAGE_SRC_DIR "/src/scripts/elua/modules";
- appspath = PACKAGE_SRC_DIR "/src/scripts/elua/apps";
+ if (noenv || !(corepath = getenv("ELUA_CORE_DIR")) || !corepath[0])
+ {
+ corepath = corepathbuf;
+ snprintf(corepathbuf, sizeof(corepathbuf), "%s/core",
+ eina_prefix_data_get(elua_prefix));
+ }
}
- else
+ if (!modpath)
{
- if (!corepath)
+ if (noenv || !(modpath = getenv("ELUA_MODULES_DIR")) || !modpath[0])
{
- if (noenv || !(corepath = getenv("ELUA_CORE_DIR")) || !corepath[0])
- {
- corepath = corepathbuf;
- snprintf(corepathbuf, sizeof(corepathbuf), "%s/core",
- eina_prefix_data_get(elua_prefix));
- }
+ modpath = modpathbuf;
+ snprintf(modpathbuf, sizeof(modpathbuf), "%s/modules",
+ eina_prefix_data_get(elua_prefix));
}
- if (!modpath)
- {
- if (noenv || !(modpath = getenv("ELUA_MODULES_DIR")) || !modpath[0])
- {
- modpath = modpathbuf;
- snprintf(modpathbuf, sizeof(modpathbuf), "%s/modules",
- eina_prefix_data_get(elua_prefix));
- }
- }
- if (!appspath)
+ }
+ if (!appspath)
+ {
+ if (noenv || !(appspath = getenv("ELUA_APPS_DIR")) || !appspath[0])
{
- if (noenv || !(appspath = getenv("ELUA_APPS_DIR")) || !appspath[0])
- {
- appspath = appspathbuf;
- snprintf(appspathbuf, sizeof(appspathbuf), "%s/apps",
- eina_prefix_data_get(elua_prefix));
- }
+ appspath = appspathbuf;
+ snprintf(appspathbuf, sizeof(appspathbuf), "%s/apps",
+ eina_prefix_data_get(elua_prefix));
}
}
lua_pushfstring(L, "%s/?.lua;", corepath);
return 0;
}
- if (getenv("EFL_RUN_IN_TREE"))
- {
- Arg_Data *v = malloc(sizeof(Arg_Data));
- v->type = ARG_LIBDIR;
- v->value = PACKAGE_SRC_DIR "/src/bindings/luajit";
- largs = eina_list_append(largs, v);
- coref = PACKAGE_SRC_DIR "/src/scripts/elua/core";
- }
- else if (!(coref = coredir))
+ if (!(coref = coredir))
{
if (noenv || !(coref = getenv("ELUA_CORE_DIR")) || !coref[0])
{