taler-www

Main taler.net website
Log | Files | Refs | Submodules | README | LICENSE

commit 02c846bd7ff7e91a43be6f6f9dea757a3669d7a0
parent 4b89f63bd47dfb0c77dfdc6aacb89e08ec59f9d2
Author: ng0 <ng0@n0.is>
Date:   Sun,  3 Mar 2019 11:57:21 +0000

Makefile: Make tsc configurable, add clean and run rules

Diffstat:
MMakefile | 13++++++++++++-
Mconfig.mk | 1+
2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile @@ -12,7 +12,7 @@ include config.mk # All: build HTML pages in all languages and compile the # TypeScript logic in web-common. all: locale template - cd web-common && tsc + cd web-common && $(TSC) # Extract translateable strings from jinja2 templates. locale/messages.pot: *.j2 common/*.j2 common/*.j2.inc @@ -47,3 +47,14 @@ locale: locale-update locale-compile # incorporating translations. template: locale-compile $(PYTHON) ./template.py + +run: all + @[ "$(BROWSER)" ] || ( echo "You need to export the environment variable 'BROWSER' to run this."; exit 1 ) + $(RUN_BROWSER) http://0.0.0.0:8000 & + # cd rendered && $(PYTHON) -m http.server + $(PYTHON) -m http.server + +clean: + rm -rf __pycache__ + rm -rf en/ de/ fr/ it/ es/ ru/ + rm -rf rendered/ diff --git a/config.mk b/config.mk @@ -1,5 +1,6 @@ # config.mk Makefile fragment to set custom variables. +TSC=tsc PYTHON=python3 BABEL=pybabel