Skip to content

Instantly share code, notes, and snippets.

@Taeradan
Forked from anonymous/make file
Last active December 15, 2015 17:49
Show Gist options
  • Save Taeradan/5299427 to your computer and use it in GitHub Desktop.
Save Taeradan/5299427 to your computer and use it in GitHub Desktop.
EXE_dia=hello_dia.txt
SRC_dia= $(wildcard *.dia)
OBJ_dia= $(SRC_dia:.dia=_dia.pdf)
EXE_dot=hello_dot.txt
SRC_dot= $(wildcard *.dot)
OBJ_dot= $(SRC_dot:.dot=_dot.pdf)
all: dia graphviz web
dia: $(EXE_dia)
graphviz: $(EXE_dot)
$(EXE_dia): $(OBJ_dia)
@date > $(EXE_dia)
%_dia.png: %.dia
@echo "\t - $@"
@dia -t png -O . $< -e $@
%_dia.pdf: %.dia
@echo "\t - $@"
@dia -t pdf -O . $< -e $@
$(EXE_dot): $(OBJ_dot)
@date > $(EXE_dot)
%_dot.png: %.dot
@echo "\t - $@"
@dot -Tpng $< -o $@
%_dot.pdf: %.dot
@echo "\t - $@"
@dot -Tpdf $< -o $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment