2 #DOCS=socketcan-qdisc socketcan-qdisc-review1 socketcan-qdisc-final
4 all: $(DOCS:%=%.pdf) #$(DOCS:%=%.txt)
7 rm -f $(wildcard $(DOCS:%=%.aux) $(DOCS:%=%.bbl) $(DOCS:%=%.log) $(DOCS:%=%.fls))
9 version_tag_prefix = $(subst socketcan-qdisc-v,v,$(*:%=%-v))
10 VERSION = $(shell (git describe --always --dirty --match $(version_tag_prefix)\* || echo "unknown")|sed -e 's/$(version_tag_prefix)\(.*\)/\1/')
12 LATEX = pdflatex $(LATEX_FLAGS) -synctex=1 -recorder \
13 $(OUTDIR:%=-output-directory %) -file-line-error \
14 -interaction=nonstopmode '\def\version{$(VERSION)}\input{$<}'
16 SVGS = $(wildcard *.svg)
17 GPS = $(wildcard *.gp)
19 .SECONDARY: $(SVGS:%.svg=%.pdf) $(GPS:%.gp=%.pdf)
21 %.pdf: %.tex $(SVGS:%.svg=%.pdf) $(GPS:%.gp=%.pdf)
27 HEVEA = hevea article.hva -text -exec xxdate.exe $<
34 java -jar ~/opt/ditaa/ditaa0_9.jar -r $< $@
37 inkscape --export-area-drawing --export-png=$@ --export-background-opacity=1.0 $<
40 inkscape --export-ps=$@ $<
43 inkscape --export-pdf=$@ $<
53 gnuplot -e 'PWD="$(PWD)"; set output PWD."/$*.pdf"; set terminal pdfcairo dashed enhanced size $(shell s=`sed -ne '/^# termsize / s///p' $<`; test "$$s" && echo $$s || echo 20cm,7cm) lw 1 font "Times New Roman,8pt";' $<