Anton Shestakov <av6@dwimlabs.net>, Mon, 02 Jul 2018 13:47:30 +0800
pipelines: let's try and squeeze all tasks into 1 minute
coffeefiles := $(wildcard coffee/*.coffee
) jsfiles := $(coffeefiles:coffee/%.coffee
=js/%.js
) mapfiles := $(jsfiles:.js
=.js.map
) npm := npm update
&& sed -i -e
's@^\#!/usr/bin/env node$$@&js@' ./node_modules/coffee-script/bin/coffee
jquery_sha256 := b8442ed017e5311995d7174afe7ee1d06485915def347644971efcc8338d37b4
underscore_version := 1.9.1
underscore_sha256 := 2d6564aaa540a704fb198e023bc0f62a4f037baeac192e9d68df622c1d653d7e
backbone_version := 1.3.3
backbone_sha256 := 7a20331721385d9fedfe492dec2110b6695b0d2150c8effdc3804eaaa948dc74
rivets_sha256 := f3ea69e1aff9511d8b9f5c0a954137369b4816b3aa8db1880d7b59f594b0a89b
moment_sha256 := 8675d811a20d4d8bb5b8c2de51fc244ce4110c009acd8fa514d951686bca2de0
uikit_sha256 := 50d070e0551df41b9329ea5283714af759494445ce138147c283978922a620eb
node_modules/.bin/coffee: js/%.js js/%.js.map: coffee/%.
coffee node_modules/.
bin/
coffee ./node_modules/.bin/coffee -o ./js/ -cm $<
build: $(jsfiles) $(mapfiles) $(libs)/
jquery/
$(jquery_version)/ \
$(libs)/
underscore/
$(underscore_version)/ \
$(libs)/
backbone/
$(backbone_version)/ \
$(libs)/
rivets/
$(rivets_version)/ \
$(libs)/
moment/
$(moment_version)/ \
$(libs)/
uikit/
$(uikit_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 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 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 tar xf $< --strip-components
=1 -C
$@ --wildcards
'backbone-$(backbone_version)/backbone*'.INTERMEDIATE: rivets-
$(rivets_version).
tar.
gz rivets-$(rivets_version).tar.gz: wget -q https://github.com/mikeric/rivets/archive/v
$(rivets_version
).tar.gz -O
$@ echo '$(rivets_sha256) $@' | sha256sum -c -
$(libs)/rivets/$(rivets_version)/: rivets-
$(rivets_version).
tar.
gz tar xf $< --strip-components
=2 -C
$@ --wildcards
'rivets-$(rivets_version)/dist/rivets*'.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 tar xf $< --strip-components
=2 -C
$@ --exclude
='tests.js' 'moment-$(moment_version)/min/'.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 tar xf $< --strip-components
=1 -C
$@ --wildcards
\ 'uikit-$(uikit_version)/css/*.min.css' \ 'uikit-$(uikit_version)/js/' \ 'uikit-$(uikit_version)/fonts/' if test -d $(libs); then rm -r $(libs); fi