3 SOURCE=$(shell find $(SOURCE_PATH) -iname "*.py")
4 PROGRAM=$(SOURCE_PATH)/$(PROJECT_NAME)_gtk.py
7 TAG_FILE=~/.ctags/$(PROJECT_NAME).tags
11 UNIT_TEST=nosetests --with-doctest -w .
12 SYNTAX_TEST=support/test_syntax.py
13 LINT_RC=./support/pylint.rc
14 LINT=pylint --rcfile=$(LINT_RC)
15 PROFILE_GEN=python -m cProfile -o .profile
16 PROFILE_VIEW=python -m pstats .profile
17 TODO_FINDER=support/todo.py
20 .PHONY: all run profile debug test build lint tags todo clean distclean
28 $(PROFILE_GEN) $(PROGRAM)
32 $(DEBUGGER) $(PROGRAM)
40 mkdir -p $(BUILD_PATH)/generic
41 cp $(SOURCE_PATH)/constants.py $(BUILD_PATH)/generic
42 cp $(SOURCE_PATH)/$(PROJECT_NAME).py $(BUILD_PATH)/generic
43 $(foreach file, $(SOURCE), cp $(file) $(BUILD_PATH)/generic/$(subst /,-,$(file)) ; )
44 cp support/$(PROJECT_NAME).desktop $(BUILD_PATH)/generic
45 cp support/icons/hicolor/26x26/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/generic/26x26-$(PROJECT_NAME).png
46 cp support/icons/hicolor/64x64/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/generic/64x64-$(PROJECT_NAME).png
47 cp support/icons/hicolor/scalable/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/generic/scale-$(PROJECT_NAME).png
48 cp support/builddeb.py $(BUILD_PATH)/generic
49 cp support/py2deb.py $(BUILD_PATH)/generic
51 mkdir -p $(BUILD_PATH)/diablo
52 cp -R $(BUILD_PATH)/generic/* $(BUILD_PATH)/diablo
53 cd $(BUILD_PATH)/diablo ; python builddeb.py diablo
54 mkdir -p $(BUILD_PATH)/fremantle
55 cp -R $(BUILD_PATH)/generic/* $(BUILD_PATH)/fremantle
56 cd $(BUILD_PATH)/fremantle ; python builddeb.py fremantle
57 mkdir -p $(BUILD_PATH)/debian
58 cp -R $(BUILD_PATH)/generic/* $(BUILD_PATH)/debian
59 cd $(BUILD_PATH)/debian ; python builddeb.py debian
62 dput fremantle-extras-builder $(BUILD_PATH)/fremantle/$(PROJECT_NAME)*.changes
63 dput diablo-extras-builder $(BUILD_PATH)/diablo/$(PROJECT_NAME)*.changes
64 cp $(BUILD_PATH)/debian/*.deb ./www/$(PROJECT_NAME).deb
67 $(foreach file, $(SOURCE), $(LINT) $(file) ; )
82 find $(SOURCE_PATH) -name "*.*~" | xargs rm -f
83 find $(SOURCE_PATH) -name "*.swp" | xargs rm -f
84 find $(SOURCE_PATH) -name "*.bak" | xargs rm -f
85 find $(SOURCE_PATH) -name ".*.swp" | xargs rm -f
88 mkdir -p $(dir $(TAG_FILE))
89 $(CTAGS) -o $(TAG_FILE) $(SOURCE)
91 $(TODO_FILE): $(SOURCE)
92 @- $(TODO_FINDER) $(SOURCE) > $(TODO_FILE)
98 #Target to print any variable, can be added to the dependencies of any other target
99 #Userfule flags for make, -d, -p, -n
100 print-%: ; @$(error $* is $($*) ($(value $*)) (from $(origin $*)))