elua: if ugly, then at least portable (we already assume presence of bourne shell on windows, so a wrapper doesn't hurt)

This commit is contained in:
Daniel Kolesa 2014-05-28 16:27:40 +01:00
parent 30e5f11dc6
commit cfae9b5eeb
2 changed files with 14 additions and 2 deletions

View File

@ -12,8 +12,8 @@ XGETTEXT_FALLBACK := $(XGETTEXT)
# 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

12
po/xgettext_wrapper.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
ELUA_BIN="$ELUA"
if [ ! "$ELUA_BIN" ]; then
ELUA_BIN="$ELUA_INTREE"
export EFL_RUN_IN_TREE=1
fi
$ELUA_BIN :xgettext "$@"
exit $?