install_global=false -include config.mk .PHONY: all all: @echo "This is a python project, no compilation required" @echo "SCSS/SASS Initial Setup: make sass-setup" @echo "SCSS/SASS Build (for static files): make sass-build" @echo "Installation: make install" .PHONY: install ifeq ($(install_global), true) install: install-global else install: install-local endif .PHONY: install-global install-global: compile sass-build pip3 install . .PHONY: install-local install-local: compile sass-build pip3 install . --user # run testcases .PHONY: check check: @export TALER_CONFIG_FILE=talerblog/tests.conf; \ python3 setup.py test .PHONY: clean clean: @echo nothing to do .PHONY: dist dist: git archive --format=tar.gz HEAD -o taler-merchant-blog.tar.gz .PHONY: pretty pretty: yapf -r -i talerblog/ # i18n extract: # Note: Flask-BabelEx expects 'translations/' for the dirname, # even though GNU gettext typically uses 'locale/' mkdir -p translations/ pybabel extract -F babel.cfg -o translations/messages.pot . # Add new language as follows: # pybabel init -i locale/messages.pot -d locale/ -l de .PHONY: compile compile: update pybabel compile -d translations/ .PHONY: update update: extract pybabel update -i translations/messages.pot -d translations/ # SASS/SCSS .PHONY: sass-setup sass-setup: @echo "This is the initial sass-installation/setup script." @echo "This setup must run as root, on a machine that has NPM installed!" @echo "If your password is requested (for escalation), please enter it." sudo npm install -g sass .PHONY: scss-setup scss-setup: sass-setup .PHONY: sass-build sass-build: @echo "Warning: If Sass/Scss is not installed, please run \`make sass-setup\` first!" @echo "This script will only convert files inside /static" sass talermerchantdemos/static:talermerchantdemos/static .PHONY: scss-build scss-build: sass-build .PHONY: sass-autobuild sass-autobuild: @echo "Warning: If Sass/Scss is not installed, please run \`make sass-setup\` first!" @echo "This script will automatically build sass/scss files in the static directory!" sass --watch talermerchantdemos/static:talermerchantdemos/static .PHONY: scss-autobuild scss-autobuild: sass-autobuild