| 1 |
# |
| 2 |
# Makefile for 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 |
export PACKAGE := combinedgraphics |
| 24 |
|
| 25 |
PDFLATEX := pdflatex |
| 26 |
MAKEINDEX := makeindex |
| 27 |
|
| 28 |
# installation directories |
| 29 |
DESTDIR := $(HOME)/.texmf |
| 30 |
DOCDIR := $(DESTDIR)/doc/latex/$(PACKAGE) |
| 31 |
SRCDIR := $(DESTDIR)/source/latex/$(PACKAGE) |
| 32 |
TEXDIR := $(DESTDIR)/tex/latex/$(PACKAGE) |
| 33 |
|
| 34 |
.PHONY: all pkg doc test install clean distclean force |
| 35 |
|
| 36 |
all: pkg doc test |
| 37 |
|
| 38 |
%.sty: %.ins %.dtx |
| 39 |
$(RM) $@ |
| 40 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 41 |
|
| 42 |
%.idx %.glo: %.dtx %.sty |
| 43 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 44 |
|
| 45 |
%.ind: %.idx |
| 46 |
$(MAKEINDEX) -s gind.ist -o $@ $< |
| 47 |
|
| 48 |
%.gls: %.glo |
| 49 |
$(MAKEINDEX) -s gglo.ist -o $@ $< |
| 50 |
|
| 51 |
$(PACKAGE).pdf: %.pdf: %.dtx %.sty %.ind %.gls |
| 52 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 53 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 54 |
$(PDFLATEX) -interaction=nonstopmode $< |
| 55 |
|
| 56 |
pkg: $(PACKAGE).sty |
| 57 |
|
| 58 |
doc: $(PACKAGE).pdf |
| 59 |
|
| 60 |
test: $(PACKAGE).sty |
| 61 |
$(MAKE) -C test |
| 62 |
|
| 63 |
install: |
| 64 |
mkdir -p $(DOCDIR) $(SRCDIR) $(TEXDIR) |
| 65 |
install -m 644 README COPYING $(PACKAGE).pdf $(DOCDIR) |
| 66 |
install -m 644 $(PACKAGE).ins $(PACKAGE).dtx Makefile $(SRCDIR) |
| 67 |
install -m 644 $(PACKAGE).sty $(TEXDIR) |
| 68 |
$(MAKE) -C test install |
| 69 |
mktexlsr $(DESTDIR) |
| 70 |
|
| 71 |
clean: |
| 72 |
$(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *~ |
| 73 |
$(MAKE) -C test clean |
| 74 |
|
| 75 |
distclean: clean |
| 76 |
$(RM) $(PACKAGE).sty |
| 77 |
$(MAKE) -C test distclean |
| 78 |
|
| 79 |
mrproper: distclean |
| 80 |
$(RM) $(PACKAGE).pdf |
| 81 |
$(MAKE) -C test mrproper |