Debian Codegraph @

Makefile

raw ◀ ▶
1 Debian patch touch this file
1 # Makefile for Kyoto Cabinet for Python
2
3
4 PACKAGE = kyotocabinet-python
5 VERSION = 1.23
6 PACKAGEDIR = $(PACKAGE)-$(VERSION)
7 PACKAGETGZ = $(PACKAGE)-$(VERSION).tar.gz
8
•9 ifndef $(PYTHON)
10 PYTHON = python3
11 endif
12
13 RUNENV = LD_LIBRARY_PATH=.:/lib:/usr/lib:/usr/local/lib:$(HOME)/lib
14
15
16 all :
17 $(PYTHON) setup.py build
18 cp -f build/*/*.so .
19 @printf '\n'
20 @printf '#================================================================\n'
21 @printf '# Ready to install.\n'
22 @printf '#================================================================\n'
23
24
25 clean :
26 rm -rf casket casket* *~ *.tmp *.kcss *.so *.pyc build hoge moge tako ika
27
28
29 install :
30 $(PYTHON) setup.py install
31 @printf '\n'
32 @printf '#================================================================\n'
33 @printf '# Thanks for using Kyoto Cabinet for Python.\n'
34 @printf '#================================================================\n'
35
36
37 uninstall :
38 $(PYTHON) setup.py install --record files.tmp
39 xargs rm -f < files.tmp
40
41
42 dist :
43 $(MAKE) clean
44 cd .. && tar cvf - $(PACKAGEDIR) | gzip -c > $(PACKAGETGZ)
45
46
47 check :
48 $(MAKE) DBNAME=":" RNUM="10000" check-each
49 $(MAKE) DBNAME="*" RNUM="10000" check-each
50 $(MAKE) DBNAME="%" RNUM="10000" check-each
51 $(MAKE) DBNAME="casket.kch" RNUM="10000" check-each
52 $(MAKE) DBNAME="casket.kct" RNUM="10000" check-each
53 $(MAKE) DBNAME="casket.kcd" RNUM="1000" check-each
54 $(MAKE) DBNAME="casket.kcf" RNUM="10000" check-each
55 @printf '\n'
56 @printf '#================================================================\n'
57 @printf '# Checking completed.\n'
58 @printf '#================================================================\n'
59
60
61 check-each :
62 rm -rf casket*
63 $(RUNENV) $(PYTHON) kctest.py order "$(DBNAME)" "$(RNUM)"
64 $(RUNENV) $(PYTHON) kctest.py order -rnd "$(DBNAME)" "$(RNUM)"
65 $(RUNENV) $(PYTHON) kctest.py order -etc "$(DBNAME)" "$(RNUM)"
66 $(RUNENV) $(PYTHON) kctest.py order -rnd -etc "$(DBNAME)" "$(RNUM)"
67 $(RUNENV) $(PYTHON) kctest.py order -th 4 "$(DBNAME)" "$(RNUM)"
68 $(RUNENV) $(PYTHON) kctest.py order -th 4 -rnd "$(DBNAME)" "$(RNUM)"
69 $(RUNENV) $(PYTHON) kctest.py order -th 4 -etc "$(DBNAME)" "$(RNUM)"
70 $(RUNENV) $(PYTHON) kctest.py order -th 4 -rnd -etc "$(DBNAME)" "$(RNUM)"
71 $(RUNENV) $(PYTHON) kctest.py order -cc -th 4 -rnd -etc "$(DBNAME)" "$(RNUM)"
72 $(RUNENV) $(PYTHON) kctest.py wicked "$(DBNAME)" "$(RNUM)"
73 $(RUNENV) $(PYTHON) kctest.py wicked -it 4 "$(DBNAME)" "$(RNUM)"
74 $(RUNENV) $(PYTHON) kctest.py wicked -th 4 "$(DBNAME)" "$(RNUM)"
75 $(RUNENV) $(PYTHON) kctest.py wicked -th 4 -it 4 "$(DBNAME)" "$(RNUM)"
76 $(RUNENV) $(PYTHON) kctest.py wicked -cc -th 4 -it 4 "$(DBNAME)" "$(RNUM)"
77 $(RUNENV) $(PYTHON) kctest.py misc "$(DBNAME)"
78 rm -rf casket*
79
80
81 check-forever :
82 while true ; \
83 do \
84 $(MAKE) check || break ; \
85 done
86
87
88 doc :
89 $(MAKE) docclean
90 cp -f kyotocabinet-doc.py kyotocabinet.py
91 -[ -f kyotocabinet.so ] && mv -f kyotocabinet.so kyotocabinet-mod.so || true
92 -epydoc --name kyotocabinet --no-private --no-sourcecode -o doc -q kyotocabinet.py
93 -[ -f kyotocabinet-mod.so ] && mv -f kyotocabinet-mod.so kyotocabinet.so || true
94 rm -f kyotocabinet.py
95
96
97 docclean :
98 rm -rf doc
99
100
101 .PHONY: all clean install check doc
102
103
104
105 # END OF FILE