summaryrefslogtreecommitdiff
path: root/Makefile
blob: adec0d2a83d41104525efe63e3ca99b2db54a4c4 (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
31
SHELL := /bin/bash

DATA := data/nyc-old.log.gz \
        data/euro.log.gz \
        data/nyc.log.gz \
        data/nyc2.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