blob: e9e121e646a02c5e360e901fb95f8184e8f083aa (
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
84
85
86
87
88
89
90
91
92
93
94
95
|
## Makefile - Makefile for the pbox package.
## Copyright (C) 2003 Simon Law
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
## This program 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 this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
# Set the package name
PACKAGE = pbox
# Use pdfLaTeX for best results
LATEX = pdflatex
LATEX2DVI = $(LATEX) \\pdfoutput=0 \\input
LATEX2PDF = $(LATEX) \\pdfoutput=1 \\input
# MakeIndex parameters
MAKEINDEX = makeindex
GIND = gind.ist
GGLO = gglo.ist
# Installation
INSTALL = /usr/bin/install -c
INSTALL_DATA = $(INSTALL) -m 644
DESTDIR = .
TDSFORMAT = latex/
# Shell
RM = rm -f
TEXFILES=\
$(PACKAGE).aux\
$(PACKAGE).drv\
$(PACKAGE).dvi\
$(PACKAGE).glo\
$(PACKAGE).gls\
$(PACKAGE).idx\
$(PACKAGE).ilg\
$(PACKAGE).ind\
$(PACKAGE).log\
$(PACKAGE).pdf\
$(PACKAGE).sty
.PHONY : all install uninstall dvi pdf clean
all : $(PACKAGE).sty $(PACKAGE).dvi $(PACKAGE).pdf ;
install : all
$(INSTALL) -d $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)
$(INSTALL) -d $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)
$(INSTALL_DATA) $(PACKAGE).sty $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/
$(INSTALL_DATA) $(PACKAGE).dvi $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/
$(INSTALL_DATA) $(PACKAGE).pdf $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/
uninstall : all
$(RM) $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).sty
$(RM) $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).dvi
$(RM) $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).pdf
ls $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/* >/dev/null 2>&1 \
|| $(RM) -r $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)
ls $(DESTDIR)/texmf/doc/$(PACKAGE)/* >/dev/null 2>&1 \
|| $(RM) -r $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)
dvi : $(PACKAGE).dvi
pdf : $(PACKAGE).pdf
%.sty : %.ins %.dtx
$(LATEX) $<
%.dvi : %.dtx %.sty
$(LATEX2DVI) $<
$(MAKEINDEX) -s $(GIND) $*.idx
$(MAKEINDEX) -s $(GGLO) -o $*.gls $*.glo
$(LATEX2DVI) $<
%.pdf : %.dtx %.sty
$(LATEX2PDF) $<
$(MAKEINDEX) -s $(GIND) $*.idx
$(MAKEINDEX) -s $(GGLO) -o $*.gls $*.glo
$(LATEX2DVI) $<
clean :
$(RM) $(TEXFILES)
|