add diagrams

This commit is contained in:
Emily Martins 2022-01-18 18:55:50 +01:00
parent e201b5e6d7
commit 1b52a2a179
6 changed files with 591 additions and 2 deletions

27
docs/diagrams/Makefile Normal file
View file

@ -0,0 +1,27 @@
SHELL := /usr/bin/env bash
.PHONY: diagrams clean_diagrams
usage:
@echo "usage: make <command> [OPTIONS]"
@echo
@echo "Available commands:"
@echo " diagrams -- Create the diagrams from .dot files"
@echo " clean_diagrams -- Delete the diagram images"
DOT_INPUTS := $(wildcard ./*.dot)
DOT_SVGS := $(patsubst %.dot,%.svg,$(DOT_INPUTS))
DOT_PNGS := $(patsubst %.dot,%.png,$(DOT_INPUTS))
diagrams: $(DOT_SVGS) $(DOT_PNGS)
@echo $(DOT_SVGS)
clean_diagrams:
rm $(DOT_SVGS)
rm $(DOT_PNGS)
%.png: %.svg
convert $< $@
%.svg: %.dot
dot -Tsvg $< -o $@