elua: if ugly, then at least portable (we already assume presence of bourne shell...
authorDaniel Kolesa <d.kolesa@samsung.com>
Wed, 28 May 2014 15:27:40 +0000 (16:27 +0100)
committerDaniel Kolesa <d.kolesa@samsung.com>
Tue, 10 Jun 2014 14:48:52 +0000 (15:48 +0100)
po/Makevars.in
po/xgettext_wrapper.sh [new file with mode: 0755]

index f332a1c2d7fed9a4ee7402b1839fd8013a44c805..f3bfe98d2cebf0afe24816b0e3d4455128a8235a 100644 (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
diff --git a/po/xgettext_wrapper.sh b/po/xgettext_wrapper.sh
new file mode 100755 (executable)
index 0000000..5aee06f
--- /dev/null
@@ -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