Add makefile rules to produce releases
[erdslangetjie.git] / Makefile
1 #fake Makefile for erdslangetjie, to support the common
2 # ./configure;make;make install
3
4 PYTHON = python
5
6 #build: Setup setup.py
7 build: setup.py
8         $(PYTHON) setup.py build
9
10 #install: Setup setup.py
11 install: setup.py
12         $(PYTHON) setup.py install
13
14 #Setup:
15 #       $(PYTHON) configure.py
16
17 test check tests:
18         $(PYTHON) run_tests.py
19
20 testall:
21         #python2.5 setup.py test
22         python2.7 setup.py test
23         #python3.1 setup.py test
24         make checkdocs
25
26 #docs:  install
27 #       cd docs/utils
28 #       $(PYTHON) makedocs.py
29
30 clean:
31         rm -rf build dist MANIFEST .coverage
32         rm -f erdslangetjie/*~
33         rm -rf bin develop-eggs eggs parts .installed.cfg erdslangetjie.egg-info
34         find . -name *.pyc -exec rm {} \;
35         find . -name *.swp -exec rm {} \;
36         $(PYTHON) setup.py clean
37
38
39 android_zip:
40         rm -f bane_pyweek_16.zip
41         zip -r bane_pyweek_16.zip android.txt run_game.py main.py data/level* data/sounds/ data/screens data/sprites/ data/tiles/ erdslangetjie/*py
42
43
44 tarball:
45         mkdir -p bane_pyweek_16
46         tar -cf - data misc_stuff *.txt Makefile configure *pyw *py erdslangetjie/*py erdslangetjie/editor/*py | (cd bane_pyweek_16 && tar -xvpf -)
47         tar -caf bane_pyweek_16.tar.bz2 bane_pyweek_16
48         rm -rf bane_pyweek_16
49
50 # push changes
51 push:
52         #bzr push lp:erdslangetjie
53         #svn commit
54         git commit
55
56 # commit changes
57 commit:
58         #bzr commit
59         git commit
60
61 #upload to pypi
62 upload:
63         make clean
64         #if you have your gpg key set up... sign your release.
65         #$(PYTHON) setup.py sdist upload --sign --identity="Your Name <youremail@example.com>" 
66         $(PYTHON) setup.py sdist upload
67
68 sdist:
69         make clean
70         make testall
71         $(PYTHON) setup.py sdist
72
73 checkdocs:
74         $(PYTHON) setup.py checkdocs -setuptools
75
76 showdocs:
77         $(PYTHON) setup.py showdocs -setuptools
78
79 coverage:
80         coverage run run_tests.py
81         coverage report -m
82
83