/
Makefile.in
230 lines (190 loc) · 6.57 KB
/
Makefile.in
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# ====================================================================
# The Apache Software License, Version 1.1
#
# Copyright (c) 2000-2002 The Apache Software Foundation. All rights
# reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The end-user documentation included with the redistribution,
# if any, must include the following acknowledgment:
# "This product includes software developed by the
# Apache Software Foundation (http://www.apache.org/)."
# Alternately, this acknowledgment may appear in the software itself,
# if and wherever such third-party acknowledgments normally appear.
#
# 4. The names "Apache" and "Apache Software Foundation" must
# not be used to endorse or promote products derived from this
# software without prior written permission. For written
# permission, please contact apache@apache.org.
#
# 5. Products derived from this software may not be called "Apache",
# "mod_python", or "modpython", nor may these terms appear in their
# name, without prior written permission of the Apache Software
# Foundation.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# ====================================================================
#
# This software consists of voluntary contributions made by many
# individuals on behalf of the Apache Software Foundation. For more
# information on the Apache Software Foundation, please see
# <http://www.apache.org/>.
#
# Originally developed by Gregory Trubetskoy.
#
#
# Makefile for mod_python documentation
# ---------------------------------
#
# See also the README file.
#
# You need to set this manually
PYTHON_SRC=
# This is the *documentation* release, and is used to construct the file
# names of the downloadable tarballs.
RELEASE= 2.7
MKHOWTO= $(PYTHON_SRC)/Doc/tools/mkhowto
# These must be declared phony since there
# are directories with matching names:
.PHONY: html
# This can be changed to a4
PAPER= letter
MPFILES= modpython.tex \
copyright.tex \
modpython1.tex \
modpython2.tex \
modpython3.tex \
modpython5.tex \
modpython6.tex \
appendixa.tex \
appendixb.tex
# this target pukes if we don't have PYTHON_SRC set
src_set:
@if test -z "$(PYTHON_SRC)"; then \
echo; \
echo "Please edit Makefile and set PYTHON_SRC to where Python sources are."; \
echo; \
exit 1; \
fi
# Main target
all: pdf
dvi: $(MPFILES) src_set
$(MKHOWTO) --dvi modpython.tex
pdf: $(MPFILES) src_set
$(MKHOWTO) --pdf --$(PAPER) modpython.tex
ps: $(MPFILES) src_set
$(MKHOWTO) --ps --$(PAPER) modpython.tex
html: $(MPFILES) src_set
$(MKHOWTO) --html modpython.tex
mkdir -p modpython/icons
cp $(PYTHON_SRC)/Doc/html/icons/* modpython/icons/
rm -f modpython/modpython.how
# the iconserver option of mkhowto is broken since it writes
# it to the end if the init_file where they aren't useful anymore,
# so we work around it:
for f in `find modpython -type f`; do \
cat $$f | sed s/\.\.\\/icons/icons/g > $${f}2; \
mv $${f}2 $$f; \
done
world: ps pdf html tarballs
# Release packaging targets:
pdf-$(PAPER)-$(RELEASE).tgz: pdf
tar cf - *.pdf | gzip -9 >$@
pdf-$(PAPER)-$(RELEASE).tar.bz2: pdf
tar cf - *.pdf | bzip2 -9 >$@
pdf-$(PAPER)-$(RELEASE).zip: pdf
rm -f $@
zip -q -9 $@ *.pdf
postscript-$(PAPER)-$(RELEASE).tar.bz2: ps
tar cf - *.ps | bzip2 -9 >$@
postscript-$(PAPER)-$(RELEASE).tgz: ps
tar cf - *.ps | gzip -9 >$@
postscript-$(PAPER)-$(RELEASE).zip: ps
rm -f $@
zip -q -9 $@ *.ps
html-$(RELEASE).tgz: html
tar cf - modpython | gzip -9 >$@
html-$(RELEASE).tar.bz2: html
tar cf - modpython | bzip2 -9 >$@
html-$(RELEASE).zip: html
rm -f $@
zip -q -9 $@ modpython
# convenience targets:
tarhtml: html-$(RELEASE).tgz
tarps: postscript-$(PAPER)-$(RELEASE).tgz
tarpdf: pdf-$(PAPER)-$(RELEASE).tgz
tarballs: tarpdf tarps tarhtml
ziphtml: html-$(RELEASE).zip
zipps: postscript-$(PAPER)-$(RELEASE).zip
zippdf: pdf-$(PAPER)-$(RELEASE).zip
zips: zippdf zipps ziphtml
bziphtml: html-$(RELEASE).tar.bz2
bzipps: postscript-$(PAPER)-$(RELEASE).tar.bz2
bzippdf: pdf-$(PAPER)-$(RELEASE).tar.bz2
bzips: bzippdf bzipps bziphtml
# Housekeeping targets
# Remove temporary files; all except the following:
# - sources: .tex, .bib, .sty, *.cls
# - useful results: .dvi, .pdf, .ps, .texi, .info
clean:
rm -f *~ *.aux *.idx *.ilg *.ind *.log *.toc *.bkm *.syn *.pla api.tex
# Remove temporaries as well as final products
clobber: clean
rm -rf modpython
rm -f html-$(RELEASE).tgz
rm -f pdf-$(RELEASE).tgz postscript-$(RELEASE).tgz
rm -f html-$(RELEASE).zip
rm -f pdf-$(RELEASE).zip postscript-$(RELEASE).zip
realclean: clobber
distclean: clobber
rm -f Makefile
# HTML in the doc directory
dist: version html
rm -rf ../doc-html
mv modpython ../doc-html
# Version substitution
version: ../src/include/mpversion.h
DATE="`date +'%B %d, %Y'`"; \
VERSION="`awk '/MPV_STRING/ {print $$3}' ../src/include/mpversion.h`"; \
VERSION="`echo $$VERSION | sed s/\\"//g`"; \
cat modpython.tex | sed s/\\release.*/\\release\{$$VERSION\}/ >modpython.tex2; \
cat modpython.tex2 | sed s/\\date.*/\\date\{"$$DATE"\}/ >modpython.tex
# release reminder
# 1. version/date in src/include/version.h
#
# 2.
# cd Doc
# make dist
#
# 4. cvs ci
# 5. cvs tag release-2-7-3
# 6. cvs export -r release-2-7-3 -d mod_python-2.7.3 mod_python
# 7. cp -r doc-html mod_python-2.7.3
#
# 8. tar czvf mod_python-2.7.3.tgz mod_python_2.7.3
#
# 9. on the website:
# make pdf
# put modpython.pdf on the web in live