summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..fd33bfc
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,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/