summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-03-03 11:57:21 +0000
committerng0 <ng0@n0.is>2019-03-03 11:57:21 +0000
commit02c846bd7ff7e91a43be6f6f9dea757a3669d7a0 (patch)
tree7a387fc74b85cc08e85f7b575e27d8e856abe4ce /Makefile
parent4b89f63bd47dfb0c77dfdc6aacb89e08ec59f9d2 (diff)
downloadwww-02c846bd7ff7e91a43be6f6f9dea757a3669d7a0.tar.gz
www-02c846bd7ff7e91a43be6f6f9dea757a3669d7a0.tar.bz2
www-02c846bd7ff7e91a43be6f6f9dea757a3669d7a0.zip
Makefile: Make tsc configurable, add clean and run rules
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 0e7d450..025e1cc 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/