From c69af3bfdd8e65ff7badbd28178cb834e900eda5 Mon Sep 17 00:00:00 2001 From: emkael Date: Thu, 15 Jun 2017 12:41:56 +0200 Subject: Separating HTML pages minimization from `all` build target --- Makefile | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) (limited to 'Makefile') 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` -- cgit v1.2.3