summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile13
-rw-r--r--config.mk1
2 files changed, 13 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0e7d450a..025e1cc3 100644
--- 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
index 032e41d9..6d0dae0d 100644
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,6 @@
# config.mk Makefile fragment to set custom variables.
+TSC=tsc
PYTHON=python3
BABEL=pybabel