Show git-tip hash in r2 -v

dist now contains r2-bindings directory
use more parse locks in mk files
do not add invalid functions at UT64_MAX
Use -j8 in sys/install.sh again
This commit is contained in:
pancake 2012-08-14 01:48:39 +02:00
parent 10b4b5546c
commit 6b991786ab
10 changed files with 25 additions and 4 deletions

View File

@ -170,7 +170,7 @@ r2-bindings-dist:
dist:
git log $$(git show-ref `git tag |tail -n1`)..HEAD > ChangeLog
VERSION=${VERSION} ; \
FILES=`git ls-files | grep -v r2-bindings | sed -e s,^,radare2-${VERSION}/,` ; \
FILES=`git ls-files | sed -e s,^,radare2-${VERSION}/,` ; \
cd .. && mv radare2 radare2-${VERSION} && \
${TAR} radare2-${VERSION}.tar.gz $${FILES} radare2-${VERSION}/ChangeLog ;\
mv radare2-${VERSION} radare2

View File

@ -4,7 +4,7 @@ BINDEPS+=r_bin r_debug r_anal r_diff r_reg r_bp r_io r_cmd r_fs
BINDEPS+=r_sign r_print r_lang r_asm r_syscall r_db r_hash r_line
BINDEPS+=r_magic r_socket r_flags r_util r_th r_egg
CFLAGS+=-DR2_BIRTH=\"`date +%Y-%m-%d`\"
CFLAGS+=-DR2_BIRTH=\"`date +%Y-%m-%d`\" -DR2_GITTIP=\"$(GIT_TIP)\"
include ../binr.mk

View File

@ -57,7 +57,10 @@ static int main_help(int line) {
}
static int main_version() {
const char *gittip = R2_GITTIP;
printf ("radare2 "R2_VERSION" @ "R_SYS_OS"-"R_SYS_ENDIAN"-"R_SYS_ARCH"-%d build "R2_BIRTH"\n", R_SYS_BITS&8?64:32);
if (*gittip)
printf ("commit: %s\n", gittip);
return 0;
}

View File

@ -49,3 +49,5 @@ USE_LIB_MAGIC=@USE_LIB_MAGIC@
SSL_CFLAGS=@SSL_CFLAGS@
SSL_LDFLAGS=@SSL_LDFLAGS@
GIT_TIP=$(shell git log HEAD^..HEAD|head -n1|cut -d ' ' -f2)

View File

@ -6,6 +6,9 @@ case "$1" in
*)
[ plugins.def.cfg -nt ./plugins.cfg ] && rm -f plugins.cfg
[ ! -e plugins.cfg ] && ./configure-plugins $@
r2-bindings/configure-langs $@
[ -e r2-bindings/configure-langs ] && \
r2-bindings/configure-langs $@
TIP=`git log HEAD^..HEAD|head -n1|cut -d ' ' -f2`
echo
;;
esac

View File

@ -1,3 +1,6 @@
ifeq ($(_INCLUDE_CONFIG_MK_),)
_INCLUDE_CONFIG_MK_=1
CFLAGS_APPEND=
GNULINUX=1
BSD=0

View File

@ -140,3 +140,6 @@ else
libname=-shared -o $1.${EXT_SO} ${LDFLAGS_SONAME}$1.${EXT_SO}.${LIBVERSION}
endif
endif
# -- singleton
endif

View File

@ -276,6 +276,10 @@ error:
free (buf);
// ugly hack to free fcn
if (fcn) {
if (fcn->addr == UT64_MAX) {
r_anal_fcn_free (fcn);
return R_FALSE;
}
// TODO: mark this function as not properly analyzed
eprintf ("Analysis of function at 0x%08"PFMT64x" has failed\n", fcn->addr);
if (!fcn->name) {

View File

@ -1,3 +1,5 @@
ifeq ($(_INCLUDE_RULES_MK_),)
_INCLUDE_RULES_MK_=1
LIBR:=$(abspath $(dir $(lastword $(MAKEFILE_LIST))))
include $(LIBR)/config.mk
@ -136,3 +138,4 @@ endif
#-------------------------------
# TODO: deprecate RTDEBUG and R_DEBUG
endif

View File

@ -1,6 +1,6 @@
#!/bin/sh
MAKE_JOBS=1
MAKE_JOBS=8
MAKE=make
gmake --help >/dev/null 2>&1