File size: 494 Bytes
079c32c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
DOT := $(shell which dot)
SOURCE ?= .
GVS := $(shell find ${SOURCE} -name *.gv)
PNGS := $(addsuffix .gv.png, $(basename ${GVS}))
SVGS := $(addsuffix .gv.svg, $(basename ${GVS}))
%.gv.png: %.gv
$(DOT) -Tpng -o"$(shell readlink -f $@)" "$(shell readlink -f $<)"
%.gv.svg: %.gv
$(DOT) -Tsvg -o"$(shell readlink -f $@)" "$(shell readlink -f $<)"
build: ${SVGS} ${PNGS}
all: build
clean:
rm -rf \
$(shell find ${SOURCE} -name *.gv.svg) \
$(shell find ${SOURCE} -name *.gv.png) \
|