summaryrefslogtreecommitdiff
path: root/Makefile
blob: f73428bd3ed2591abbd3c6140827529524fda321 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This file is in the public domain.

include build-system/config.mk

# All: build HTML pages in all languages.
.PHONY: all
all: translate site

.PHONY: site
site:
	env "BASEURL=$(opt_baseurl)" ./inc/build-site
	@echo "Build site       [DONE]"

.PHONY: translate
translate:
	./inc/update-messages
	@echo "Translate site  [DONE]"

.PHONY: run
run: all
	$(browser) http://0.0.0.0:8000/en &
	$(python) -m http.server --directory rendered/

variant = $(opt_variant)

ifndef variant
$(error variant is not set)
endif

.PHONY: install
install: all
	$(mkdir) -p $(prefix)/$(variant)
	$(cp) -r rendered/* $(prefix)/$(variant)/
	$(cp) -r rendered/.well-known/ $(prefix)/$(variant)/

.PHONY: clean
clean:
	$(find) . -iname '*~' -exec $(rm) {} -rf \;
	$(rm) -rf __pycache__ *.pyc  *~ \.*~ \#*\#
	$(rm) -rf rendered/

.PHONY: submodules/update
submodules/update:
	$(git) submodule update --recursive --remote