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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
# ALaTeX makefile for Unix
#
# WARNING: some things in this makefile may be specific to the web2c TeX
# distribution, specifically the setting of TEXINPUTS.
#
# If you use A4 paper, setting ARTICLEOPTS to
# a4paper
# may save about 30 pages. The variable is an argument list that is
# passed to the article class.
ARTICLEOPTS =
# Where should metaclass.cfg go?
CFGDIR = /usr/local/lib/texmf/tex/latex/config
# Where should the ALaTeX format go?
FMTDIR = /usr/local/lib/texmf/ini
# Where should the DVI documentation for ALaTeX go?
DOCDIR = /usr/local/lib/texmf/doc/alatex
# Where should the ALaTeX executable (link) go?
BINDIR = /usr/local/bin
# Where are the LaTeX base distribution files?
BASEDIR = /usr/local/src/texmf/macros/latex-95-12/base
# What options should be passed to install for installing
# everything except the executable?
INSTALLOPTS = -c -m 644
# END OF USER-CONFIGURABLE OPTIONS, except for experts of course.
home = alatex
version = 1.0
versionfile = VERSION-$(version)
archname = alatex-$(version)
files = $(versionfile) COPYING \
Makefile aunpack.ins aunpcked.txt amanifst.txt \
0areadme.txt README abugs.txt ainstall.txt \
alatex.dtx alatex.tex
doc-files = alatex.dvi
.PHONY: all install
.PHONY: alatex doc install-alatex install-doc
.PHONY: clean help default
.PHONY: distribution
default help:
@echo ; \
echo "Look over the variables at the top of the Makefile and adjust them if"; \
echo "you want. You probably want to try these targets in this order:"; \
echo ""; \
echo " all makes alatex.fmt and metaclas.cfg"; \
echo " install installs them and creates a link from alatex to virtex"; \
echo " check runs alatex ltxcheck.tex"; \
echo " clean removes auxiliary and rebuildable files"; \
echo ""; \
echo "Other targets you might want to use are:"; \
echo ""; \
echo " doc makes the ALaTeX documentation"; \
echo " install-doc installs it"; \
echo
all: alatex
alatex: alatex.fmt metaclas.cfg
doc: alatex.dvi
$(versionfile):
touch $@
README:
ln -s 0areadme.txt $@
alatex.ltx metaclas.cfg: alatex.dtx aunpack.ins \
README $(versionfile)
TEXINPUTS=.:$(BASEDIR):; export TEXINPUTS; \
tex aunpack.ins
alatex.fmt: alatex.ltx
initex \&latex alatex.ltx
alatex.dvi: %.dvi: %.tex %.dtx
echo "\PassOptionsToClass{$(ARTICLEOPTS)}{article}" > ltxdoc.cfg
latex $*.tex
INDEXSTYLE=.:$(BASEDIR); export INDEXSTYLE; \
makeindex -s gind.ist $*.idx
latex $*.tex
latex $*.tex
install: install-alatex
install-alatex: alatex
mkdir -p $(BINDIR) $(FMTDIR) $(CFGDIR)
rm -f $(BINDIR)/alatex
ln -f -s `type virtex | cut -d' ' -f 3` $(BINDIR)/alatex
install $(INSTALLOPTS) alatex.fmt $(FMTDIR)
install $(INSTALLOPTS) metaclas.cfg $(CFGDIR)
install-doc: doc
mkdir -p $(DOCDIR)
install $(INSTALLOPTS) $(doc-files) $(DOCDIR)
check: install
TEXINPUTS=.:$(BASEDIR):; export TEXINPUTS; \
$(BINDIR)/alatex ltxcheck.tex
distribution: $(files)
rm -f $(archname).tar.gz
cd ..; \
ln -s $(home) $(archname); \
tar czf $(archname).tar.gz \
$(addprefix $(archname)/, $(files)); \
rm $(archname); \
mv $(archname).tar.gz $(home)
clean:
rm -f aunpack.log \
metaclas.cfg \
alatex.{log,ltx,ind,idx,ilg,log,aux,toc} \
ltxcheck.{log,aux} \
ltxdoc.cfg
realclean veryclean: clean
rm -f $(doc-files) \
alatex.fmt \
README $(versionfile) \
$(archname).tar.gz
|