summaryrefslogtreecommitdiff
path: root/Makefile
blob: fd33bfc27d1b961e916362c60f172afb5c82ec4b (plain)
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
install_global=false
-include config.mk

SUBDIRS = talerbackoffice/backoffice/templates
ava = js/node_modules/.bin/ava

.PHONY: all
all:
	@echo "This is a python project, no compilation required"

.PHONY: check-js
check-js:
	@cd js; yarn install
	@$(ava) js/node_modules/.bin/ava js/test/main.js

.PHONY: install

ifeq ($(install_global), true)
install: install-deps install-global
else
install: install-local
endif

.PHONY: install-global
install-global:
	pip3 install .

.PHONY: install-local
install-local:
	pip3 install . --user

.PHONY: copy-js
copy-js:
	@cp js/*.js talerbackoffice/backoffice/static

install-deps: compile-i18n copy-js

compile-i18n:
	$(MAKE) -C talerbackoffice/backoffice/templates compile

# run testcases
.PHONY: check
check:
	@export TALER_CONFIG_FILE=@abs_srcdir@/talerbackoffice/tests.conf; \
         export BACKOFFICE_BACKEND="http://backend.example.com/"; \
         export BACKOFFICE_INSTANCES="MusicShop"; python3 setup.py test

.PHONY: pylint
pylint:
	@pylint talerbackoffice/

.PHONY: dist
dist:
	git archive --format=tar.gz HEAD -o taler-backoffice.tar.gz

.PHONY: pretty
pretty:
	yapf -r -i talerbackoffice/