summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-06-15 12:41:56 +0200
committeremkael <emkael@tlen.pl>2017-06-15 12:41:56 +0200
commitc69af3bfdd8e65ff7badbd28178cb834e900eda5 (patch)
tree331df191efaff04e7c25905c84a817557b9be46f /Makefile
parentdd2ca60708e8a1714f11afec2b67caa656bd1964 (diff)
Separating HTML pages minimization from `all` build target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile29
1 files changed, 14 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 0d9b2d6..ab8df76 100644
--- a/Makefile
+++ b/Makefile
@@ -1,27 +1,26 @@
-all: rankings players
-
-rankings: tables editions minimize
-
-tables:
- bin/build-rankings.sh config/dates.json http
-
+tmpfiles := $(patsubst %.html,%.html.tmp,$(wildcard http/*.html))
rankfiles := $(patsubst %.html,%.html.ed,$(wildcard http/*.html))
-editions: $(rankfiles)
+$(tmpfiles):
+ htmlmin $(patsubst %.tmp,%,$@) $@
+ mv $@ $(patsubst %.tmp,%,$@)
$(rankfiles):
python editions.py $(patsubst %.ed,%,$@)
-tmpfiles := $(patsubst %.html,%.html.tmp,$(wildcard http/*.html))
+all: rankings players
minimize: $(tmpfiles)
-$(tmpfiles):
- htmlmin $(patsubst %.tmp,%,$@) $@
- mv $@ $(patsubst %.tmp,%,$@)
+deploy:
+ sshpass -p `cat config/deploy-pass` rsync -urpP http/ `cat config/deploy-path`
+
+rankings: tables editions
+
+tables:
+ bin/build-rankings.sh config/dates.json http
+
+editions: $(rankfiles)
players:
bin/build-players.sh http
-
-deploy:
- sshpass -p `cat config/deploy-pass` rsync -urpP http/ `cat config/deploy-path`