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