cedric pushed a commit to branch master.

commit 0fbe8161ba21906b0eb504049e534edc220b6196
Author: Cedric Bail <[email protected]>
Date:   Sun Mar 24 13:00:55 2013 +0100

    edje: add option to enable theme compilation when cross compiling
---
 configure.ac                  |  2 ++
 data/Makefile.am              |  2 +-
 m4/efl_binary.m4              | 25 +++++++++++++++++++++++++
 src/Makefile_Edje.am          |  2 +-
 src/examples/edje/Makefile.am |  2 +-
 src/examples/evas/Makefile.am |  2 +-
 6 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index f659706..4610cfc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,6 +97,8 @@ AC_ARG_WITH([dbus-services],
    [dbusservicedir=$withval])
 AC_SUBST(dbusservicedir)
 
+EFL_WITH_BIN([edje], [edje-cc])
+
 
 #### Default values
 
diff --git a/data/Makefile.am b/data/Makefile.am
index 65205e4..3494457 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -62,7 +62,7 @@ edje/vim/syntax/edc.vim \
 edje/vim/syntax/embryo.vim
 
 # Helper for people using EDJ
-EDJE_CC = EFL_RUN_IN_TREE=1 $(top_builddir)/src/bin/edje/edje_cc
+EDJE_CC = @edje_cc@
 EDJE_CC_FLAGS_VERBOSE = $(EDJE_CC_FLAGS_VERBOSE_@AM_V@)
 EDJE_CC_FLAGS_VERBOSE_ = $(EDJE_CC_FLAGS_VERBOSE_@AM_DEFAULT_V@)
 EDJE_CC_FLAGS_VERBOSE_1 = -v
diff --git a/m4/efl_binary.m4 b/m4/efl_binary.m4
new file mode 100644
index 0000000..9165eef
--- /dev/null
+++ b/m4/efl_binary.m4
@@ -0,0 +1,25 @@
+
+
+dnl Usage: EFL_WITH_BIN(package, binary)
+dnl Call AC_SUBST(_binary) (_binary is the lowercase of binary, - being 
transformed into _ by default, or the value set by the user)
+
+AC_DEFUN([EFL_WITH_BIN],
+[
+
+m4_pushdef([DOWN], m4_translit([[$2]], [-A-Z], [_a-z]))dnl
+
+dnl configure option
+
+AC_ARG_WITH([bin-$2],
+   [AC_HELP_STRING([--with-bin-$2=PATH], [specify a specific path to ]DOWN[ 
@<:@default=]DOWN[@:>@])],
+   [_efl_with_binary=${withval}],
+   [_efl_with_binary="EFL_RUN_IN_TREE=1 $(top_builddir)/bin/$1/]DOWN")
+
+DOWN=${_efl_with_binary}
+AC_MSG_NOTICE(DOWN[ set to ${_efl_with_binary}])
+
+with_binary_[]m4_defn([DOWN])=${_efl_with_binary}
+
+AC_SUBST(DOWN)
+
+])
diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 1908793..85143cb 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -212,7 +212,7 @@ tests/edje/edje_tests_helpers.h
 bin_SCRIPTS += bin/edje/edje_recc
 
 # Useful to other modules that generate EDJ
-EDJE_CC = EFL_RUN_IN_TREE=1 $(builddir)/bin/edje/edje_cc${EXEEXT}
+EDJE_CC = @edje_cc@
 EDJE_CC_FLAGS_VERBOSE = $(EDJE_CC_FLAGS_VERBOSE_@AM_V@)
 EDJE_CC_FLAGS_VERBOSE_ = $(EDJE_CC_FLAGS_VERBOSE_@AM_DEFAULT_V@)
 EDJE_CC_FLAGS_VERBOSE_1 = -v
diff --git a/src/examples/edje/Makefile.am b/src/examples/edje/Makefile.am
index a068d23..85c0409 100644
--- a/src/examples/edje/Makefile.am
+++ b/src/examples/edje/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-EDJE_CC = EFL_RUN_IN_TREE=1 $(top_builddir)/src/bin/edje/edje_cc
+EDJE_CC = @edje_cc@
 EDJE_CC_FLAGS_VERBOSE = $(EDJE_CC_FLAGS_VERBOSE_@AM_V@)
 EDJE_CC_FLAGS_VERBOSE_ = $(EDJE_CC_FLAGS_VERBOSE_@AM_DEFAULT_V@)
 EDJE_CC_FLAGS_VERBOSE_1 = -v
diff --git a/src/examples/evas/Makefile.am b/src/examples/evas/Makefile.am
index 0a04858..b7ef676 100644
--- a/src/examples/evas/Makefile.am
+++ b/src/examples/evas/Makefile.am
@@ -1,6 +1,6 @@
 MAINTAINERCLEANFILES = Makefile.in
 
-EDJE_CC = EFL_RUN_IN_TREE=1 $(top_builddir)/src/bin/edje/edje_cc
+EDJE_CC = @edje_cc@
 EDJE_CC_FLAGS_VERBOSE = $(EDJE_CC_FLAGS_VERBOSE_@AM_V@)
 EDJE_CC_FLAGS_VERBOSE_ = $(EDJE_CC_FLAGS_VERBOSE_@AM_DEFAULT_V@)
 EDJE_CC_FLAGS_VERBOSE_1 = -v

-- 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar

Reply via email to