Debian Codegraph @

texmf-dist/doc/latex/pbox/Makefile

raw
1 ## Makefile - Makefile for the pbox package.
2 ## Copyright (C) 2003 Simon Law
3 ##
4 ## This program is free software: you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation, either version 3 of the License, or
7 ## (at your option) any later version.
8 ##
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
13 ##
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <http://www.gnu.org/licenses/>.
16 ##
17
18 # Set the package name
19 PACKAGE = pbox
20
21 # Use pdfLaTeX for best results
22 LATEX = pdflatex
23 LATEX2DVI = $(LATEX) \\pdfoutput=0 \\input
24 LATEX2PDF = $(LATEX) \\pdfoutput=1 \\input
25
26 # MakeIndex parameters
27 MAKEINDEX = makeindex
28 GIND = gind.ist
29 GGLO = gglo.ist
30
31 # Installation
32 INSTALL = /usr/bin/install -c
33 INSTALL_DATA = $(INSTALL) -m 644
34 DESTDIR = .
35 TDSFORMAT = latex/
36
37 # Shell
38 RM = rm -f
39 ZIP = zip -9
40
41 TEXFILES=\
42 $(PACKAGE).aux\
43 $(PACKAGE).drv\
44 $(PACKAGE).dvi\
45 $(PACKAGE).glo\
46 $(PACKAGE).gls\
47 $(PACKAGE).idx\
48 $(PACKAGE).ilg\
49 $(PACKAGE).ind\
50 $(PACKAGE).log\
51 $(PACKAGE).pdf\
52 $(PACKAGE).sty
53
54 PKGFILES=\
55 AUTHORS\
56 COPYING\
57 ChangeLog\
58 INSTALL\
59 Makefile\
60 README\
61 $(PACKAGE).dtx\
62 $(PACKAGE).ins\
63 $(PACKAGE).pdf
64
65 .PHONY : all install uninstall dvi pdf clean
66
67 all : $(PACKAGE).sty $(PACKAGE).dvi $(PACKAGE).pdf ;
68
69 install : all
70 $(INSTALL) -d $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)
71 $(INSTALL) -d $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)
72 $(INSTALL_DATA) $(PACKAGE).sty $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/
73 $(INSTALL_DATA) $(PACKAGE).dvi $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/
74 $(INSTALL_DATA) $(PACKAGE).pdf $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/
75
76 uninstall : all
77 $(RM) $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).sty
78 $(RM) $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).dvi
79 $(RM) $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)/$(PACKAGE).pdf
80 ls $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)/* >/dev/null 2>&1 \
81 || $(RM) -r $(DESTDIR)/texmf/tex/$(TDSFORMAT)/$(PACKAGE)
82 ls $(DESTDIR)/texmf/doc/$(PACKAGE)/* >/dev/null 2>&1 \
83 || $(RM) -r $(DESTDIR)/texmf/doc/$(TDSFORMAT)/$(PACKAGE)
84
85 dvi : $(PACKAGE).dvi
86
87 pdf : $(PACKAGE).pdf
88
89 %.sty : %.ins %.dtx
90 $(LATEX) $<
91
92 %.dvi : %.dtx %.sty
93 $(LATEX2DVI) $<
94 $(MAKEINDEX) -s $(GIND) $*.idx
95 $(MAKEINDEX) -s $(GGLO) -o $*.gls $*.glo
96 $(LATEX2DVI) $<
97
98 %.pdf : %.dtx %.sty
99 $(LATEX2PDF) $<
100 $(MAKEINDEX) -s $(GIND) $*.idx
101 $(MAKEINDEX) -s $(GGLO) -o $*.gls $*.glo
102 $(LATEX2DVI) $<
103
104 $(PACKAGE).zip : $(PKGFILES)
105 $(RM) $@
106 $(ZIP) $@ $^
107
108 clean :
109 $(RM) $(TEXFILES) $(PACKAGE).zip