diff options
author | ng0 <ng0@n0.is> | 2019-03-03 11:57:21 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-03-03 11:57:21 +0000 |
commit | 02c846bd7ff7e91a43be6f6f9dea757a3669d7a0 (patch) | |
tree | 7a387fc74b85cc08e85f7b575e27d8e856abe4ce | |
parent | 4b89f63bd47dfb0c77dfdc6aacb89e08ec59f9d2 (diff) | |
download | www-02c846bd7ff7e91a43be6f6f9dea757a3669d7a0.tar.gz www-02c846bd7ff7e91a43be6f6f9dea757a3669d7a0.tar.bz2 www-02c846bd7ff7e91a43be6f6f9dea757a3669d7a0.zip |
Makefile: Make tsc configurable, add clean and run rules
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | config.mk | 1 |
2 files changed, 13 insertions, 1 deletions
@@ -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/ @@ -1,5 +1,6 @@ # config.mk Makefile fragment to set custom variables. +TSC=tsc PYTHON=python3 BABEL=pybabel |