-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (32 loc) · 889 Bytes
/
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
# https://stackoverflow.com/questions/2214575/passing-arguments-to-make-run
# If the first argument is "add_pattern"...
ifeq (add_pattern,$(firstword $(MAKECMDGOALS)))
# use the rest as arguments for "run"
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
# ...and turn them into do-nothing targets
$(eval $(RUN_ARGS):;@:)
endif
TEST=pipenv run pytest --cov . -vv
DEV=pipenv run python3 pill_calendar.py dev
CLEAN=rm Calendar.csv.2*
ADD_PATTERN=pipenv run python3 pill_calendar.py add_pattern
ADD_TEST=pipenv run python3 pill_calendar.py add_test
PLAN=pipenv run python3 pill_calendar.py plan
APPLY=pipenv run python3 pill_calendar.py apply
HELP=pipenv run python3 pill_calendar.py help
test:
$(TEST)
dev:
$(DEV)
clean:
$(CLEAN)
add_pattern:
@$(ADD_PATTERN) $(RUN_ARGS)
add_test:
@$(ADD_TEST)
plan:
@$(PLAN)
apply:
@$(APPLY)
help:
@$(HELP)