summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/disser/include/latex.fig.mk
blob: f3e23d5ded5359436a72878457227cd55c83d310 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# Makefile for EPS figures
# Author: Stanislav Kruchinin <stanislav.kruchinin@gmail.com>
#

E2E?=eps2eps
EPSTOOL?=epstool
EPSTOPDF?=epstopdf

E2EFLAGS?=-dSAFER
ETFLAGS?=--quiet --copy --bbox

E2EFILES?=*.eps
E2PFILES?=*.eps
FBBFILES?=*.eps
FIGCLFILES?=*.pdf
SUFFIX?=~

# end of configuration

help:
	@echo "Targets:"
	@echo "  clean      clean PDF files"
	@echo "  epstoeps   optimize EPS files"
	@echo "  epstopdf   convert all figures to PDF"
	@echo "  fixbb      fix BoundingBox of EPS files"
	@echo "  help       (default) show help"

clean:
	rm -f $(FIGCLFILES)

epstoeps: $(E2EFILES)
	@for f in $^ ;\
	do \
		echo -n "fixbb: $$f..." ;\
		$(E2E) $(E2EFLAGS) $$f $$f$(SUFFIX) ;\
		mv $$f$(SUFFIX) $$f ;\
		echo "done" ;\
	done

epstopdf:	$(patsubst %.eps, %.pdf, $(wildcard $(E2PFILES)))

fixbb: $(FBBFILES)
	@for f in $^ ;\
	do \
		echo -n "fixbb: $$f..." ;\
		$(EPSTOOL) $(ETFLAGS) $$f $$f$(SUFFIX) ;\
		mv $$f$(SUFFIX) $$f ;\
		echo "done" ;\
	done

%.pdf:	%.eps
	@echo -n "epstopdf: $<..."
	@$(EPSTOPDF) "$<"
	@echo "done"