blob: a6564c9c0b6f1403e0a437b904f05b20c1a82048 (
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
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
133
134
135
136
137
138
139
140
141
142
143
144
|
# Makefile for the LaTeX2e package `draftcopy'
# Copyright (C)1995 Dr. Juergen Vollmer, all rights reserved.
# Dr. Juergen Vollmer, Viktoriastrasse 15, D-76133 Karlsruhe, Germany
# Juergen.Vollmer@acm.org
# $Id: Makefile,v 2.60 2002/02/25 09:13:32 vollmer Exp $
BASE = draftcopy
VERSION = 2.16
V_DATE = February 25, 2002
VV_DATE = 2002/02/25
DVIPS = dvips
GZIP = gzip
LATEX = latex
MAKEINDEX = makeindex
PDFLATEX = pdflatex
# a postscript viewer:
GV = ghostscript
GV = gv
#-------- user configuration section
TEX_DIR = /usr/lib/teTeX/texmf
STY_DIR = $(TEX_DIR)/tex/latex/misc
CFG_DIR = $(TEX_DIR)/tex/latex/config
DOC_DIR = $(TEX_DIR)/doc/latex/draftcopy
SRC_DIR = $(TEX_DIR)/source/latex/draftcopy
#-------- end of user configuration section
DATE = `date +%Y-%m-%d`
DATE2 = `date +%Y/%m/%d`
TAR_BAK = $(BASE)-$(DATE)-backup.tar.gz
TAR_SRC = $(BASE)-$(DATE)-source.tar.gz
TAR_DIST = $(BASE)-$(VERSION).tar.gz
EX = --exclude "*.o" --exclude core --exclude "*.tar.gz" --exclude "*~" \
--exclude "*.a"
EXrcs = $(EX) --exclude "*/RCS/*" --exclude "*/RCS"
.PHONY: all clean realclean diff backup src-tar
all: draftcopy.dtx $(BASE).ps $(BASE).pdf test clean
draftcopy.dtx: draftcopy.doc draftcopy.ins
$(LATEX) draftcopy.ins
%.dvi: %.dtx
$(LATEX) $*.dtx
makeindex -s gind.ist -o $*.ind $*.idx
makeindex -s gglo.ist -o $*.gls $*.glo
rm -f rcsinfo.ins rcsinfo.perl
$(LATEX) $*.dtx
%.dvi: %.tex
rm -f *.toc *.aux
$(LATEX) $*.tex
$(LATEX) $*.tex
%.ps: %.dvi
$(DVIPS) -o $*.ps $*.dvi
%.pdf: %.dtx
rm -f *.toc *.aux
$(PDFLATEX) $*.dtx
$(PDFLATEX) $*.dtx
test: test-portrait test-landscape
test-portrait:
for i in 1 2 3 4 5 6 7 8 9 10 13 14 15 16; do \
f=$(BASE)-test-$$i; \
echo file: $$f; \
$(LATEX) $$f ; \
$(DVIPS) -o $$f.ps $$f.dvi; \
$(GV) $$f.ps ; \
done
test-landscape:
for i in 11 12; do \
f=$(BASE)-test-$$i; \
echo file: $$f; \
$(LATEX) $$f ; \
$(DVIPS) -t landscape -o $$f.ps $$f.dvi; \
$(GV) -seascape $$f.ps ; \
done
install: draftcopy.dtx draftcopy.dvi draftcopy.ps
[ -d $(TEX_DIR) ] || mkdir $(TEX_DIR)
[ -d $(DOC_DIR) ] || mkdir $(DOC_DIR)
[ -d $(SRC_DIR) ] || mkdir $(SRC_DIR)
[ -d $(CFG_DIR) ] || mkdir $(CFG_DIR)
[ -d $(STY_DIR) ] || mkdir $(STY_DIR)
cp draftcopy.sty $(STY_DIR)
cp draftcopy.cfg $(CFG_DIR)
cp draftcopy.dtx $(DOC_DIR)
cp draftcopy.dvi $(DOC_DIR)
cp draftcopy.ps $(DOC_DIR)
cp draftcopy-test-*.tex $(DOC_DIR)
cp draftcopy.doc $(SRC_DIR)
cp draftcopy.ins $(SRC_DIR)
cp README $(SRC_DIR)
cp THIS-IS-VERSION-$(VERSION) $(SRC_DIR)
uninstall:
rm -f $(STY_DIR)/draftcopy.sty
rm -f $(CFG_DIR)/draftcopy.cfg
rm -fr $(DOC_DIR)
rm -fr $(SRC_DIR)
clean:
-rm -f *.dtx *.log *.aux *.lof *.lot *.toc
-rm -f *.idx *.ind *.glo *.gls *~ *.ilg *.out
realclean: clean
-rm -f *.sty *.cls *.ps *.dvi *.cfg *.pdf
-rm -f *test*
src-tar:
$(MAKE) realclean
@cd ..; tar $(EXrcs) -czvf $(BASE)/$(TAR_SRC) $(BASE)
dist:
rm -f THIS-IS-VERSION-*
co -l draftcopy.doc draftcopy.ins README Makefile
@rm -f .xxx; cp draftcopy.doc .xxx
@sed < .xxx -e 's/\(^% \\date{\).*}/\1$(V_DATE); Version $(VERSION)}/' \
-e 's|\(^ *\\ProvidesPackage{draftcopy}\)\[.*\]|\1[$(VV_DATE) v$(VERSION)]|' \
> draftcopy.doc
@rm -f .xxx; cp draftcopy.ins .xxx
@sed < .xxx -e 's/\(Version:\) *[0-9]*\.[0-9]*.*}/\1 $(VERSION); $(V_DATE)}/' \
> draftcopy.ins
@rm -f .xxx; cp README .xxx
@sed < .xxx -e 's/\(Version:\) *[0-9]*\.[0-9]*.*$$/\1 $(VERSION); $(V_DATE)/' \
> README
V=`echo $(VERSION)-$(VV_DATE) | sed -e 's|\.|-|g' -e's|/|-|g'`; \
ci -u -N"VERSION-$$V" -m"Distribution" \
draftcopy.ins draftcopy.doc Makefile README
- $(MAKE) realclean all
@echo "VERSION $(VERSION) DATE=$(V_DATE)" > THIS-IS-VERSION-$(VERSION)
@cd ..; tar $(EXrcs) -czvf $(BASE)/$(TAR_DIST) \
$(BASE)/draftcopy.ins \
$(BASE)/draftcopy.doc \
$(BASE)/Makefile \
$(BASE)/README \
$(BASE)/THIS-IS-VERSION-$(VERSION)
|