Skip to content

Commit

Permalink
Update sdb to 0.5, sdb is now public api
Browse files Browse the repository at this point in the history
Update pkgconfig files
sdb now supports json and cas operations
sync pair.c to use the new cas api
  • Loading branch information
radare committed Sep 3, 2012
1 parent f2db41c commit 3b65f42
Show file tree
Hide file tree
Showing 58 changed files with 2,192 additions and 593 deletions.
48 changes: 19 additions & 29 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ plugins.cfg:
echo " Please, run ./configure first" ; echo ; exit 1 ; fi
./configure-plugins

gitpush:
sh mk/gitpush.sh

farm:
./sys/farm/run.sh

Expand Down Expand Up @@ -72,20 +69,14 @@ w32beta: w32dist
scp radare2-bindings-w32-${VERSION}.zip ${REMOTE}

clean:
cd libr && ${MAKE} clean
cd binr && ${MAKE} clean
cd shlr && ${MAKE} clean
for a in libr binr shlr ; do (${MAKE} clean) ; done

mrproper:
cd libr && ${MAKE} mrproper
cd binr && ${MAKE} mrproper
cd shlr && ${MAKE} mrproper
rm -f config-user.mk plugins.cfg libr/config.h libr/include/r_userconf.h libr/config.mk
for a in libr binr shlr ; do (${MAKE} mrproper) ; done
rm -f config-user.mk plugins.cfg libr/config.h
rm -f libr/include/r_userconf.h libr/config.mk
rm -f pkgcfg/*.pc

mrpopper:
@echo 8====================D

pkgcfg:
cd libr && ${MAKE} pkgcfg

Expand Down Expand Up @@ -118,18 +109,22 @@ install: install-doc install-man
mkdir -p ${DESTDIR}/${LIBDIR}/radare2/${VERSION}/hud
cp -f libr/core/hud/main ${DESTDIR}/${LIBDIR}/radare2/${VERSION}/hud/

DLIBDIR=$(DESTDIR)/$(LIBDIR)

install-pkgconfig-symlink:
@${INSTALL_DIR} ${DESTDIR}/${LIBDIR}/pkgconfig
cd pkgcfg ; for a in *.pc ; do ln -fs $${PWD}/$$a ${DESTDIR}/${LIBDIR}/pkgconfig/$$a ; done
@${INSTALL_DIR} ${DLIBDIR}/pkgconfig
cd pkgcfg ; for a in *.pc ; do ln -fs $${PWD}/$$a ${DLIBDIR}/pkgconfig/$$a ; done

symstall install-symlink: install-man-symlink install-doc-symlink install-pkgconfig-symlink
cd libr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR=${DESTDIR}
cd binr && ${MAKE} install-symlink PREFIX=${PREFIX} DESTDIR=${DESTDIR}
for a in ${DATADIRS} ; do \
(cd $$a ; echo $$a ; ${MAKE} install-symlink LIBDIR=${LIBDIR} PREFIX=${PREFIX} DESTDIR=${DESTDIR} ); \
for a in ${DATADIRS} ; do (\
cd $$a ; \
echo $$a ; \
${MAKE} install-symlink LIBDIR=${LIBDIR} PREFIX=${PREFIX} DESTDIR=${DESTDIR} ); \
done
mkdir -p ${DESTDIR}/${LIBDIR}/radare2/${VERSION}/hud
ln -fs ${PWD}/libr/core/hud/main ${DESTDIR}/${LIBDIR}/radare2/${VERSION}/hud/main
mkdir -p ${DLIBDIR}/radare2/${VERSION}/hud
ln -fs ${PWD}/libr/core/hud/main ${DLIBDIR}/radare2/${VERSION}/hud/main

deinstall uninstall:
cd libr && ${MAKE} uninstall PARENT=1 PREFIX=${PREFIX} DESTDIR=${DESTDIR}
Expand Down Expand Up @@ -173,14 +168,11 @@ r2-bindings-dist:

dist:
git log $$(git show-ref `git tag |tail -n1`)..HEAD > ChangeLog
VERSION=${VERSION} ; \
DIR=`basename $$PWD` ; \
FILES=`git ls-files | sed -e s,^,radare2-${VERSION}/,` ; \
cd .. && mv radare2 radare2-${VERSION} && \
cd .. && mv $${DIR} radare2-${VERSION} && \
${TAR} radare2-${VERSION}.tar.gz $${FILES} radare2-${VERSION}/ChangeLog ;\
mv radare2-${VERSION} radare2

pub:
scp ../radare2-${VERSION}.tar.gz radare.org:/srv/http/radareorg/get
mv radare2-${VERSION} $${DIR}

shot:
DATE=`date '+%Y%m%d'` ; \
Expand All @@ -190,9 +182,7 @@ shot:
mv radare2-$${DATE} radare2 && \
scp radare2-$${DATE}.tar.gz radare.org:/srv/http/radareorg/get/shot

# TODO: test/ must be removed
.PHONY: test tests
test tests:
tests:
@if [ -d r2-regressions ]; then \
cd r2-regressions ; git pull ; \
else \
Expand All @@ -203,4 +193,4 @@ test tests:
include ${MKPLUGINS}

.PHONY: all clean mrproper install symstall uninstall deinstall dist shot pkgcfg
.PHONY: r2-bindings r2-bindings-dist libr binr install-man version w32dist
.PHONY: r2-bindings r2-bindings-dist libr binr install-man version w32dist tests
3 changes: 2 additions & 1 deletion binr/radare2/radare2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#define USE_THREADS 1

#include <sdb.h>
#include <r_core.h>
#include <r_io.h>
#include <stdio.h>
Expand Down Expand Up @@ -128,7 +129,7 @@ int main(int argc, char **argv) {
RList *cmds = r_list_new ();
RList *evals = r_list_new ();
int cmdfilei = 0;

if (r_sys_getenv ("R_DEBUG"))
r_sys_crash_handler ("gdb --pid %d");

Expand Down
3 changes: 1 addition & 2 deletions libr/anal/anal.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* radare - LGPL - Copyright 2009-2012 */
/* - nibble<[email protected]> + pancake<nopcode.org> */
/* radare - LGPL - Copyright 2009-2012 - pancake, nibble */

#include <r_anal.h>
#include <r_util.h>
Expand Down
2 changes: 1 addition & 1 deletion libr/anal/cparse/pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static void seq(CparsePP *ppp)
if (endoflinep(ppp->cl))
return;
input = nextchar(ppp->cl, input);
}
}

cmd = skipwhite(ppp->cl, nextchar(ppp->cl, input));
input = getpreprocessorcmd(ppp->cl, cmd, &id);
Expand Down
Loading

0 comments on commit 3b65f42

Please sign in to comment.