summaryrefslogtreecommitdiff
path: root/common.mk
blob: 35f0b3bb188bdc2fa89aaa4e721e2724da669bd0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
topdir := $(dir $(lastword $(MAKEFILE_LIST)))
www = $(topdir)/../web-cache/www
artwork = $(topdir)/../web-cache/artwork
branding = $(artwork)/official-2013/optimized-text

#JSMIN = cp $1 $2
#JSMIN = compiler $1
#JSMIN = uglify-js -nc $1 > $2
JSMIN = { sed -n '1,/\*\//p' $1; closure-compiler --js $1; } > $2

%.min.js: %.js
	$(call JSMIN,$<,$@)

$(www)/http/%:
	mkdir -p '$(@D)'
	wget 'http://$*' -O '$@'
	touch '$@'

$(www)/https/%:
	mkdir -p '$(@D)'
	wget 'http://$*' -O '$@'
	touch '$@'

$(branding)/%:
	gitget checkout 'git://projects.parabolagnulinux.org/artwork.git#branch=master' '$(artwork)'
	make -C '$(branding)'

.PHONY: PHONY