-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
82 lines (65 loc) · 1.98 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
## Makefile usage:
## `make install`
#
# Debugging Stuff
#
# This target is handy for figuring out the value of a macro and how it got that way.
# For example, `make print-TGT`
print-%: ; @$(error $* is $($*) ($(value $*)) (from $(origin $*)))
##
##To add Make debugging info to the log, use "make DUMP=1 <other args>"
##
ifdef DUMP
OLD_SHELL := $(SHELL)
SHELL = $(warning [$@])$(OLD_SHELL) -x
endif
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
# You're on Linux!
endif
ifeq ($(UNAME_S),Darwin)
# You're on Darwin
endif
help: ## Show this help.
@fgrep -h "##" Makefile | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//'
.PHONY: prereq-packages
prereq-packages:
python3 -m pip install -r requirements.txt
.PHONY: install
install: ## Install to your system or virtualenv.
install: prereq-packages
python3 -m pip install .
.PHONY: develop
develop: ## Install to your system or virtualenv, using a symlink so edits take immediate effect.
develop: prereq-packages
python3 -m pip install -e .
.PHONY: uninstall
uninstall: ## Remove 'merge' from your system or virtualenv
python3 -m pip uninstall -y mergeinator
.PHONY: clean
clean: ## Removes ErrorLog, wheels, TAGS, and emacs auto-save files (*~) everywhere.
rm -f ErrorLog *.whl TAGS
rm -rf __pycache__ mergeinator.egg-info
find . -name \*~ | xargs rm -f
.PHONY: cleaner
cleaner: ## Clean, plus removes .pyc's everywhere (even those
cleaner: ## lurking in any virtual environment you might have).
cleaner: clean
rm -rf .pytest_cache
find . -name \*.pyc | xargs rm -f
.PHONY: distclean
distclean: ## Cleaner, plus removes virtualenvs, .orig files, and autosave files
distclean: cleaner
find . -name \#\*\# -o -name \*.orig | xargs rm -f
rm -rf venv
.PHONY: tags
tags: ## Refresh tags file for whole project.
ctags -e -R --exclude=venv .
.PHONY: profile
profile: ## Runs the app and produces profiling data
.PHONY: test
test: ## Invoke pytest to run tests
py.test
.PHONY: viewprofile
viewprofile:
pyprof2calltree -k -i main.profile