From ff548f20798daeae60ac3e48d62c25dd363b1a9c Mon Sep 17 00:00:00 2001 From: raster Date: Wed, 30 Nov 2011 05:15:18 +0000 Subject: [PATCH] fix distcheck issues with examples. - always install examples, but build is optional. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/edje@65709 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- configure.ac | 32 +++++++-------- src/examples/Makefile.am | 104 ++++++++++++++++++----------------------------- 2 files changed, 55 insertions(+), 81 deletions(-) diff --git a/configure.ac b/configure.ac index 9fdf16d..b25fa6a 100644 --- a/configure.ac +++ b/configure.ac @@ -550,22 +550,22 @@ AC_ARG_ENABLE([install-examples], AM_CONDITIONAL([INSTALL_EXAMPLES], [test "x${install_examples}" = "xyes"]) build_examples="no" -dnl AC_ARG_ENABLE([build-examples], -dnl AC_HELP_STRING([--enable-build-examples], -dnl [Enable building examples. This requires extra denpendencies. If you don't have them installed yet, don't build with this option or it will fail. Build again when you have it, overriding the previous installation). @<:@default==disabled@:>@]), -dnl [ -dnl if test "x${enableval}" = "xyes" ; then -dnl build_examples="yes" -dnl edje_cc=$($PKG_CONFIG --variable=prefix edje)/bin/edje_cc -dnl # put in here the dependencies for Edje' examples. They are -dnl # meant to be 'real world' usage examples, thus one will be -dnl # using higher level libraries on these programs -dnl AC_SUBST(edje_cc) -dnl else -dnl build_examples="no" -dnl fi -dnl ], -dnl [build_examples="no"]) +AC_ARG_ENABLE([build-examples], + AC_HELP_STRING([--enable-build-examples], + [Enable building examples. This requires extra denpendencies. If you don't have them installed yet, don't build with this option or it will fail. Build again when you have it, overriding the previous installation). @<:@default==disabled@:>@]), + [ + 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 + ], + [build_examples="no"]) AM_CONDITIONAL([BUILD_EXAMPLES], [test "x${build_examples}" = "xyes"]) AC_SUBST(requirement_edje) diff --git a/src/examples/Makefile.am b/src/examples/Makefile.am index 103c869..b6f6ae1 100644 --- a/src/examples/Makefile.am +++ b/src/examples/Makefile.am @@ -1,12 +1,15 @@ MAINTAINERCLEANFILES = Makefile.in pkglibdir = $(datadir)/$(PACKAGE)/examples + if ENABLE_MULTISENSE MULTISENSE_EDC_FILE = multisense.edc SND_DIR = -sd $(srcdir) endif + #put here all EDCs one needs to the examples -EDCS = basic.edc \ +EDCS = \ + basic.edc \ swallow.edc \ text.edc \ table.edc \ @@ -20,26 +23,48 @@ EDCS = basic.edc \ sigtest.edc \ $(MULTISENSE_EDC_FILE) +.edc.edj: + $(edje_cc) -v -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) + +EDJS = $(EDCS:%.edc=%.edj) + filesdir = $(datadir)/$(PACKAGE)/examples -files_DATA = +files_DATA = \ + $(EDCS) \ + bubble.png \ + red.png \ + test.png \ + Vera.ttf \ + edje-basic.c \ + edje-swallow.c \ + edje-text.c \ + edje-table.c \ + edje-box.c \ + edje-box2.c \ + edje-drag.c \ + edje-signals-messages.c \ + edje-color-class.c \ + edje-perspective.c \ + edje-animations.c \ + sigtest.c + +EXTRA_DIST = $(files_DATA) if BUILD_EXAMPLES AM_CPPFLAGS = \ --I. \ --I$(top_srcdir)/src/lib \ --I$(top_srcdir)/src/lib/include \ --DPACKAGE_BIN_DIR=\"$(bindir)\" \ --DPACKAGE_LIB_DIR=\"$(libdir)\" \ --DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ --DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" - -pkglib_PROGRAMS = + -I. \ + -I$(top_srcdir)/src/lib \ + -I$(top_srcdir)/src/lib/include \ + -DPACKAGE_BIN_DIR=\"$(bindir)\" \ + -DPACKAGE_LIB_DIR=\"$(libdir)\" \ + -DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \ + -DPACKAGE_EXAMPLES_DIR=\"$(datadir)/$(PACKAGE)/examples\" \ + @EDJE_CFLAGS@ -#the ones using ecore_evas follow -AM_CPPFLAGS += @EDJE_CFLAGS@ +files_DATA += $(EDJS) -pkglib_PROGRAMS += \ +pkglib_PROGRAMS = \ edje-basic \ edje-swallow \ edje-text \ @@ -55,55 +80,4 @@ pkglib_PROGRAMS += \ LDADD = $(top_builddir)/src/lib/libedje.la @EDJE_LIBS@ -.edc.edj: - $(edje_cc) -v -id $(srcdir) $(SND_DIR) $< $(builddir)/$(@F) - -EDJS = $(EDCS:%.edc=%.edj) - -files_DATA += $(EDJS) - -endif # if BUILD_EXAMPLES - -if INSTALL_EXAMPLES - -#put here additional data when installing examples -files_DATA += \ - $(srcdir)/bubble.png \ - $(srcdir)/red.png \ - $(srcdir)/test.png \ - $(srcdir)/Vera.ttf - -files_DATA += \ - $(EDCS) \ - $(srcdir)/edje-basic.c \ - $(srcdir)/edje-swallow.c \ - $(srcdir)/edje-text.c \ - $(srcdir)/edje-table.c \ - $(srcdir)/edje-box.c \ - $(srcdir)/edje-box2.c \ - $(srcdir)/edje-drag.c \ - $(srcdir)/edje-signals-messages.c \ - $(srcdir)/edje-color-class.c \ - $(srcdir)/edje-perspective.c \ - $(srcdir)/edje-animations.c \ - $(srcdir)/sigtest.c endif - -EXTRA_DIST = $(EDCS) \ - $(srcdir)/bubble.png \ - $(srcdir)/red.png \ - $(srcdir)/test.png \ - $(srcdir)/Vera.ttf \ - $(srcdir)/edje-basic.c \ - $(srcdir)/edje-swallow.c \ - $(srcdir)/edje-text.c \ - $(srcdir)/edje-table.c \ - $(srcdir)/edje-box.c \ - $(srcdir)/edje-box2.c \ - $(srcdir)/edje-drag.c \ - $(srcdir)/edje-signals-messages.c \ - $(srcdir)/edje-color-class.c \ - $(srcdir)/edje-perspective.c \ - $(srcdir)/edje-animations.c \ - $(srcdir)/sigtest.c - -- 2.7.4