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

DATA := $(wildcard data/*.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