summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/fullminipage/Makefile
blob: 764a4b53a4f9bf2dac171b5a36f6457056f51aba (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# Makefile for fullminipage package
#
# Copyright 2012 Christian Schneider <software(at)chschneider(dot)eu>
#
# This file is part of fullminipage.
#
# fullminipage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation, not any later version.
#
# fullminipage is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with fullminipage.  If not, see <http://www.gnu.org/licenses/>.
#
# WARNING: THIS IS ALPHA SOFTWARE AND MAY CONTAIN SERIOUS BUGS!
#

PACKAGE   := fullminipage
TESTFILE  := fullminipage_test

PDFLATEX  := pdflatex
MAKEINDEX := makeindex

# installation directories
DESTDIR   := $(HOME)/.texmf
DOCDIR    := $(DESTDIR)/doc/latex/$(PACKAGE)
SRCDIR    := $(DESTDIR)/source/latex/$(PACKAGE)
TEXDIR    := $(DESTDIR)/tex/latex/$(PACKAGE)

.PHONY: all pkg doc test install clean distclean mrproper force

all: pkg doc test

%.sty: %.ins %.dtx
	$(RM) $@
	$(PDFLATEX) -interaction=nonstopmode $<

%.idx %.glo: %.dtx %.sty
	$(PDFLATEX) -interaction=nonstopmode $<

%.ind: %.idx
	$(MAKEINDEX) -s gind.ist -o $@ $<

%.gls: %.glo
	$(MAKEINDEX) -s gglo.ist -o $@ $<

$(PACKAGE).pdf: %.pdf: %.dtx %.sty %.ind %.gls
	$(PDFLATEX) -interaction=nonstopmode $<
	$(PDFLATEX) -interaction=nonstopmode $<
	$(PDFLATEX) -interaction=nonstopmode $<

$(TESTFILE).pdf: %.pdf: %.tex $(PACKAGE).sty
	$(PDFLATEX) -interaction=nonstopmode $<
	$(PDFLATEX) -interaction=nonstopmode $<
	$(PDFLATEX) -interaction=nonstopmode $<

pkg: $(PACKAGE).sty

test: $(TESTFILE).pdf

doc: $(PACKAGE).pdf

install:
	mkdir -p $(DOCDIR) $(SRCDIR) $(TEXDIR)
	install -m 644 README COPYING $(PACKAGE).pdf $(TESTFILE).pdf $(DOCDIR)
	install -m 644 $(PACKAGE).ins $(PACKAGE).dtx $(TESTFILE).tex Makefile \
	  $(SRCDIR)
	install -m 644 $(PACKAGE).sty $(TEXDIR)
	mktexlsr $(DESTDIR)

clean:
	$(RM) *.aux *.glo *.gls *.idx *.ilg *.ind *.log *.toc *.out *~

distclean: clean
	$(RM) $(PACKAGE).sty

mrproper: distclean
	$(RM) $(PACKAGE).pdf $(TESTFILE).pdf