162:ee031ea48eb0
Anton Shestakov <av6@dwimlabs.net>, Tue, 31 Oct 2017 13:23:11 +0800
pipelines: give it one minute

previous change 157:45e6e68a871b

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
libs := static/libs
jquery_version := 3.2.1
jquery_sha256 := 31d8c2e22dd48a7973fe3617cc656fe6b64d2250d07a258cd8ab30ead031c24a
underscore_version := 1.8.3
underscore_sha256 := bb00bd290142f1a5ae09ff426e9684f4a3c02f20df34bef0e1c6039a6ebac740
backbone_version := 1.3.3
backbone_sha256 := 7a20331721385d9fedfe492dec2110b6695b0d2150c8effdc3804eaaa948dc74
backbone_localstorage_version := 1.1.16
backbone_localstorage_sha256 := 12770d09e668968ac23798c50079f2390e4e51be6f8c8c154b78924a60eb9e7c
bootstrap_version := 3.3.7
bootstrap_sha256 := f498a8ff2dd007e29c2074f5e4b01a9a01775c3ff3aeaf6906ea503bc5791b7b
.PHONY: all
all: libs tests
.PHONY: devel
devel: venv
$(pip)
venv:
virtualenv venv
venv/bin/python: | venv
$(pip)
.PHONY: tests
tests: venv/bin/python
./venv/bin/python ./test.py
.PHONY: check
check: tests
.PHONY: libs
libs: \
$(libs)/jquery/$(jquery_version)/ \
$(libs)/underscore/$(underscore_version)/ \
$(libs)/backbone/$(backbone_version)/ \
$(libs)/backbone-localstorage/$(backbone_localstorage_version)/ \
$(libs)/bootstrap/$(bootstrap_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: underscore-$(underscore_version).tar.gz
underscore-$(underscore_version).tar.gz:
wget -q https://github.com/jashkenas/underscore/archive/$(underscore_version).tar.gz -O $@
echo '$(underscore_sha256) $@' | sha256sum -c -
$(libs)/underscore/$(underscore_version)/: underscore-$(underscore_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=1 -C $@ --wildcards 'underscore-$(underscore_version)/underscore*'
.INTERMEDIATE: backbone-$(backbone_version).tar.gz
backbone-$(backbone_version).tar.gz:
wget -q https://github.com/jashkenas/backbone/archive/$(backbone_version).tar.gz -O $@
echo '$(backbone_sha256) $@' | sha256sum -c -
$(libs)/backbone/$(backbone_version)/: backbone-$(backbone_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=1 -C $@ --wildcards 'backbone-$(backbone_version)/backbone*'
.INTERMEDIATE: backbone-localstorage-$(backbone_localstorage_version).tar.gz
backbone-localstorage-$(backbone_localstorage_version).tar.gz:
wget -q https://github.com/jeromegn/Backbone.localStorage/archive/v$(backbone_localstorage_version).tar.gz -O $@
echo '$(backbone_localstorage_sha256) $@' | sha256sum -c -
$(libs)/backbone-localstorage/$(backbone_localstorage_version)/: backbone-localstorage-$(backbone_localstorage_version).tar.gz
mkdir -p $@
tar xf $< --strip-components=1 -C $@ --wildcards 'Backbone.localStorage-$(backbone_localstorage_version)/backbone.localStorage*'
.INTERMEDIATE: bootstrap-$(bootstrap_version)-dist.zip
bootstrap-$(bootstrap_version)-dist.zip:
wget -q https://github.com/twbs/bootstrap/releases/download/v$(bootstrap_version)/bootstrap-$(bootstrap_version)-dist.zip -O $@
echo '$(bootstrap_sha256) $@' | sha256sum -c -
$(libs)/bootstrap/$(bootstrap_version)/: bootstrap-$(bootstrap_version)-dist.zip
mkdir -p $@/css $@/fonts $@/js
unzip -j $< '*.css' -d $@/css
unzip -j $< '*/glyphicons*' -d $@/fonts
unzip -j $< '*/bootstrap*.js' -d $@/js
.PHONY: clean
clean:
if test -d $(libs); then rm -r $(libs); fi