| 1 |
# |
| 2 |
# Makefile for tests of combinedgraphics package |
| 3 |
# |
| 4 |
# Copyright 2009,2011,2012 Christian Schneider <software(at)chschneider(dot)eu> |
| 5 |
# |
| 6 |
# This file is part of combinedgraphics. |
| 7 |
# |
| 8 |
# combinedgraphics is free software: you can redistribute it and/or modify |
| 9 |
# it under the terms of the GNU General Public License version 3 as |
| 10 |
# published by the Free Software Foundation, not any later version. |
| 11 |
# |
| 12 |
# combinedgraphics is distributed in the hope that it will be useful, |
| 13 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
# GNU General Public License for more details. |
| 16 |
# |
| 17 |
# You should have received a copy of the GNU General Public License |
| 18 |
# along with combinedgraphics. If not, see <http://www.gnu.org/licenses/>. |
| 19 |
# |
| 20 |
# WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS! |
| 21 |
# |
| 22 |
|
| 23 |
# input files |
| 24 |
SRCFILE := combinedgraphics_test.tex |
| 25 |
STYFILES := ../combinedgraphics.sty |
| 26 |
FIGFILES := xfig325.fig |
| 27 |
PLTFILES := gnuplot42.plt |
| 28 |
|
| 29 |
# installation directories |
| 30 |
DESTDIR := $(HOME)/.texmf |
| 31 |
DOCDIR := $(DESTDIR)/doc/latex/$(PACKAGE)/test |
| 32 |
SRCDIR := $(DESTDIR)/source/latex/$(PACKAGE)/test |
| 33 |
|
| 34 |
# output files |
| 35 |
PDFFILE := $(patsubst %.tex,%.pdf,$(SRCFILE)) |
| 36 |
TEXGRAPHICS := $(patsubst %.fig,%.tex,$(FIGFILES)) \ |
| 37 |
$(patsubst %.plt,%.tex,$(PLTFILES)) |
| 38 |
EPSGRAPHICS := $(patsubst %.fig,%.eps,$(FIGFILES)) \ |
| 39 |
$(patsubst %.plt,%.eps,$(PLTFILES)) |
| 40 |
PDFGRAPHICS := $(patsubst %.fig,%.pdf,$(FIGFILES)) \ |
| 41 |
$(patsubst %.plt,%.pdf,$(PLTFILES)) |
| 42 |
|
| 43 |
# required tools |
| 44 |
PDFLATEX := pdflatex |
| 45 |
FIG2DEV := fig2dev |
| 46 |
GNUPLOT := gnuplot |
| 47 |
EPSTOPDF := epstopdf |
| 48 |
|
| 49 |
# environment variables of (pdf)latex |
| 50 |
export TEXINPUTS := .:..:$(TEXINPUTS) |
| 51 |
export TEXPICTS := .:..:$(TEXPICTS) |
| 52 |
|
| 53 |
.PHONY: all test install clean distclean force |
| 54 |
|
| 55 |
all: test |
| 56 |
|
| 57 |
%.tex: %.fig |
| 58 |
$(FIG2DEV) -L pstex_t $< $@ |
| 59 |
|
| 60 |
%.eps: %.fig |
| 61 |
$(FIG2DEV) -L pstex $< $@ |
| 62 |
|
| 63 |
%.tex %.eps: %.plt |
| 64 |
$(GNUPLOT) $< |
| 65 |
|
| 66 |
%.pdf: %.eps |
| 67 |
$(EPSTOPDF) --outfile=$@ $< |
| 68 |
|
| 69 |
$(PDFFILE): %.pdf: %.tex $(STYFILES) $(TEXGRAPHICS) $(PDFGRAPHICS) |
| 70 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 71 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 72 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 73 |
|
| 74 |
test: $(PDFFILE) $(EPSGRAPHICS) |
| 75 |
|
| 76 |
install: |
| 77 |
mkdir -p $(DOCDIR) $(SRCDIR) |
| 78 |
install -m 644 $(PDFFILE) $(DOCDIR) |
| 79 |
install -m 644 $(SRCFILE) $(FIGFILES) $(PLTFILES) Makefile \ |
| 80 |
$(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) $(SRCDIR) |
| 81 |
|
| 82 |
clean: |
| 83 |
$(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *~ |
| 84 |
|
| 85 |
distclean: clean |
| 86 |
|
| 87 |
mrproper: distclean |
| 88 |
$(RM) $(PDFFILE) $(TEXGRAPHICS) $(EPSGRAPHICS) $(PDFGRAPHICS) |