Commit | Line | Data |
---|---|---|
ee7c00ac DHW |
1 | ### Makefile for preparing a progressive release. |
2 | ### | |
3 | ||
4 | ### This makefile is distinct from test-build for several reasons. | |
5 | ### First, this version builds a "stage4" using src directories that | |
6 | ### have no CVS directories. Second, the binaries are build from | |
7 | ### independent copies of the source. That is, each host release will | |
8 | ### have it's own copy of the src directory. | |
9 | ||
10 | ### | |
11 | ### This file was written and is maintained by K. Richard Pixley, | |
12 | ### <rich@cygnus.com>. | |
13 | ### | |
14 | ||
15 | CVS := /usr/latest/bin/cvs # using cvs-1.3 | |
16 | tree := progressive | |
17 | rooting := /usr/cygnus | |
18 | cvs_module := progressive1 | |
19 | gccflags := "-O" | |
20 | release_tag := progressive-920529 | |
21 | bundle := emacs | |
22 | host := sun4 | |
23 | ||
24 | ifeq (${bundle},emacs) | |
25 | fixincludes := | |
26 | doc := emacs | |
27 | else | |
28 | fixincludes := ${host_release}/lib/fixincludes | |
29 | doc := install | |
30 | endif | |
31 | ||
32 | host_release=${host}/${release_tag} | |
33 | objdir=${host_release}/objdir | |
34 | ||
35 | all: .${host}-done fluff | |
36 | ||
37 | testfile: all blockit ${host}+.Z | |
38 | ${host}+.Z: | |
39 | (cd ${host} ; tar cf - ${release_tag} \ | |
40 | | compress -vV \ | |
41 | | ../blockit \ | |
42 | > ../$@) | |
43 | ||
44 | .${host}-done: .${host}-install .${host}-install-info | |
45 | # rm -rf ${objdir} | |
46 | # touch $@ | |
47 | ||
48 | .${host}-install: .${host}-all | |
49 | ${MAKE} -C ${objdir} -w install-no-fixedincludes \ | |
50 | prefix=`pwd`/${host_release} \ | |
51 | exec_prefix=`pwd`/${host_release}/H-${host} \ | |
52 | "CC=/usr/cygnus/${tree}.${tree}/H-${host}/bin/gcc ${gccflags}" | |
53 | touch $@ | |
54 | ||
55 | .${host}-install-info: .${host}-info | |
56 | ${MAKE} -C ${objdir} -w install-info \ | |
57 | prefix=`pwd`/${host_release} \ | |
58 | exec_prefix=`pwd`/${host_release}/H-${host} \ | |
59 | "CC=/usr/cygnus/${tree}.${tree}/H-${host}/bin/gcc \ | |
60 | ${gccflags}" | |
61 | touch $@ | |
62 | ||
63 | .${host}-all: .${host}-config | |
64 | ${MAKE} -C ${objdir} -w all "CC=/usr/cygnus/${tree}.${tree}/H-${host}/bin/gcc ${gccflags}" | |
65 | touch $@ | |
66 | ||
67 | .${host}-info: .${host}-config | |
68 | ${MAKE} -C ${objdir} -w info "CC=/usr/cygnus/${tree}.${tree}/H-${host}/bin/gcc ${gccflags}" | |
69 | touch $@ | |
70 | ||
71 | .${host}-config: .${host}-src | |
72 | cd ${objdir} ; \ | |
73 | ../src/configure ${host} \ | |
74 | -prefix=${rooting}/${release_tag} \ | |
75 | -exec_prefix=${rooting}/${release_tag}/H-${host} | |
76 | touch $@ | |
77 | ||
78 | .${host}-src: .${release_tag}-co .${host}-dirs | |
79 | rm -rf ${host_release}/src | |
80 | (tar cf - ${release_tag} | (cd ${host_release} ; tar xvf -) ; true) | |
81 | (cd ${host_release}/${release_tag} ; find . \( -name CVS -o -name CVS.adm \) -depth -exec rm -rf {} \; ) | |
82 | mv ${host_release}/${release_tag} ${host_release}/src | |
83 | touch $@ | |
84 | ||
85 | .${host}-dirs: | |
86 | [ -d ${host} ] || mkdir ${host} | |
87 | [ -d ${host_release} ] || mkdir ${host_release} | |
88 | [ -d ${objdir} ] || mkdir ${objdir} | |
89 | touch $@ | |
90 | ||
91 | .${release_tag}-co: .${release_tag}-tagged | |
92 | ${CVS} co -r ${release_tag} ${cvs_module} | |
93 | mv ${tree} ${release_tag} | |
94 | touch $@ | |
95 | ||
96 | .${release_tag}-tagged: | |
97 | ${CVS} rtag ${release_tag} ${cvs_module} | |
98 | touch $@ | |
99 | ||
100 | fluff: ${host_release}/src/Build-A-Release.mk \ | |
101 | ${host_release}/src/Pack-A-Progressive \ | |
102 | ${fixincludes} \ | |
103 | ${host_release}/src/README \ | |
104 | ${fixincludes} \ | |
105 | ${host}/Install \ | |
106 | ${host}/install.dvi \ | |
107 | ${host}/tape-labels.dvi \ | |
108 | ${host_release}/CYGNUS | |
109 | ||
110 | ${host}/tape-labels.dvi: ${host_release}/src/tape-labels.tex | |
111 | cp $< ${host}/`basename $<` | |
112 | (cd ${host} ; tex `basename $<`) | |
113 | rm ${host}/`basename $<` | |
114 | ||
115 | ${host}/install.dvi: ${host_release}/src/install.texinfo | |
116 | cp $< ${host}/`basename $<` | |
117 | (cd ${host} ; tex `basename $<`) | |
118 | (cd ${host} ; tex `basename $<`) | |
119 | (cd ${host} ; tex `basename $<`) | |
120 | rm ${host}/`basename $<` | |
121 | ||
122 | print-notes: ${host}/install.dvi | |
123 | lpr $^ | |
124 | ||
125 | print-labels: ${host}/tape-labels.dvi | |
126 | lpr $^ | |
127 | ||
128 | clean-fluff: | |
129 | rm -f ${host_release}/src/Build-A-Release.mk \ | |
130 | ${host_release}/src/Pack-A-Progressive \ | |
131 | ${host_release}/lib/fixincludes \ | |
132 | ${host_release}/Install \ | |
133 | ${host_release}/src/${doc}-texi.in \ | |
134 | ${host_release}/src/tape-labels-tex.in \ | |
135 | ${host_release}/src/tape-labels.tex \ | |
136 | ${host_release}/src/install.texinfo \ | |
137 | ${host_release}/src/Install.in \ | |
138 | ||
139 | ${host_release}/src/Build-A-Release.mk: ${release_tag}/Build-A-Release.mk | |
140 | cp $< $@ | |
141 | ||
142 | ${host_release}/src/Pack-A-Progressive: ${release_tag}/Pack-A-Progressive | |
143 | cp $< $@ | |
144 | ||
145 | ${host_release}/src/Install.in: ${release_tag}/Install.in | |
146 | cp $< $@ | |
147 | ||
148 | ${host_release}/src/CYGNUS: ${release_tag}/CYGNUS | |
149 | cp $< $@ | |
150 | ||
151 | ${host_release}/CYGNUS: ${host_release}/src/CYGNUS | |
152 | cp $< $@ | |
153 | ||
154 | ${host_release}/src/${doc}-texi.in: ${release_tag}/${doc}-texi.in | |
155 | cp $< $@ | |
156 | ||
157 | ${host_release}/src/tape-labels-tex.in: ${release_tag}/tape-labels-tex.in | |
158 | cp $< $@ | |
159 | ||
160 | ${host_release}/lib/fixincludes: ${host_release}/src/gcc/fixincludes | |
161 | cp $< $@ | |
162 | chmod a+x $@ | |
163 | ||
164 | ${host}/Install: ${host_release}/Install | |
165 | cp $< $@ | |
166 | chmod a+x $@ | |
167 | ||
168 | ${host_release}/Install: ${host_release}/src/Install | |
169 | cp $< $@ | |
170 | chmod a+x $@ | |
171 | ||
172 | ${host_release}/src/install.texinfo: ${host_release}/src/${doc}-texi.in | |
173 | $(MAKE) process -f Build-A-Release.mk IN=$< OUT=$@ relno=`echo ${release_tag} | sed "/${tree}-/s///"` | |
174 | ||
175 | ${host_release}/src/tape-labels.tex: ${host_release}/src/tape-labels-tex.in | |
176 | $(MAKE) process -f Build-A-Release.mk IN=$< OUT=$@ relno=`echo ${release_tag} | sed "/${tree}-/s///"` | |
177 | ||
178 | ${host_release}/src/README: ${host_release}/src/install.texinfo | |
179 | -makeinfo +no-headers +no-split $< -o $@ | |
180 | ### remove tags table | |
181 | sed -e '/^Tag Table/,$$d' $@ | sed -e '$$d' > $@.new | |
182 | mv -f $@.new $@ | |
183 | ||
184 | ${host_release}/src/Install: ${host_release}/src/Install.in | |
185 | $(MAKE) process -f Build-A-Release.mk IN=$< OUT=$@ relno=`echo ${release_tag} | sed "/${tree}-/s///"` | |
186 | chmod a+x $@ | |
187 | ||
188 | process: process-${host} | |
189 | @if grep '||' ${OUT}.new ; then \ | |
190 | echo $0 missed at least one of the triggers. 1>&2 ; \ | |
191 | exit 1 ; \ | |
192 | else \ | |
193 | true ; \ | |
194 | fi | |
195 | mv ${OUT}.new ${OUT} | |
196 | ||
197 | process-sun4: | |
198 | sed -e "/^@clear HOSTsun4/s::@set HOSTsun4:" \ | |
199 | -e "/^@set HOSTsun3/s::@clear HOSTsun3:" \ | |
200 | -e "/^@set HOSTdecstation/s::@clear HOSTdecstation:" \ | |
201 | -e "/^@set HOSTiris/s::@clear HOSTiris:" \ | |
202 | -e "/^@set HOSTrs6000/s::@clear HOSTrs6000:" \ | |
203 | -e "/^@set FIXMES/s::@clear FIXMES:" \ | |
204 | -e "/\|\|RELNO\|\|/s::${relno}:g" \ | |
205 | -e "/\|\|TAPdflt\|\|/s::QIC-24:g" \ | |
206 | -e "/\|\|DEVdflt\|\|/s::/dev/nrst8:g" \ | |
207 | -e "/\|\|BD\|\|/s::35:g" \ | |
208 | -e "/\|\|SD\|\|/s::34:g" \ | |
209 | -e "/\|\|DF\|\|/s::69:g" \ | |
210 | -e "/\|\|HOST\|\|/s::Sun-4:g" \ | |
211 | -e "/\|\|HOSTstr\|\|/s::sun4:g" \ | |
212 | -e "/\|\|TARGET\|\|/s::sun4:g" \ | |
213 | -e "/\|\|GCCvn\|\|/s::cygnus-2.0.2:g" \ | |
214 | -e "/\|\|BUNDLE\|\|/s::${bundle}:g" \ | |
215 | < ${IN} > ${OUT}.new | |
216 | ||
217 | process-sun3: | |
218 | sed -e "/^@set HOSTsun4/s::@clear HOSTsun4:" \ | |
219 | -e "/^@clear HOSTsun3/s::@set HOSTsun3:" \ | |
220 | -e "/^@set HOSTdecstation/s::@clear HOSTdecstation:" \ | |
221 | -e "/^@set HOSTiris/s::@clear HOSTiris:" \ | |
222 | -e "/^@set HOSTrs6000/s::@clear HOSTrs6000:" \ | |
223 | -e "/^@set FIXMES/s::@clear FIXMES:" \ | |
224 | -e "/\|\|RELNO\|\|/s::${relno}:g" \ | |
225 | -e "/\|\|TAPdflt\|\|/s::QIC-24:g" \ | |
226 | -e "/\|\|DEVdflt\|\|/s::/dev/nrst8:g" \ | |
227 | -e "/\|\|BD\|\|/s::32:g" \ | |
228 | -e "/\|\|SD\|\|/s::34:g" \ | |
229 | -e "/\|\|DF\|\|/s::65:g" \ | |
230 | -e "/\|\|HOST\|\|/s::Sun-3:g" \ | |
231 | -e "/\|\|HOSTstr\|\|/s::sun3:g" \ | |
232 | -e "/\|\|TARGET\|\|/s::sun3:g" \ | |
233 | -e "/\|\|GCCvn\|\|/s::cygnus-2.0.2:g" \ | |
234 | -e "/\|\|BUNDLE\|\|/s::${bundle}:g" \ | |
235 | < ${IN} > ${OUT}.new | |
236 | ||
237 | process-decstation: | |
238 | sed -e "/^@set HOSTsun4/s::@clear HOSTsun4:" \ | |
239 | -e "/^@set HOSTsun3/s::@clear HOSTsun3:" \ | |
240 | -e "/^@clear HOSTdecstation/s::@set HOSTdecstation:" \ | |
241 | -e "/^@set HOSTiris/s::@clear HOSTiris:" \ | |
242 | -e "/^@set HOSTrs6000/s::@clear HOSTrs6000:" \ | |
243 | -e "/^@set FIXMES/s::@clear FIXMES:" \ | |
244 | -e "/\|\|RELNO\|\|/s::${relno}:g" \ | |
245 | -e "/\|\|TAPdflt\|\|/s::QIC-24:g" \ | |
246 | -e "/\|\|DEVdflt\|\|/s::/dev/nrmt0:g" \ | |
247 | -e "/\|\|BD\|\|/s::27:g" \ | |
248 | -e "/\|\|SD\|\|/s::34:g" \ | |
249 | -e "/\|\|DF\|\|/s::61:g" \ | |
250 | -e "/\|\|HOST\|\|/s::Decstation:g" \ | |
251 | -e "/\|\|HOSTstr\|\|/s::decstation:g" \ | |
252 | -e "/\|\|TARGET\|\|/s::decstation:g" \ | |
253 | -e "/\|\|GCCvn\|\|/s::cygnus-2.0.2:g" \ | |
254 | -e "/\|\|BUNDLE\|\|/s::${bundle}:g" \ | |
255 | < ${IN} > ${OUT}.new | |
256 | true | |
257 | ||
258 | process-iris4: | |
259 | sed -e "/^@set HOSTsun4/s::@clear HOSTsun4:" \ | |
260 | -e "/^@set HOSTsun3/s::@clear HOSTsun3:" \ | |
261 | -e "/^@set HOSTdecstation/s::@clear HOSTdecstation:" \ | |
262 | -e "/^@clear HOSTiris/s::@set HOSTiris:" \ | |
263 | -e "/^@set HOSTrs6000/s::@clear HOSTrs6000:" \ | |
264 | -e "/^@set FIXMES/s::@clear FIXMES:" \ | |
265 | -e "/\|\|RELNO\|\|/s::${relno}:g" \ | |
266 | -e "/\|\|TAPdflt\|\|/s::QIC-24:g" \ | |
267 | -e "/\|\|DEVdflt\|\|/s::/dev/mt/tps0d0nrns:g" \ | |
268 | -e "/\|\|BD\|\|/s::25:g" \ | |
269 | -e "/\|\|SD\|\|/s::34:g" \ | |
270 | -e "/\|\|DF\|\|/s::59:g" \ | |
271 | -e "/\|\|HOST\|\|/s::Iris:g" \ | |
272 | -e "/\|\|HOSTstr\|\|/s::iris4:g" \ | |
273 | -e "/\|\|TARGET\|\|/s::iris4:g" \ | |
274 | -e "/\|\|GCCvn\|\|/s::cygnus-2.0.2:g" \ | |
275 | -e "/\|\|BUNDLE\|\|/s::${bundle}:g" \ | |
276 | < ${IN} > ${OUT}.new | |
277 | ||
278 | process-rs6000: | |
279 | sed -e "/^@set HOSTsun4/s::@clear HOSTsun4:" \ | |
280 | -e "/^@set HOSTsun3/s::@clear HOSTsun3:" \ | |
281 | -e "/^@set HOSTdecstation/s::@clear HOSTdecstation:" \ | |
282 | -e "/^@set HOSTiris/s::@clear HOSTiris:" \ | |
283 | -e "/^@clear HOSTrs6000/s::@set HOSTrs6000:" \ | |
284 | -e "/^@set FIXMES/s::@clear FIXMES:" \ | |
285 | -e "/\|\|RELNO\|\|/s::${relno}:g" \ | |
286 | -e "/\|\|TAPdflt\|\|/s::QIC-24:g" \ | |
287 | -e "/\|\|DEVdflt\|\|/s::/dev/rmt0.1:g" \ | |
288 | -e "/\|\|BD\|\|/s::36:g" \ | |
289 | -e "/\|\|SD\|\|/s::34:g" \ | |
290 | -e "/\|\|DF\|\|/s::70:g" \ | |
291 | -e "/\|\|HOST\|\|/s::RS/6000:g" \ | |
292 | -e "/\|\|HOSTstr\|\|/s::rs6000:g" \ | |
293 | -e "/\|\|TARGET\|\|/s::rs6000:g" \ | |
294 | -e "/\|\|GCCvn\|\|/s::cygnus-2.0.2:g" \ | |
295 | -e "/\|\|BUNDLE\|\|/s::${bundle}:g" \ | |
296 | < ${IN} > ${OUT}.new | |
297 | ||
298 | clean: | |
299 | rm -rf ${host} | |
300 | ||
301 | blockit: blockit.c | |
302 | ||
303 | ### EOF |