331:200bc73690c7
Anton Shestakov <av6@dwimlabs.net>, Tue, 30 Jan 2018 12:20:07 +0800
docs: update copyright years

next change 332:915fc349816b
previous change 329:6e89b4cea984

Makefile

Permissions: -rw-r--r--

Other formats: Feeds:
MAKEFLAGS += --warn-undefined-variables
SHELL := bash
.SHELLFLAGS := -eu -o pipefail -c
.DEFAULT_GOAL := all
.DELETE_ON_ERROR:
.SUFFIXES:
pip := ./venv/bin/pip install -r requirements.txt -r dev-requirements.txt
libs := static/libs
jquery_version := 2.2.4
jquery_sha256 := 3117d8f389c62d6181d9ede83457e2d44b1033780bb190c8218845b0755be5f0
uikit_version := 2.27.4
uikit_sha256 := 59e02de775ddd7dd550bb1f14a7dadf44b9a2a389724ae4efd5b697f9910e2e6
moment_version := 2.18.1
moment_sha256 := 3a508cdab990d4ce7708d895b4b9ea33e89fbd5c4f5f7891db4afd0733be60d3
d3_version := 4.10.2
d3_sha256 := c0104ca276ea1ea13f2f35a988b9140e130bd4824e2c6f87a04ccbd1b86dd62b
.PHONY: all
all: venv/bin/python libs
.PHONY: devel
devel: venv
$(pip)
venv:
virtualenv venv
venv/bin/python: | venv
$(pip)
.PHONY: tests
tests: venv/bin/python
./venv/bin/python ./run-tests.py -v \
--cov-report=term \
--cov=candolint \
--cov=incoming \
--cov=viewer \
--cov=checker \
--cov=hooks-queue
.PHONY: check
check: tests
.PHONY: libs
libs: \
$(libs)/jquery/$(jquery_version)/ \
$(libs)/uikit/$(uikit_version)/ \
$(libs)/moment/$(moment_version)/ \
$(libs)/d3/$(d3_version)/
.INTERMEDIATE: jquery-$(jquery_version).tar.gz
jquery-$(jquery_version).tar.gz:
wget -q https://github.com/jquery/jquery/archive/$(jquery_version).tar.gz -O $@
echo '$(jquery_sha256) $@' | sha256sum -c -
$(libs)/jquery/$(jquery_version)/: jquery-$(jquery_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=2 -C $@ --wildcards 'jquery-$(jquery_version)/dist/jquery*'
.INTERMEDIATE: uikit-$(uikit_version).tar.gz
uikit-$(uikit_version).tar.gz:
wget -q https://github.com/uikit/uikit/archive/$(uikit_version).tar.gz -O $@
echo '$(uikit_sha256) $@' | sha256sum -c -
$(libs)/uikit/$(uikit_version)/: uikit-$(uikit_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=1 -C $@ --wildcards \
'uikit-$(uikit_version)/css/*.min.css' \
'uikit-$(uikit_version)/js/' \
'uikit-$(uikit_version)/fonts/'
.INTERMEDIATE: moment-$(moment_version).tar.gz
moment-$(moment_version).tar.gz:
wget -q https://github.com/moment/moment/archive/$(moment_version).tar.gz -O $@
echo '$(moment_sha256) $@' | sha256sum -c -
$(libs)/moment/$(moment_version)/: moment-$(moment_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=2 -C $@ --exclude='tests.js' 'moment-$(moment_version)/min/'
.INTERMEDIATE: d3-release-$(d3_version).zip
d3-release-$(d3_version).zip:
wget -q https://github.com/d3/d3/releases/download/v$(d3_version)/d3.zip -O $@
echo '$(d3_sha256) $@' | sha256sum -c -
$(libs)/d3/$(d3_version)/: d3-release-$(d3_version).zip
mkdir -p $@
unzip -j $< '*.js' -d $@
.PHONY: clean
clean:
if test -d $(libs); then rm -r $(libs); fi