summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-05-27 14:12:35 +0200
committerChristian Grothoff <christian@grothoff.org>2021-05-27 14:12:35 +0200
commitcc37eb61c15f0d31775b3d3d88ae02777b35bd7a (patch)
tree0d58e37f62333435ca2a4e402f30a4b2d57b6ee5 /Makefile
parent851416c94731e4ff77c0f5e214a5a2b71e7071fe (diff)
downloadauditor-cc37eb61c15f0d31775b3d3d88ae02777b35bd7a.tar.gz
auditor-cc37eb61c15f0d31775b3d3d88ae02777b35bd7a.tar.bz2
auditor-cc37eb61c15f0d31775b3d3d88ae02777b35bd7a.zip
update build scripts
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile49
1 files changed, 7 insertions, 42 deletions
diff --git a/Makefile b/Makefile
index 7b94180..3b89192 100644
--- a/Makefile
+++ b/Makefile
@@ -2,52 +2,19 @@
include build-system/config.mk
-# List of all supported languages, add new languages here!
-LANGUAGES="en"
-
# All: build HTML pages in all languages and compile the
-# TypeScript logic in web-common.
.PHONY: all
-all: locale template
- (cd web-common && $(tsc))
- (for lang in `echo $(LANGUAGES)` ; do \
- $(cp) -R web-common/*.css web-common/*.ico rendered/static/ ; \
- done)
-
-# Extract translateable strings from jinja2 templates.
-locale/messages.pot: template/*.j2
- $(python) inc/mybabel.py $(pybabel) extract -F locale/babel.map -o locale/messages.pot .
-
-# Update translation (.po) files with new strings.
-.PHONY: locale-update
-locale-update: locale/messages.pot
- (for lang in `echo $(LANGUAGES)`; do \
- $(msgmerge) -q -U -m --previous locale/$$lang/LC_MESSAGES/messages.po locale/messages.pot ; \
- done)
-
- if $(grep) -nA1 '#-#-#-#-#' locale/*/LC_MESSAGES/messages.po; then $(echo) -e "\nERROR: Conflicts encountered in PO files.\n"; exit 1; fi
-
-# Compile translation files for use.
-.PHONY: locale-compile
-locale-compile:
- (for lang in `echo $(LANGUAGES)`; do \
- $(pybabel) -q compile -d locale -l $$lang --use-fuzzy ; \
- done)
-
-# Process everything related to gettext translations.
-.PHONY: locale
-locale: locale-update locale-compile
-
-# Run the jinja2 templating engine to expand templates to HTML
-# incorporating translations.
-template: locale-compile
- $(python) ./make_site.py
+all:
+ ./inc/update-messages
+ env "BASEURL=$(opt_baseurl)" ./inc/build-site
.PHONY: run
run: all
$(browser) http://0.0.0.0:8000/rendered/en &
$(python) -m http.server
+variant = $(opt_variant)
+
ifndef variant
$(error variant is not set)
endif
@@ -56,15 +23,13 @@ endif
install: all
$(mkdir) -p $(prefix)/$(variant)
$(cp) -r rendered/* $(prefix)/$(variant)/
-
-.PHONY: uninstall
-uninstall:
- $(rm) -rf $(prefix)/$(variant)
+ $(cp) -r rendered/.well-known/ $(prefix)/$(variant)/
.PHONY: clean
clean:
$(rm) -rf __pycache__ *.pyc *~ \.*~ \#*\#
$(rm) -rf rendered/
+.PHONY: submodules/update
submodules/update:
$(git) submodule update --recursive --remote