summaryrefslogtreecommitdiff
path: root/Makefile
blob: 816799833162adf6cb54544d0485e61c8c8cb62c (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
29
30
SHELL := /bin/bash

DATA := data/nyc-old.log.gz \
        data/euro.log.gz \
        data/nyc.log.gz
REPORTS := $(DATA:data/%.log.gz=reports/%.log)

PLOTS := population ping ping-distrib
PLOT_IMAGES := $(PLOTS:%=out/%.png)

all: $(PLOT_IMAGES)

out/%.png: $(REPORTS)
	@echo "Plotting $@"
	@mkdir -p out
	@cat $(REPORTS) | ./plot.sh "$*" "$@"

reports/%.log: data/%.log.gz
	@echo "Analyzing $<"
	@mkdir -p `dirname "$@"`
	@zcat "$<" | ./stalinizer.py > "$@"

clean_all: clean
	rm -rf reports

clean:
	rm -rf out

.PRECIOUS: $(REPORTS)
.PHONY: clean clean_all