Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 139 lines (111 sloc) 4.181 kb
44b258f @dennda Add PEP8 styleguide checker.
dennda authored
1 PYTHON = python
2 CHECKSCRIPT = kivy/tools/pep8checker/pep8kivy.py
3 KIVY_DIR = kivy/
4af4298 @kived respect PYTHON var when running make test
kived authored
4 NOSETESTS = $(PYTHON) -m nose.core
4476b33 @geojeff Added KIVY_USE_DEFAULTCONFIG = 1 so that Kivy tests are not affected …
geojeff authored
5 KIVY_USE_DEFAULTCONFIG = 1
7ce8863 @tito fix hostpython path from kivy-ios project
tito authored
6 HOSTPYTHON = $(KIVYIOSROOT)/tmp/Python-$(PYTHON_VERSION)/hostpython
8e6f622 @thopiekar Adding lookup for GIT executable
thopiekar authored
7
8 GIT_COMMAND := $(shell which git)
9
0699b85 @dennda ios: wip
dennda authored
10 IOSPATH := $(PATH):/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin
44b258f @dennda Add PEP8 styleguide checker.
dennda authored
11
4a056be @thopiekar Making install target flexible
thopiekar authored
12 BUILD_OPTS = build_ext --inplace
13 BUILD_OPTS_FORCE = $(BUILD_OPTS) -f
14 BUILD_OPTS_DEBUG = $(BUILD_OPTS_FORCE)-g
15
16 INSTALL_OPTIONS = install
17 INSTALL_ROOT =
18 INSTALL_PREFIX =
19 INSTALL_LAYOUT =
20
0ac77a8 @thopiekar Quick fix
thopiekar authored
21 ifneq ($(INSTALL_ROOT),)
4a056be @thopiekar Making install target flexible
thopiekar authored
22 INSTALL_OPTIONS += --root=$(INSTALL_ROOT)
23 endif
0ac77a8 @thopiekar Quick fix
thopiekar authored
24 ifneq ($(INSTALL_PREFIX),)
4a056be @thopiekar Making install target flexible
thopiekar authored
25 INSTALL_OPTIONS += --prefix=$(INSTALL_PREFIX)
26 endif
0ac77a8 @thopiekar Quick fix
thopiekar authored
27 ifneq ($(INSTALL_LAYOUT),)
4a056be @thopiekar Making install target flexible
thopiekar authored
28 INSTALL_OPTIONS += --install-layout=$(INSTALL_LAYOUT)
29 endif
30
31
2bb5a1d @tito add Makefile rule for theming
tito authored
32 .PHONY: build force mesabuild pdf style stylereport hook test batchtest cover clean distclean theming
d3fcbf7 @tito setup: add pxd in extensions to help a little about compilation when …
tito authored
33
23615af @dennda Initial support for OSX.
dennda authored
34 build:
4a056be @thopiekar Making install target flexible
thopiekar authored
35 $(PYTHON) setup.py $(BUILD_OPTS)
23615af @dennda Initial support for OSX.
dennda authored
36
778f685 @dennda Makefile: Add 'force' target that forces a rebuild
dennda authored
37 force:
4a056be @thopiekar Making install target flexible
thopiekar authored
38 $(PYTHON) setup.py $(BUILD_OPTS_FORCE)
778f685 @dennda Makefile: Add 'force' target that forces a rebuild
dennda authored
39
c84e051 @tito graphics: batch deletion of framebuffers/renderbuffers/buffers in one…
tito authored
40 debug:
4a056be @thopiekar Making install target flexible
thopiekar authored
41 $(PYTHON) setup.py $(BUILD_OPTS_DEBUG)
c84e051 @tito graphics: batch deletion of framebuffers/renderbuffers/buffers in one…
tito authored
42
6638f97 @dennda Makefile: move mesabuild after build. Otherwise a simple invocation o…
dennda authored
43 mesabuild:
4a056be @thopiekar Making install target flexible
thopiekar authored
44 env USE_MESAGL=1 $(PYTHON) setup.py $(BUILD_OPTS)
6638f97 @dennda Makefile: move mesabuild after build. Otherwise a simple invocation o…
dennda authored
45
5ef6fd0 @tito fix ios build + add KIVY_FAKE_BUILDEXT env to be able to generate onl…
tito authored
46 ios:
945932d @tito setup: deactivate ios/sdl by default, and trigger them if kivy-ios pr…
tito authored
47 -ln -s $(KIVYIOSROOT)/Python-2.7.1/python
48 -ln -s $(KIVYIOSROOT)/Python-2.7.1/python.exe
d10c74d @dennda ios: add makefile target for ios/arm compile
dennda authored
49
6d84192 @dennda ios: Strip iOS build, only use pyo
dennda authored
50 -rm -rdf iosbuild/
51 mkdir iosbuild
52
d10c74d @dennda ios: add makefile target for ios/arm compile
dennda authored
53 echo "First build ========================================"
e3f08bf @tito Makefile: remove fake build_ext, not working when no modules are gene…
tito authored
54 -PATH="$(IOSPATH)" $(HOSTPYTHON) setup.py build_ext -g
d10c74d @dennda ios: add makefile target for ios/arm compile
dennda authored
55 echo "cythoning =========================================="
7a8cd4e @tito remove the -t option in cython, look like people have an hard time to…
tito authored
56 find . -name *.pyx -exec cython {} \;
d10c74d @dennda ios: add makefile target for ios/arm compile
dennda authored
57 echo "Second build ======================================="
945932d @tito setup: deactivate ios/sdl by default, and trigger them if kivy-ios pr…
tito authored
58 PATH="$(IOSPATH)" $(HOSTPYTHON) setup.py build_ext -g
01553c4 @tito Makefile: reactivate -O2 for building kivy
tito authored
59 PATH="$(IOSPATH)" $(HOSTPYTHON) setup.py install -O2 --root iosbuild
6d84192 @dennda ios: Strip iOS build, only use pyo
dennda authored
60 # Strip away the large stuff
de4998b @tito ios: fix invalid grep -E
tito authored
61 find iosbuild/ | grep -E '.*\.(py|pyc|so\.o|so\.a|so\.libs)$$' | xargs rm
b987b15 @tito Makefile: kivy-ios move the build path for python, adapt.
tito authored
62 -rm -rdf "$(BUILDROOT)/python/lib/python2.7/site-packages/kivy"
6d84192 @dennda ios: Strip iOS build, only use pyo
dennda authored
63 # Copy to python for iOS installation
b987b15 @tito Makefile: kivy-ios move the build path for python, adapt.
tito authored
64 cp -R "iosbuild/usr/local/lib/python2.7/site-packages/kivy" "$(BUILDROOT)/python/lib/python2.7/site-packages"
d10c74d @dennda ios: add makefile target for ios/arm compile
dennda authored
65
9612a08 @thopiekar Will rebuild cython code to build the latest docs
thopiekar authored
66 pdf: build
70322ed @thopiekar Looks like there is a true difference between "make -c foo" and "cd f…
thopiekar authored
67 cd doc && $(MAKE) pdf
fe504d7 @dennda Docs: First take at nicer PDF generation. Basic fonts/layout adapted by
dennda authored
68
9612a08 @thopiekar Will rebuild cython code to build the latest docs
thopiekar authored
69 html: build
70322ed @thopiekar Looks like there is a true difference between "make -c foo" and "cd f…
thopiekar authored
70 cd doc && $(MAKE) html
2cb4d4d @thopiekar Building docs with kivy prebuilt
thopiekar authored
71
72 html-embedded:
e342fe6 @tito doc: fix signature generation for all methods/functions in a cythoniz…
tito authored
73 env USE_EMBEDSIGNATURE=1 $(MAKE) force
f32d539 @tito makefile: add shortcut for making html doc
tito authored
74 $(MAKE) -C doc html
75
44b258f @dennda Add PEP8 styleguide checker.
dennda authored
76 style:
a2fdd3f @merriam Modify Makefile's 'make style' to check entire tree
merriam authored
77 $(PYTHON) $(CHECKSCRIPT) .
44b258f @dennda Add PEP8 styleguide checker.
dennda authored
78
79 stylereport:
a2fdd3f @merriam Modify Makefile's 'make style' to check entire tree
merriam authored
80 $(PYTHON) $(CHECKSCRIPT) -html .
4289a1f @dennda add make hook target
dennda authored
81
82 hook:
fe504d7 @dennda Docs: First take at nicer PDF generation. Basic fonts/layout adapted by
dennda authored
83 # Install pre-commit git hook to check your changes for styleguide
84 # consistency.
4289a1f @dennda add make hook target
dennda authored
85 cp kivy/tools/pep8checker/pre-commit.githook .git/hooks/pre-commit
86 chmod +x .git/hooks/pre-commit
5af852f @tito activate nosetests + reactivate coverage (ready for buildbot !)
tito authored
87
88 test:
60f9935 @tito makefile: unfortunately, the kivy nosetest with uix are segfault with…
tito authored
89 -rm -rf kivy/tests/build
109e491 @aspidites - updated makefile to make nosestest path configurable
aspidites authored
90 $(NOSETESTS) kivy/tests
5af852f @tito activate nosetests + reactivate coverage (ready for buildbot !)
tito authored
91
92 cover:
5fd6413 @tito fix coverage (why it never been showed before O_o)
tito authored
93 coverage html --include='$(KIVY_DIR)*' --omit '$(KIVY_DIR)data/*,$(KIVY_DIR)lib/*,$(KIVY_DIR)tools/*,$(KIVY_DIR)tests/*'
8527df0 @tito Makefile: use KIVY_DIR
tito authored
94
8de04da @splanquart Add install command in Makefile
splanquart authored
95 install:
e12c522 @thopiekar missed one python -> $(PYTHON)
thopiekar authored
96 $(PYTHON) setup.py $(INSTALL_OPTIONS)
4a056be @thopiekar Making install target flexible
thopiekar authored
97
8527df0 @tito Makefile: use KIVY_DIR
tito authored
98 clean:
dd6f2ac @thopiekar Replacing command with target in doc/Makefile
thopiekar authored
99 $(MAKE) -C doc clean
8527df0 @tito Makefile: use KIVY_DIR
tito authored
100 -rm -rf build
101 -rm -rf htmlcov
fcb4999 @thopiekar Don't raise errors on non-created files / dirs which have to be removed
thopiekar authored
102 -rm -f .coverage
103 -rm -f .noseids
60f9935 @tito makefile: unfortunately, the kivy nosetest with uix are segfault with…
tito authored
104 -rm -rf kivy/tests/build
c7408e0 @aspidites - `make clean` removes *.so files
aspidites authored
105 -find kivy -iname '*.so' -exec rm {} \;
adc44cc @tito Makefile: remove build_factory for build/mesabuild
tito authored
106 -find kivy -iname '*.pyc' -exec rm {} \;
107 -find kivy -iname '*.pyo' -exec rm {} \;
95aa4a8 @kived * fix `make clean` to remove cythoned .c files
kived authored
108 -find . -iname '*.pyx' -exec sh -c 'echo `dirname {}`/`basename {} .pyx`.c' \; | xargs rm
8527df0 @tito Makefile: use KIVY_DIR
tito authored
109
110 distclean: clean
6bbe984 @thopiekar Quick fix: Run git if it is available of course!
thopiekar authored
111 ifneq ($(GIT_COMMAND),)
8e6f622 @thopiekar Adding lookup for GIT executable
thopiekar authored
112 @echo "Using GIT at $(GIT_COMMAND) to make a distclean..."
8b93f03 @venthur Don't remove debian subdirectory if it exists on git cleanup.
venthur authored
113 -git clean -dxf -e debian
8e6f622 @thopiekar Adding lookup for GIT executable
thopiekar authored
114 else
115 @echo "GIT not found to make a distclean..."
116 endif
2bb5a1d @tito add Makefile rule for theming
tito authored
117
118 theming:
95b626c @aspidites - reimplemented pause feature in video and videoplayer
aspidites authored
119 $(PYTHON) -m kivy.atlas kivy/data/images/defaulttheme 512 kivy/tools/theming/defaulttheme/*.png
5e19d3b @dessant keep make build the default proxy for make
dessant authored
120
121 help:
122 @echo "Please use \`make <target>' where <target> is one of"
123 @echo " build for a standard build"
124 @echo " clean remove generated and compiled files"
125 @echo " cover create an html coverage report of unittests"
126 @echo " debug for a debug build (with -g)"
127 @echo " dist-clean clean then use 'git clean'"
128 @echo " force for a forced build (with -f)"
129 @echo " hook add Pep-8 checking as a git precommit hook"
130 @echo " html to make standalone HTML files"
131 @echo " install run a setup.py install"
132 @echo " mesabuild for a build with MesaGL"
133 @echo " style to check Python code for style hints."
134 @echo " style-report make html version of style hints"
135 @echo " test run unittests (nosetests)"
136 @echo " theming create a default theme atlas"
137 @echo " "
138 @echo "You can also 'cd doc && make help' to build more documentation types"
Something went wrong with that request. Please try again.