eenvader: autofoo cleanup thx to vtorri

SVN revision: 63672
This commit is contained in:
Boris Faure 2011-09-29 19:45:23 +00:00
parent d2ea5e363d
commit ee46f835bf
6 changed files with 79 additions and 26 deletions

1
.gitignore vendored
View File

@ -33,3 +33,4 @@
/data/Makefile
/data/Makefile.in
/data/eenvaders.edj
/intl

1
README Normal file
View File

@ -0,0 +1 @@
EEnvader.fractal takes inspiration from http://levitated.net/daily/levInvaderFractal.html

View File

@ -27,33 +27,16 @@ m4_ifdef([AM_GNU_GETTEXT_VERSION], [
AM_GNU_GETTEXT_VERSION([0.14])
])
PKG_CHECK_MODULES(EINA, [eina])
PKG_CHECK_MODULES(EVAS, [evas])
PKG_CHECK_MODULES(ECORE, [ecore])
PKG_CHECK_MODULES(ECORE_EVAS, [ecore-evas])
PKG_CHECK_MODULES(ENLIGHTENMENT, [enlightenment])
PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([EENVADER], [ecore-evas ecore evas eina])
datadir_edj=$(pkg-config --variable=prefix enlightenment)/share/enlightenment/data/backgrounds
PKG_CHECK_MODULES(EDJE, [edje >= 0.5.0])
EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
vmaj=$(pkg-config --variable=vmaj edje)
MODULE_ARCH="$host_os-$host_cpu-$vmaj.0.0"
AC_SUBST(MODULE_ARCH)
AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
# Find edje_cc
AC_ARG_WITH(edje-cc,
AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]),
[
v=$withval;
EDJE_CC=$v
],[
EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc
]
)
AC_SUBST(EDJE_CC)
AC_MSG_CHECKING([Which edje_cc to use])
AC_MSG_RESULT(${EDJE_CC})
datadir=$(pkg-config --variable=modules edje)/${PACKAGE}
AC_ARG_ENABLE(homedir-install,
AS_HELP_STRING([--enable-homedir-install], [Install module in homedir]),

View File

@ -9,7 +9,7 @@ files_DATA = eenvaders.edj
EXTRA_DIST = eenvaders.edc
eenvaders.edj: eenvaders.edc
$(EDJE_CC) $(EDJE_FLAGS) $< $@
$(edje_cc) $(EDJE_FLAGS) $< $@
clean-local:
rm -rf eenvaders.edj *~

71
m4/efl_binary.m4 Normal file
View File

@ -0,0 +1,71 @@
dnl Copyright (C) 2010 Vincent Torri <vtorri at univ-evry dot fr>
dnl That code is public domain and can be freely used or copied.
dnl Macro that check if a binary is built or not
dnl Usage: EFL_ENABLE_BIN(binary)
dnl Call AC_SUBST(BINARY_PRG) (BINARY is the uppercase of binary, - being transformed into _)
dnl Define have_binary (- is transformed into _)
dnl Define conditional BUILD_BINARY (BINARY is the uppercase of binary, - being transformed into _)
AC_DEFUN([EFL_ENABLE_BIN],
[
m4_pushdef([UP], m4_translit([[$1]], [-a-z], [_A-Z]))dnl
m4_pushdef([DOWN], m4_translit([[$1]], [-A-Z], [_a-z]))dnl
have_[]m4_defn([DOWN])="yes"
dnl configure option
AC_ARG_ENABLE([$1],
[AC_HELP_STRING([--disable-$1], [disable building of ]DOWN)],
[
if test "x${enableval}" = "xyes" ; then
have_[]m4_defn([DOWN])="yes"
else
have_[]m4_defn([DOWN])="no"
fi
])
AC_MSG_CHECKING([whether to build ]DOWN[ binary])
AC_MSG_RESULT([$have_[]m4_defn([DOWN])])
if test "x$have_[]m4_defn([DOWN])" = "xyes"; then
UP[]_PRG=DOWN[${EXEEXT}]
fi
AC_SUBST(UP[]_PRG)
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)
])

View File

@ -21,12 +21,9 @@ eenvaders_SOURCES = \
eenvaders_evas_smart.c \
eenvaders.c
eenvaders_CPPFLAGS = \
@ECORE_EVAS_CFLAGS@
@EENVADER_CFLAGS@
eenvaders_LDADD = \
@EINA_LIBS@ \
@EVAS_LIBS@ \
@ECORE_LIBS@ \
@ECORE_EVAS_LIBS@
@EENVADER_LIBS@
clean-local:
rm -rf *~