.PHONY: all .SUFFIXES: .jspp .js PROJNAME=solardash VIRTUALENV ?= virtualenv-3.7 VRITUALENVARGS = FILES=$(PROJNAME)/__init__.py JSFILES = root/js/solardash.file.js root/js/solardash.https.js THIRDPARTYJS = root/js/jquery.js root/js/highstock.js root/js/jquery.js: wget -O $@ "https://code.jquery.com/jquery-3.4.1.min.js" root/js/highstock.js: Makefile wget -O - "https://code.highcharts.com/stock/8.0.0/highstock.js" | grep -v '^//# sourceMappingURL=' > $@ || (rm "$@"; false) root/js/highcharts.js: Makefile wget -O - "https://code.highcharts.com/stock/8.0.0/highcharts.js" | grep -v '^//# sourceMappingURL=' > $@ || (rm "$@"; false) # manual deps root/js/solardash.base.js: $(THIRDPARTYJS) root/js/solardash.file.js: root/js/solardash.base.js root/js/solardash.https.js: root/js/solardash.base.js all: $(JSFILES) .jspp.js: cpp -Wno-invalid-pp-token -E $< | sed -e '/^#/d' > $@ || (rm "$@"; false) keepupdate: find . -name '*.js' -o -name '*.jspp' | entr make all test: (ls $(FILES) $(JSFILES) | entr sh -c 'make all && python -m coverage run -m unittest $(PROJNAME) && coverage report --omit=p/\* -m -i') test-noentr: python -m coverage run -m unittest $(PROJNAME) && coverage report --omit=p/\* -m -i env: ($(VIRTUALENV) $(VIRTUALENVARGS) p && . ./p/bin/activate && pip install -r requirements.txt)