From: caro Date: Sun, 19 Feb 2012 23:00:41 +0000 (+0000) Subject: Edje: improve compilation of examples (part1) X-Git-Tag: submit/2.0alpha-wayland/20121127.221958~371 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=24ea26db9587e76adc0c34b662c157ff88691d74;p=profile%2Fivi%2Fedje.git Edje: improve compilation of examples (part1) * give the possibility to set edje_cc (useful when cross compiling) * clean .edj files Next part: use eina_prefix to select edj and png files git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@68130 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/configure.ac b/configure.ac index eceed6c..56e241d 100644 --- a/configure.ac +++ b/configure.ac @@ -96,6 +96,8 @@ AC_ARG_ENABLE([amalgamation], ) AM_CONDITIONAL([EDJE_AMALGAMATION], [test "x${do_amalgamation}" = "xyes"]) +EFL_WITH_BIN([edje], [edje-cc], [edje_cc]) + EFL_ENABLE_BIN([edje-cc]) EFL_ENABLE_BIN([edje-decc]) EFL_ENABLE_BIN([edje-recc]) @@ -541,11 +543,6 @@ AC_ARG_ENABLE([build-examples], [ if test "x${enableval}" = "xyes" ; then build_examples="yes" - edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc - # put in here the dependencies for Edje' examples. They are - # meant to be 'real world' usage examples, thus one will be - # using higher level libraries on these programs - AC_SUBST(edje_cc) else build_examples="no" fi diff --git a/m4/efl_binary.m4 b/m4/efl_binary.m4 index 93d6934..c774688 100644 --- a/m4/efl_binary.m4 +++ b/m4/efl_binary.m4 @@ -42,3 +42,30 @@ AM_CONDITIONAL(BUILD_[]UP, test "x$have_[]m4_defn([DOWN])" = "xyes") AS_IF([test "x$have_[]m4_defn([DOWN])" = "xyes"], [$2], [$3]) ]) + + +dnl Macro that check if a binary is built or not + +dnl Usage: EFL_WITH_BIN(package, binary, default_value) +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([$2], + [AC_HELP_STRING([--with-$2=PATH], [specify a specific path to ]DOWN[ @<:@default=$3@:>@])], + [_efl_with_binary=${withval}], + [_efl_with_binary=$(pkg-config --variable=prefix $1)/bin/$3]) + +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/examples/Makefile.am b/src/examples/Makefile.am index 579f148..8b3d88e 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am @@ -1,5 +1,10 @@ MAINTAINERCLEANFILES = Makefile.in +EDJE_CC = @edje_cc@ +EDJE_CC_FLAGS_VERBOSE_0 = +EDJE_CC_FLAGS_VERBOSE_1 = -v +EDJE_CC_FLAGS = $(EDJE_CC_FLAGS_$(V)) -id $(srcdir) -fd $(srcdir) + examplesdir = $(datadir)/$(PACKAGE)/examples if ENABLE_MULTISENSE @@ -24,7 +29,8 @@ EDCS = \ $(MULTISENSE_EDC_FILE) .edc.edj: - $(edje_cc) -v -fd $(srcdir) -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) + $(EDJE_CC) $(EDJE_CC_FLAGS) $(SND_DIR) $< $(builddir)/$(@F) + EDJS = $(EDCS:%.edc=%.edj) @@ -65,19 +71,22 @@ AM_CPPFLAGS = \ files_DATA += $(EDJS) examples_PROGRAMS = \ + edje-animations \ edje-basic \ - edje-swallow \ - edje-text \ - edje-table \ edje-box \ edje-box2 \ - edje-drag\ - edje-signals-messages \ edje-color-class \ + edje-drag\ edje-perspective \ - edje-animations \ + edje-signals-messages \ + edje-swallow \ + edje-table \ + edje-text \ sigtest LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ endif + +clean-local: + rm -f *.edj