Gitify 'make dist' and implement 'locdiff'
This commit is contained in:
parent
e365b90d5f
commit
09642b4eec
5 changed files with 11 additions and 52 deletions
22
Makefile
22
Makefile
|
|
@ -35,21 +35,6 @@ libr:
|
|||
binr:
|
||||
cd binr && ${MAKE} all
|
||||
|
||||
R=$(shell hg tags|head -n2 | tail -n1|awk '{print $$2}' |cut -d : -f 1)
|
||||
T=$(shell hg tip|grep changeset:|cut -d : -f 2)
|
||||
.PHONY: chlog
|
||||
chlog:
|
||||
@hg log -v -r tip:$R > chlog
|
||||
@echo "-=== release ${VERSION} ===-"
|
||||
@echo "hg tag -r $T ${VERSION}"
|
||||
@printf "last commit: "
|
||||
@hg log -r tip | grep date: |cut -d : -f 2- |sed -e 's,^\ *,,g'
|
||||
@printf "oldest commit: "
|
||||
@hg log -r $R | grep date: |cut -d : -f 2- |sed -e 's,^\ *,,g'
|
||||
@printf "Commits: "
|
||||
@grep changeset: chlog |wc -l
|
||||
@grep -v : chlog | grep -v '^$$'
|
||||
|
||||
w32:
|
||||
make clean
|
||||
# TODO: add support for debian
|
||||
|
|
@ -183,10 +168,11 @@ r2-bindings-dist:
|
|||
cd r2-bindings && ${MAKE} dist
|
||||
|
||||
dist:
|
||||
git log $$(git show-ref `git tag |tail -n1`)..HEAD > ChangeLog
|
||||
VERSION=${VERSION} ; \
|
||||
FILES=`hg manifest | grep -v r2-bindings | sed -e s,^,radare2-${VERSION}/,` ; \
|
||||
FILES=`git ls-files | grep -v r2-bindings | sed -e s,^,radare2-${VERSION}/,` ; \
|
||||
cd .. && mv radare2 radare2-${VERSION} && \
|
||||
${TAR} radare2-${VERSION}.tar.gz $${FILES} ;\
|
||||
${TAR} radare2-${VERSION}.tar.gz $${FILES} radare2-${VERSION}/ChangeLog ;\
|
||||
mv radare2-${VERSION} radare2
|
||||
|
||||
pub:
|
||||
|
|
@ -194,7 +180,7 @@ pub:
|
|||
|
||||
shot:
|
||||
DATE=`date '+%Y%m%d'` ; \
|
||||
FILES=`hg manifest | sed -e s,^,radare2-${DATE}/,` ; \
|
||||
FILES=`git ls-files | sed -e s,^,radare2-${DATE}/,` ; \
|
||||
cd .. && mv radare2 radare2-$${DATE} && \
|
||||
${TAR} radare2-$${DATE}.tar.gz $${FILES} ;\
|
||||
mv radare2-$${DATE} radare2 && \
|
||||
|
|
|
|||
5
TODO
5
TODO
|
|
@ -19,11 +19,6 @@
|
|||
* io_next must work properly
|
||||
- r_io must read in 512 or 4096 aligned blocks (get next section?)
|
||||
|
||||
Discuss
|
||||
Add $EDITOR alias for file open(read/write) -
|
||||
pd > -
|
||||
wf -
|
||||
...
|
||||
=======
|
||||
|
||||
* refactor vmenus.c -> refresh function must be redefined for each menu
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ EWF_LDFLAGS=@EWF_LDFLAGS@
|
|||
HAVE_LIB_GMP=@HAVE_LIB_GMP@
|
||||
LIL_ENDIAN=@LIL_ENDIAN@
|
||||
|
||||
MKPLUGINS=mk/hg-utils.mk mk/stat.mk mk/sloc.mk
|
||||
MKPLUGINS=mk/stat.mk mk/sloc.mk
|
||||
|
||||
COMPILER=@USERCC@
|
||||
STATIC_DEBUG=0
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
# radare :: pancake // nopcode.org
|
||||
# Makefile helpers for mercurial
|
||||
|
||||
hg-miss:
|
||||
${MAKE} hg-miss2 | grep -v sys| grep -v git| grep -v maemo
|
||||
|
||||
hg-miss2:
|
||||
@-hg st . | grep -e vala$$ -e mk$$ | grep ^? | grep -v config-user | cut -c 2- || true
|
||||
@-hg st . | grep -e \\.c$$ -e \\.h$$ | grep -v vapi | grep ^? | grep -v r_userconf | cut -c 2- || true
|
||||
@-hg st . | grep -e \\.vapi$$ -e \\.acr$$ -e README$$ -e TODO$$ | grep ^? | cut -c 2- || true
|
||||
|
||||
FILES?=
|
||||
hg-locdiff:
|
||||
@A=`hg diff ${FILES} | grep -v '+++' | grep ^+ |wc -l` ; \
|
||||
B=`hg diff ${FILES} | grep -v -- '---' | grep ^- |wc -l` ; \
|
||||
echo $$((A-B))
|
||||
|
||||
hg-help:
|
||||
@echo "hg-utils.mk mercurial utilities"
|
||||
@echo "-----------.-------------------"
|
||||
@echo "hg-miss | list interesting missing files"
|
||||
@echo "hg-locdiff | count the difference of LOCs for current commit or FILES"
|
||||
@echo " $$ hg-locdiff \"FILES=Makefile foo.c\""
|
||||
|
||||
hg-ci:
|
||||
@hg diff > /tmp/diff
|
||||
@hg ci
|
||||
|
|
@ -8,4 +8,9 @@ sloc:
|
|||
done ; \
|
||||
printf "$$total\tTOTAL\n"
|
||||
|
||||
.PHONY: sloc
|
||||
locdiff:
|
||||
@A=`git diff | grep -v +++ | grep ^+ |wc -l` ; \
|
||||
B=`git diff | grep -v -- ---| grep ^- |wc -l` ; \
|
||||
echo $$((A-B))
|
||||
|
||||
.PHONY: sloc locdiff
|
||||
|
|
|
|||
Loading…
Reference in a new issue