-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
57 lines (43 loc) · 1.61 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
###########
# Variables
###########
# global variables
BASE = $(shell pwd)
# the python makefile
PYTHON_MAKE = $(BASE)/src/make.py
# look for the python3 executable
PYTHON3 = $(shell command -v python3 2> /dev/null)
ifeq ($(strip $(PYTHON3)),)
$(error "Error: python3 is not installed!")
else
# do not show bytes warnings on Travis, because then the build/test will fail
ifndef TRAVIS
# the -bb "-b Issue warnings about str(bytes_instance), str(bytearray_instance) and comparing bytes/bytearray with str. (-bb: issue errors)"
# s.a. https://docs.djangoproject.com/en/2.0/releases/2.0/#removed-support-for-bytestrings-in-some-places
PYTHON3 += -bb
endif
endif
#######################
# No changes from here!
#######################
# hack for making make silent (gives better output when specifying a django app as target)
MAKEFLAGS += -s
#########
# Targets
#########
# XXX Don't forget to update the targets as soon as the makefile or make.py is extended
# because then bash completion is supported
TARGETS = help production staging development run django test collectstatic requirements setup-virtualenv set-webdriver coverage css list add-license new-release
# phony targets
.PHONY: $(TARGETS)
# pass all arguments to the target
.DEFAULT_GOAL := help
$(TARGETS):
# fix for using '-' and '--' arguments
# you can set optional parameters with '+' or '++', so these parameters get passed to the python makefile
$(eval ARGS := $(patsubst ++%,--%,$(MAKECMDGOALS)))
$(eval ARGS := $(patsubst +%,-%,$(ARGS)))
$(PYTHON3) $(PYTHON_MAKE) $(ARGS)
# default target for targets that are meant as parameters
.DEFAULT:
@# do nothing here