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