From 37a492bdd0c96a511a3fee0e5f080b4fcff0f0a8 Mon Sep 17 00:00:00 2001 From: pancake Date: Wed, 13 Jun 2012 18:15:28 +0200 Subject: [PATCH] * More fixes for the r2-bindings configure --- r2-bindings/Makefile | 7 ++++++- r2-bindings/check-langs.sh | 19 +++++++++++++------ r2-bindings/configure-langs | 8 +++++--- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/r2-bindings/Makefile b/r2-bindings/Makefile index 2814dee9..b0bed9d1 100644 --- a/r2-bindings/Makefile +++ b/r2-bindings/Makefile @@ -34,7 +34,12 @@ $(foreach p,${ALANGS},$(eval $(call ADD_lang,$(p)))) .PHONY: ${INSTALL_TARGETS} ${INSTALL_EXAMPLE_TARGETS} ${LANG} ifeq ($(DEVEL_MODE),1) -all: supported.langs ruby perl python lua go gear gir +LANGS=$(shell cat supported.langs|sort|uniq) +all: supported.langs + @for a in ${LANGS} ; do \ + [ $$a = valac ] && continue; \ + (cd $$a && ${MAKE} ) ; done + supported.langs: CC=${CC} CXX=${CXX} sh check-langs.sh else diff --git a/r2-bindings/check-langs.sh b/r2-bindings/check-langs.sh index 2604d099..32558eaa 100755 --- a/r2-bindings/check-langs.sh +++ b/r2-bindings/check-langs.sh @@ -54,16 +54,23 @@ for a in lua python php5 ; do [ -f $a/r_core_wrap.cxx ] && SUP_LANGS="$a ${SUP_LANGS}" done -for a in valac g++ ; do - $a --help > /dev/null 2>&1 +# check g++ + ${CXX} --help >/dev/null 2>&1 if [ $? = 0 ]; then - echo " - $a: yes" - SUP_LANGS="$a ${SUP_LANGS}" + echo " - cxx: yes ($CXX)" + SUP_LANGS="cxx ${SUP_LANGS}" else - echo " - $a: no" + echo " - cxx: no" fi -done +# check valac + valac --help > /dev/null 2>&1 + if [ $? = 0 ]; then + echo " - valac: yes" + SUP_LANGS="valac ${SUP_LANGS}" + else + echo " - valac: no" + fi :> supported.langs for a in ${SUP_LANGS}; do diff --git a/r2-bindings/configure-langs b/r2-bindings/configure-langs index dd9e3c29..1026234e 100755 --- a/r2-bindings/configure-langs +++ b/r2-bindings/configure-langs @@ -32,7 +32,7 @@ disable() { exit 1 fi ENABLE="" - DISABLE="echo $1 | sed -e 's/:/ /g'" + DISABLE="`echo $1 | sed -e 's/:/ /g'`" } MODE="" @@ -63,6 +63,10 @@ if [ -n "${DISABLE}" ]; then rm -f .sl fi +mv supported.langs .sl +cat .sl | sort | uniq > supported.langs +rm -f .sl + echo "Supported langs:" cat supported.langs | sed -e 's,^, - ,' @@ -70,6 +74,4 @@ cat supported.langs | sed -e 's,^, - ,' # check for perl :> langs.cfg -echo "Supported langs: $(cat supported.langs)" - exit 0