aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-05-28 16:27:40 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-06-10 15:48:52 +0100
commitcfae9b5eeb699a547a18b8ac45c1cfdf3bca5c20 (patch)
tree2b72a796f4a2028f290848b26fdd8abbdf91dd78
parentelua: generate Makevars from Makevars.in with a dynamic conditional... sadly ... (diff)
downloadefl-cfae9b5eeb699a547a18b8ac45c1cfdf3bca5c20.tar.gz
elua: if ugly, then at least portable (we already assume presence of bourne shell on windows, so a wrapper doesn't hurt)
-rw-r--r--po/Makevars.in4
-rwxr-xr-xpo/xgettext_wrapper.sh12
2 files changed, 14 insertions, 2 deletions
diff --git a/po/Makevars.in b/po/Makevars.in
index f332a1c2d7..f3bfe98d2c 100644
--- a/po/Makevars.in
+++ b/po/Makevars.in
@@ -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
diff --git a/po/xgettext_wrapper.sh b/po/xgettext_wrapper.sh
new file mode 100755
index 0000000000..5aee06f4a9
--- /dev/null
+++ b/po/xgettext_wrapper.sh
@@ -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 $? \ No newline at end of file