remove sh-hms from hppa
[binutils-gdb.git] / build-all.mk
1 # Build all of the targets for any given host.....
2 #
3 # This file is going to be ugly. It will be VERY specific to the
4 # Cygnus environment and build-process.
5 #
6 #
7
8 TREE = devo
9 include $(TREE)/release-info
10
11 TEST_INSTALL_DISK = /tug
12
13 INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
14
15 ifndef host
16 host := $(shell $(TREE)/config.guess)
17 endif
18
19 NATIVE = native
20
21 GCC = gcc -O
22 CFLAGS = -g
23 CXXFLAGS = -g -O
24 MAKEINFOFLAGS =
25
26 log = 1>$(canonhost)-build-log 2>&1
27 clog = 1>$(canonhost)-check-log 2>&1
28 cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
29 latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1
30 natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
31
32 canonhost := $(shell $(TREE)/config.sub $(host))
33
34 # Convert config.guess results to a simpler form.
35 ifeq ($(canonhost),sparc-sun-solaris2.1)
36 canonhost := sparc-sun-solaris2
37 endif
38 ifeq ($(canonhost),mips-dec-ultrix4.2)
39 canonhost := mips-dec-ultrix
40 endif
41 ifeq ($(canonhost),mips-sgi-irix4.0.1)
42 canonhost := mips-sgi-irix4
43 endif
44 ifeq ($(canonhost),rs6000-ibm-aix3.2)
45 canonhost := rs6000-ibm-aix
46 endif
47 ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
48 canonhost := i386-sco3.2v4
49 endif
50 ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
51 canonhost := i386-sco3.2v4
52 endif
53 ifeq ($(canonhost),i386-unknown-sco3.2v4)
54 canonhost := i386-sco3.2v4
55 endif
56 ifeq ($(canonhost),i386-unknown-go32)
57 canonhost := i386-go32
58 endif
59 ifeq ($(canonhost),i386-unknown-sysv4.2)
60 canonhost := i386-sysv4.2
61 endif
62 ifeq ($(canonhost),i386-lynx-lynxos)
63 canonhost := i386-lynxos
64 endif
65 ifeq ($(canonhost),m68k-lynx-lynxos)
66 canonhost := m68k-lynxos
67 endif
68
69 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
70 TARGETS = $(NATIVE) \
71 i386-go32 \
72 a29k-amd-udi \
73 h8300-hms \
74 i386-aout \
75 i386-lynx \
76 i386-netware \
77 i960-vxworks i960-intel-nindy \
78 mips-idt-ecoff \
79 m68k-aout m68k-vxworks m68k-coff \
80 m68k-lynx \
81 sh-hms \
82 sparc-aout sparc-vxworks \
83 sparclite-aout sparclite-vxworks \
84 z8k-coff
85 GCC = gcc -O -pipe
86 all: all-cygnus
87 endif
88
89 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
90 TARGETS = $(NATIVE) \
91 m68k-aout m68k-coff i960-intel-nindy
92 GCC = gcc -O -msoft-float
93 CC = cc -J
94 all: all-cygnus
95 endif
96
97 ifeq ($(canonhost),sparc-sun-solaris2)
98 TARGETS = $(NATIVE) \
99 a29k-amd-udi \
100 i386-aout \
101 i960-vxworks i960-intel-nindy \
102 m68k-aout m68k-coff m68k-vxworks \
103 m88k-coff \
104 mips-idt-ecoff mipsel-idt-ecoff \
105 sparc-aout sparc-vxworks sparclite-aout
106 CC = cc -Xs
107 GCC = gcc -O -pipe
108 all: all-cygnus
109 endif
110
111 ifeq ($(canonhost),mips-dec-ultrix)
112 TARGETS = $(NATIVE) m68k-aout
113 CC = cc -Wf,-XNg1000
114 all: all-cygnus
115 endif
116
117 ifeq ($(canonhost),mips-sgi-irix4)
118 TARGETS = $(NATIVE) \
119 mips-idt-ecoff sh-hms
120 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
121 all: all-cygnus
122 endif
123
124 ifeq ($(canonhost),rs6000-ibm-aix)
125 TARGETS = $(NATIVE) \
126 i960-vxworks i960-intel-nindy \
127 m68k-vxworks
128 all: all-cygnus
129 endif
130
131 ifeq ($(canonhost),m68k-hp-hpux)
132 TARGETS = $(NATIVE) m68k-aout
133 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
134 CC = cc -Wp,-P
135 #CFLAGS = +O1000
136 CFLAGS =
137 all: all-cygnus
138 endif
139
140 ifeq ($(canonhost),hppa1.1-hp-hpux)
141 TARGETS = \
142 $(NATIVE) \
143 i960-vxworks \
144 m68k-aout m68k-vxworks
145 CC = cc
146 #CFLAGS = +Obb2000
147 CFLAGS = -g
148 all: all-native
149 endif
150
151 ifeq ($(canonhost),i386-sco3.2v4)
152 TARGETS = $(NATIVE) i386-aout
153 all: all-cygnus
154 endif
155
156 ifeq ($(canonhost),i386-go32)
157 TARGETS = \
158 a29k-amd-udi \
159 h8300-hms \
160 i386-aout \
161 m68k-aout m68k-coff \
162 mips-idt-ecoff \
163 sh-hms \
164 sparclite-aout
165 CC = i386-go32-gcc
166 GCC = i386-go32-gcc -O
167 CFLAGS =
168 CXXFLAGS = -O
169 MAKEINFOFLAGS = --no-split
170 all: all-cross
171 endif
172
173 ifeq ($(canonhost),i386-sysv4.2)
174 TARGETS = $(NATIVE)
175 CC = cc
176 all: all-cygnus
177 endif
178
179 ifeq ($(canonhost),i386-lynxos)
180 TARGETS = $(NATIVE)
181 CC = /bin/gcc
182 all: all-cygnus
183 SHELL=/bin/bash
184 endif
185
186 ifeq ($(canonhost),m68k-lynxos)
187 TARGETS = $(NATIVE)
188 CC = /bin/gcc
189 all: all-cygnus
190 SHELL=/bin/bash
191 endif
192
193
194 FLAGS_TO_PASS := \
195 "GCC=$(GCC)" \
196 "CC=$(CC)" \
197 "CFLAGS=$(CFLAGS)" \
198 "CXXFLAGS=$(CXXFLAGS)" \
199 "host=$(canonhost)" \
200 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
201 "RELEASE_TAG=$(RELEASE_TAG)" \
202 "SHELL=$(SHELL)"
203
204 all-emacs:
205 @echo build started at `date`
206 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
207 -rm -f $(ROOTING)/$(RELEASE_TAG)
208 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
209 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
210 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
211 @echo done at `date`
212
213 all-cygnus:
214 @echo build started at `date`
215 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
216 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
217 @for i in $(TARGETS) ; do \
218 if [ "$$i" = "native" ] ; then \
219 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
220 echo "3staging $(canonhost) native" ; \
221 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
222 echo " completed successfully" ; \
223 else \
224 true ; \
225 fi ; \
226 else \
227 echo "building $(canonhost) cross to $$i" ; \
228 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
229 echo " completed successfully" ; \
230 fi ; \
231 done
232 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
233 echo checking $(canonhost) native ; \
234 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
235 touch $(canonhost)-stamp-3stage-checked ; \
236 else \
237 true ; \
238 fi
239 @echo done at `date`
240
241 native:
242 @echo build started at `date`
243 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
244 rm -f $(ROOTING)/$(RELEASE_TAG)
245 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
246 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
247 @echo done at `date`
248
249 build-cygnus:
250 @echo build started at `date`
251 @for i in $(TARGETS) ; do \
252 if [ "$$i" = "native" ] ; then \
253 if [ ! -f $(canonhost)-3stage-done ] ; then \
254 echo "3staging $(canonhost) native" ; \
255 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
256 echo " completed successfully" ; \
257 fi ; \
258 else \
259 echo "building $(canonhost) cross to $$i:" `date` ; \
260 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
261 echo " completed successfully" ; \
262 fi ; \
263 done
264 @echo done at `date`
265
266 build-latest:
267 @echo build started at `date`
268 @for i in $(TARGETS) ; do \
269 if [ "$$i" != "native" ] ; then \
270 echo "building $(canonhost) cross to $$i:" `date` ; \
271 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
272 echo " completed successfully" ; \
273 fi ; \
274 done
275 @echo done at `date`
276
277 all-native:
278 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
279 rm -f $(ROOTING)/$(RELEASE_TAG)
280 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
281 @for i in $(TARGETS) ; do \
282 echo "building $(canonhost) cross to $$i" ; \
283 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
284 echo " completed successfully" ; \
285 done
286
287 all-cross:
288 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
289 rm -f $(ROOTING)/$(RELEASE_TAG)
290 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
291 @for i in $(TARGETS) ; do \
292 echo "building $(canonhost) cross to $$i" ; \
293 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
294 echo " completed successfully" ; \
295 done
296
297 config:
298 @for i in $(TARGETS) ; do \
299 if [ "$$i" = "native" ] ; then \
300 echo "config stage1 for $(canonhost)" ; \
301 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
302 echo " completed successfully" ; \
303 else \
304 echo "config $(canonhost) cross to $$i" ; \
305 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
306 echo " completed successfully" ; \
307 fi ; \
308 done
309
310
311 build:
312 @for i in $(TARGETS) ; do \
313 if [ "$$i" = "native" ] ; then \
314 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
315 echo " completed successfully" ; \
316 else \
317 echo "building $(canonhost) cross to $$i" ; \
318 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
319 echo " completed successfully" ; \
320 fi ; \
321 done
322
323
324 3build:
325 @for i in $(TARGETS) ; do \
326 if [ "$$i" = "native" ] ; then \
327 echo "building 3stage for $(canonhost)" ; \
328 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
329 echo " completed successfully" ; \
330 else \
331 echo "building $(canonhost) cross to $$i" ; \
332 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
333 echo " completed successfully" ; \
334 fi ; \
335 done
336
337 build-all-latest:
338 @for i in $(TARGETS) ; do \
339 if [ "$$i" = "native" ] ; then \
340 echo "building 3stage for $(canonhost)" ; \
341 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
342 echo " completed successfully" ; \
343 else \
344 echo "building $(canonhost) cross to $$i" ; \
345 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
346 echo " completed successfully" ; \
347 fi ; \
348 done
349
350 ### Local Variables:
351 ### fill-column: 131
352 ### End: