edje: add option to enable theme compilation when cross compiling
authorCedric Bail <cedric.bail@free.fr>
Sun, 24 Mar 2013 12:00:55 +0000 (13:00 +0100)
committerCedric Bail <cedric.bail@free.fr>
Sun, 24 Mar 2013 13:59:44 +0000 (22:59 +0900)
configure.ac
data/Makefile.am
m4/efl_binary.m4 [new file with mode: 0644]
src/Makefile_Edje.am
src/examples/edje/Makefile.am
src/examples/evas/Makefile.am

index f6597069a140f9d0e83b018f11791dc2893a0b54..4610cfc97ea17efeb02a414ab4a26e2daea57add 100644 (file)
@@ -97,6 +97,8 @@ AC_ARG_WITH([dbus-services],
    [dbusservicedir=$withval])
 AC_SUBST(dbusservicedir)
 
+EFL_WITH_BIN([edje], [edje-cc])
+
 
 #### Default values
 
index 65205e4523c16e5957bad33a252a9e8efca5fe72..34944573297b88552311c0fd1ccdb181e3c64454 100644 (file)
@@ -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 (file)
index 0000000..9165eef
--- /dev/null
@@ -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)
+
+])
index 19087936192fad9e8ea66c6a5bde3079b7cf3576..85143cb91bc3c28768a06b9fd6cac4a99e06c842 100644 (file)
@@ -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
index a068d23b6dbed00803a716f5708c12f0b722e3aa..85c0409f61eeecf290a24abc6f40285a5eab0ad6 100644 (file)
@@ -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
index 0a048582434908f3a0d0b05cf58ff34ca24d3034..b7ef676e3d295e052125e7d78f144c39ebf4625d 100644 (file)
@@ -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