Bringing in some tweaks from quicknote
[gc-dialer] / Makefile
index a79ef30..58d7ee8 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,18 +7,20 @@ DATA=$(foreach type, $(DATA_TYPES), $(shell find $(SOURCE_PATH) -iname "$(type)"
 OBJ=$(SOURCE:.py=.pyc)
 BUILD_PATH=./build/
 TAG_FILE=~/.ctags/$(PROJECT_NAME).tags
+TODO_FILE=./TODO
 
 DEBUGGER=winpdb
 UNIT_TEST=nosetests --with-doctest -w .
 SYNTAX_TEST=support/test_syntax.py
-STYLE_TEST=../../Python/tools/pep8.py --ignore=W191
+STYLE_TEST=../../Python/tools/pep8.py --ignore=W191,E501
 LINT_RC=./support/pylint.rc
 LINT=pylint --rcfile=$(LINT_RC)
 PROFILE_GEN=python -m cProfile -o .profile
 PROFILE_VIEW=python -m pstats .profile
+TODO_FINDER=support/todo.py
 CTAGS=ctags-exuberant
 
-.PHONY: all run profile debug test lint tags build clean distclean
+.PHONY: all run profile debug test build lint tags todo clean distclean
 
 all: test
 
@@ -36,9 +38,9 @@ test: $(OBJ)
        $(UNIT_TEST)
 
 build: $(OBJ)
-       @# @todo Add a PYC generation step
        rm -Rf $(BUILD_PATH)
        mkdir $(BUILD_PATH)
+       cp $(SOURCE_PATH)/constants.py  $(BUILD_PATH)
        cp $(SOURCE_PATH)/$(PROJECT_NAME).py  $(BUILD_PATH)
        $(foreach file, $(DATA), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; )
        $(foreach file, $(SOURCE), cp $(file) $(BUILD_PATH)/$(subst /,-,$(file)) ; )
@@ -48,15 +50,19 @@ build: $(OBJ)
        cp support/icons/hicolor/64x64/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/64x64-$(PROJECT_NAME).png
        cp support/icons/hicolor/scalable/hildon/$(PROJECT_NAME).png $(BUILD_PATH)/scale-$(PROJECT_NAME).png
        cp support/builddeb.py $(BUILD_PATH)
+       cp support/fake_py2deb.py $(BUILD_PATH)
 
 lint: $(OBJ)
        $(foreach file, $(SOURCE), $(LINT) $(file) ; )
 
 tags: $(TAG_FILE) 
 
+todo: $(TODO_FILE)
+
 clean:
        rm -Rf $(OBJ)
        rm -Rf $(BUILD_PATH)
+       rm -Rf $(TODO_FILE)
 
 distclean:
        rm -Rf $(OBJ)
@@ -71,6 +77,9 @@ $(TAG_FILE): $(OBJ)
        mkdir -p $(dir $(TAG_FILE))
        $(CTAGS) -o $(TAG_FILE) $(SOURCE)
 
+$(TODO_FILE): $(SOURCE)
+       @- $(TODO_FINDER) $(SOURCE) > $(TODO_FILE)
+
 %.pyc: %.py
        $(SYNTAX_TEST) $<