Makefile: add targets to build images from XZed logs
This commit is contained in:
parent
cb26f47e5f
commit
0ca98b1ba3
22
Makefile
22
Makefile
|
@ -33,3 +33,25 @@ imgs/%-avg_pwr-highres.webp: logs/%.csv
|
||||||
./plot_wf_longterm.py -a avg_pwr -r 10 -o $$tmpfile $< && \
|
./plot_wf_longterm.py -a avg_pwr -r 10 -o $$tmpfile $< && \
|
||||||
convert $$tmpfile -quality 100 $@ && \
|
convert $$tmpfile -quality 100 $@ && \
|
||||||
rm $$tmpfile
|
rm $$tmpfile
|
||||||
|
|
||||||
|
# Targets to re-build images from xz-ed logs
|
||||||
|
|
||||||
|
SRCS_XZ:=$(wildcard logs/*.csv.xz)
|
||||||
|
IMGS1_XZ:=$(patsubst %.csv, %-avg_pwr-fromxz.webp, $(SRCS_XZ))
|
||||||
|
IMGS2_XZ:=$(patsubst %.csv, %-peak-fromxz.webp, $(SRCS_XZ))
|
||||||
|
IMGS_XZ:=$(patsubst logs/%, imgs/%, $(IMGS1_XZ) $(IMGS2_XZ))
|
||||||
|
|
||||||
|
.PHONY: from_xz
|
||||||
|
from_xz: imgs/ $(IMGS_XZ)
|
||||||
|
|
||||||
|
imgs/%-avg_pwr-fromxz.webp: logs/%.csv.xz
|
||||||
|
tmpfile=$$(mktemp /tmp/spec.XXXXX.png) && \
|
||||||
|
./plot_wf_longterm.py -a avg_pwr -r 60 -o $$tmpfile $< && \
|
||||||
|
convert $$tmpfile -quality 100 $@ && \
|
||||||
|
rm $$tmpfile
|
||||||
|
|
||||||
|
imgs/%-peak-fromxz.webp: logs/%.csv.xz
|
||||||
|
tmpfile=$$(mktemp /tmp/spec.XXXXX.png) && \
|
||||||
|
./plot_wf_longterm.py -a peak -r 60 -o $$tmpfile $< && \
|
||||||
|
convert $$tmpfile -quality 100 $@ && \
|
||||||
|
rm $$tmpfile
|
||||||
|
|
Loading…
Reference in a new issue