forked from bluekelp/pytimecop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
68 lines (48 loc) · 1.3 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
##########
# defaults
SRC=timecop
BIN=bin
# custom pip script ignores/filters "already installed, use --upgrade" and "cleaning up" msgs
PIP=$(BIN)/pip_
PROJECT_NAME=pytimecop
# project abbreviated name
PROJECT_ABBREV="ptc"
NOSE_FLAGS="--nocapture"
##########
# - initial "default" rule
# will be used it you just type "make" on the cmdline
.PHONY: all
all: install clean
# I like to cleanup Python projects after every run
# Includes need to be below the default "all" command or rules defined
# in them will be interpreted as the default/first rule
##########
# keep VAR assignments above so can be overridden by users
-include inc/*.mk
# I like to cleanup Python projects after every run
.PHONY: install
install: deploy clean
.PHONY: depends
depends:
@$(PIP) install nose
.PHONY: compile
compile: depends
# automatically run tests every time a file changes
.PHONY: autotest
autotest:
@$(BIN)/autotest
.PHONY: test
test: compile
@nosetests $(SRC)/tests $(NOSE_FLAGS)
.PHONY: deploy
# TBD put code up somewhere, etc
deploy: test
.PHONY: clean
clean:
@find $(SRC) -type f -name \*.pyc -print0 | xargs -0 rm -rf
# purposely don't "rm -rf" the $(PYENV) b/c of risk of bad values wiping a homedir, etc
.PHONY: realclean distclean
realclean: distclean
distclean: clean
@-rm -f $(BIN)/virtualenv.py
@-rm -f .ci_*