Skip to content

Instantly share code, notes, and snippets.

@mmb
Created September 27, 2018 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmb/3168a73b89f56a926cf112a3ec6c5292 to your computer and use it in GitHub Desktop.
Save mmb/3168a73b89f56a926cf112a3ec6c5292 to your computer and use it in GitHub Desktop.
Makefile for graphviz
SRCS = $(wildcard *.dot)
PDFS = $(patsubst %.dot,%.pdf,$(SRCS))
PNGS = $(patsubst %.dot,%.png,$(SRCS))
all: pdfs pngs
pdfs: $(PDFS)
pngs: $(PNGS)
%.pdf: %.dot
dot -Tpdf -o $@ $<
%.png: %.dot
dot -Tpng -o $@ $<
clean:
rm -fv *.pdf *.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment