# Override xgettext with a LuaJIT aware variant (which calls
# into plain xgettext if it needs to, and handles Lua on its own)
-XGETTEXT = XGETTEXT=$(XGETTEXT_FALLBACK) EFL_RUN_IN_TREE=1 \
- $(top_builddir)/src/bin/elua/elua :xgettext
+XGETTEXT = ELUA=@elua_bin@ ELUA_INTREE=$(top_builddir)/src/bin/elua/elua \
+ XGETTEXT=$(XGETTEXT_FALLBACK) ./xgettext_wrapper.sh
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --from-code=UTF-8 --foreign-user
--- /dev/null
+#!/bin/sh
+
+ELUA_BIN="$ELUA"
+
+if [ ! "$ELUA_BIN" ]; then
+ ELUA_BIN="$ELUA_INTREE"
+ export EFL_RUN_IN_TREE=1
+fi
+
+$ELUA_BIN :xgettext "$@"
+
+exit $?
\ No newline at end of file