diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-12-22 16:29:27 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-12-22 16:29:27 +0100 |
commit | 7f3b8c2a30a473c5bac01fcbdf663957d71bf956 (patch) | |
tree | 420ebd477845c5e113ddd4dba40bcb7848d1fd29 /GNUmakefile | |
parent | 9524d6b3d495571907c93fae6f274b4a3e6e73c2 (diff) | |
download | www-7f3b8c2a30a473c5bac01fcbdf663957d71bf956.tar.gz www-7f3b8c2a30a473c5bac01fcbdf663957d71bf956.tar.bz2 www-7f3b8c2a30a473c5bac01fcbdf663957d71bf956.zip |
follow conventions
Diffstat (limited to 'GNUmakefile')
-rw-r--r-- | GNUmakefile | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/GNUmakefile b/GNUmakefile deleted file mode 100644 index 3469dd04..00000000 --- a/GNUmakefile +++ /dev/null @@ -1,91 +0,0 @@ -# This file is in the public domain. - -include config.mk - -# All: build HTML pages in all languages and compile the -# TypeScript logic in web-common. -.PHONY: all -all: locale template - (cd web-common && $(tsc)) - ($(cp) rendered/static/robots.txt rendered/robots.txt) - ($(cp) rendered/static/robots.txt rendered/dist/robots.txt) - (for lang in en de fr it es ru pt ; do \ - $(cp) rendered/static/robots.txt rendered/$$lang/robots.txt; \ - done) - ($(python) inc/make_sitemap.py -i rendered) - ($(cp) sitemap.xml rendered/sitemap.xml) - ($(cp) sitemap.xml rendered/en/sitemap.xml) - (for lang in en de fr it es ru pt ; do \ - $(cp) rendered/sitemap.xml rendered/$$lang ; \ - done) - ($(cp) -R images rendered/static/) - (for lang in en de fr it es ru pt ; \ - do $(cp) -R images rendered/$$lang ; \ - done) - (for lang in en de fr it es ru pt ; do \ - $(cp) -R web-common rendered/$$lang ; \ - done) - (cd rendered; \ - for lang in en de fr it es ru pt; do \ - $(cp) $$lang/rss.xml $$lang/news/rss.xml; \ - done) - (for d in dist icons papers presentations ; do \ - $(cp) -R $$d rendered/ ; \ - done) - ($(cp) -R pdf rendered/static/) - -# Extract translateable strings from jinja2 templates. -locale/messages.pot: template/*.j2 common/*.j2 common/*.j2.inc - PYTHONPATH=".:./inc" $(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 de fr es it ru pt; 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 de fr it es ru pt; 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 - -.PHONY: run -run: all - $(browser) http://0.0.0.0:8000/rendered/en & - $(python) -m http.server - -ifndef variant -$(error variant is not set) -endif - -.PHONY: install -install: all - $(mkdir) -p $(prefix)/$(variant) - $(cp) -r rendered/* $(prefix)/$(variant)/ - -.PHONY: uninstall -uninstall: - $(rm) -rf $(prefix)/$(variant) - -.PHONY: clean -clean: - $(rm) -rf __pycache__ *.pyc *~ \.*~ \#*\# - $(rm) -rf en/ de/ fr/ it/ es/ ru/ - $(rm) -rf rendered/ - -submodules/update: - $(git) submodule update --recursive --remote |