-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
86 lines (76 loc) · 2.36 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# sunny256/utils.git/Makefile
# File ID: 455af534-fd45-11dd-a4b7-000475e441b9
# Author: Øyvind A. Holm <[email protected]>
.PHONY: default
default:
cd Lib && $(MAKE)
cd src && $(MAKE)
cd Git && $(MAKE)
.PHONY: clean
clean:
rm -f synced.sqlite.*.bck *.pyc
cd tests && $(MAKE) clean
cd Lib && $(MAKE) clean
cd src && $(MAKE) clean
cd Git && $(MAKE) clean
find . -name .testadd.tmp -type d -print0 | xargs -0r rm -rf
.PHONY: lgd
lgd:
git lg --date-order $$(git branch -a | cut -c3- | \
grep -Ee 'remotes/(Spread|bitbucket|repoorcz|sunbase)/' | \
grep -v 'HEAD -> ') $$(git branch | cut -c3-)
.PHONY: obsolete
obsolete:
git delrembr $$(cat Div/obsolete-refs.txt); true
.PHONY: remotes
remotes:
git remote add \
sunbase [email protected]:/home/sunny/Git/utils.git; true
git remote add \
bellmann sunny@bellmann:/home/sunny/repos/Git/utils.git; true
git remote add bitbucket [email protected]:sunny256/utils.git; true
git remote add gitlab [email protected]:sunny256/utils.git; true
git remote add \
repoorcz ssh://[email protected]/srv/git/sunny256-utils.git; true
.PHONY: test
test:
test ! -e synced.sql.lock
test -z "$$(filesynced --valid-sha 2>&1)"
test "$$(git log | grep -- -by: | sort -u | wc -l)" = "2"
cd tests && $(MAKE) test
cd Lib && $(MAKE) test
cd src && $(MAKE) test
cd Git && $(MAKE) test
.PHONY: testport
testport:
cd tests && $(MAKE) testport
cd Lib && $(MAKE) testport
cd src && $(MAKE) testport
cd Git && $(MAKE) testport
.PHONY: unmerged
unmerged:
git log --graph --date-order --format=fuller -p --decorate=short \
$$(git br -a --contains firstrev --no-merged | git nocom) \
^master
.PHONY: update-synced
update-synced:
test ! -e .update-synced_token.tmp
test ! -e synced.sql.lock
filesynced --lock >.update-synced_token.tmp
git ls-files | while read f; do \
if test -f "$$f" -a ! -h "$$f" ; then \
echo "INSERT INTO synced (file) VALUES ('$$f');"; \
fi; \
done | sqlite3 synced.sqlite 2>/dev/null || true
echo "SELECT file FROM synced ORDER BY file;" | \
sqlite3 synced.sqlite | while read f; do \
if test ! -f "$$f"; then \
echo "DELETE FROM synced WHERE file = '$$f';"; \
echo "DELETE FROM todo WHERE file = '$$f';"; \
fi; \
done | sqlite3 synced.sqlite
filesynced --unlock $$(cat .update-synced_token.tmp)
rm -f .update-synced_token.tmp
.PHONY: valgrind
valgrind:
cd Git && $(MAKE) valgrind