* Cleanup the build of the python r_lang plugin

* Use ${MAKE} instead of 'make' in swig/ (Thanks Edd Barrett!)
* Fix build in OpenBSD (missing #include)
This commit is contained in:
pancake 2011-05-14 13:10:51 +02:00
parent 9e6a761b69
commit 7a4343aa1e
4 changed files with 22 additions and 18 deletions

View File

@ -2,6 +2,7 @@
#include <r_fs.h>
#include "../config.h"
#include <errno.h>
#include "p/grub/include/grub/msdos_partition.h"
static RFSPlugin *fs_static_plugins[] = { R_FS_STATIC_PLUGINS };

View File

@ -28,12 +28,8 @@ lang_python.${EXT_SO}:
-L${HOME}/.wine/drive_c/Python27/libs -L../../core/ -lr_core \
${LDFLAGS_LIB} -shared -o lang_python.${EXT_SO} python.c -lpython27
else
PYCFLAGS=`python-config --cflags 2>/dev/null | sed -e 's/-arch [^\s]*//g' | sed s,-Wstrict-prototypes,,g`
PYCFLAGS+=`python2-config --cflags 2>/dev/null | sed -e 's/-arch [^\s]*//g' | sed s,-Wstrict-prototypes,,g`
PYCFLAGS+=`python2.5-config --cflags 2>/dev/null | sed -e 's/-arch [^\s]*//g' | sed s,-Wstrict-prototypes,,g`
PYLDFLAGS=`python-config --cflags 2>/dev/null | sed -e 's/-arch [^\s]*//g' | sed s,-Wstrict-prototypes,,g`
PYLDFLAGS+=`python2-config --cflags 2>/dev/null | sed -e 's/-arch [^\s]*//g' | sed s,-Wstrict-prototypes,,g`
PYLDFLAGS+=`python2.5-config --cflags 2>/dev/null | sed -e 's/-arch [^\s]*//g' | sed s,-Wstrict-prototypes,,g`
PYCFLAGS=$(shell ./pycfg --cflags)
PYLDFLAGS=$(shell ./pycfg --libs)
lang_python.${EXT_SO}:
${CC} ${CFLAGS} ${PYCFLAGS} ${PYLDFLAGS} \

7
libr/lang/p/pycfg Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
PYTHONS="python python2 python2.5 python2.6 python2.7 python2.8 python3"
for a in ${PYTHONS} ; do
$a-config $@ | sed -e 's/-arch [^\s]*//g' | sed s,-Wstrict-prototypes,,g
[ $? = 0 ] && exit 0
done
exit 1

View File

@ -59,31 +59,31 @@ vdoc_pkg:
# TODO: unspaguetti this targets
perl:
@-[ "`grep perl supported.langs`" ] && cd perl && make ; true
@-[ "`grep perl supported.langs`" ] && cd perl && ${MAKE} ; true
python:
@-[ "`grep python supported.langs`" ] && cd python && make ; true
@-[ "`grep python supported.langs`" ] && cd python && ${MAKE} ; true
ruby:
@-[ "`grep ruby supported.langs`" ] && cd ruby && make ; true
@-[ "`grep ruby supported.langs`" ] && cd ruby && ${MAKE} ; true
lua:
@-[ "`grep lua supported.langs`" ] && cd lua && make ; true
@-[ "`grep lua supported.langs`" ] && cd lua && ${MAKE} ; true
go:
@-[ -x "${GOBIN}/5g" -o -x "${GOBIN}/6g" -o -x "${GOBIN}/8g" ] && \
[ "`grep go supported.langs`" ] && cd go && make ; true
[ "`grep go supported.langs`" ] && cd go && ${MAKE} ; true
java:
@-[ "`grep java supported.langs`" ] && cd java && make
@-[ "`grep java supported.langs`" ] && cd java && ${MAKE}
test:
cd perl && make test
cd python && make test
cd ruby && make test
cd lua && make test
cd go && make test
cd java && make test
cd perl && ${MAKE} test
cd python && ${MAKE} test
cd ruby && ${MAKE} test
cd lua && ${MAKE} test
cd go && ${MAKE} test
cd java && ${MAKE} test
install-python:
@# py2.6 in debian uses dist-packages, but site-packages in arch and osx..