Skip to content

Commit

Permalink
* More fixes for the r2-bindings configure
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Jun 13, 2012
1 parent 62101a6 commit 37a492b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
7 changes: 6 additions & 1 deletion r2-bindings/Makefile
Expand Up @@ -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
Expand Down
19 changes: 13 additions & 6 deletions r2-bindings/check-langs.sh
Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions r2-bindings/configure-langs
Expand Up @@ -32,7 +32,7 @@ disable() {
exit 1
fi
ENABLE=""
DISABLE="echo $1 | sed -e 's/:/ /g'"
DISABLE="`echo $1 | sed -e 's/:/ /g'`"
}

MODE=""
Expand Down Expand Up @@ -63,13 +63,15 @@ 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,^, - ,'

# check for python
# check for perl
:> langs.cfg

echo "Supported langs: $(cat supported.langs)"

exit 0

0 comments on commit 37a492b

Please sign in to comment.