* Makefile.in: Fix bit-rot in definitions of CHILL,
[deliverable/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 # Useful targets (rt = recursion target):
7 # (please correct or expand on this)
8 # FIXME: Might some of these be superfluous?
9 #
10 # all-emacs
11 # all-cygnus - set up install directories, build 3stage native and all
12 # supported cross targets, then check 3stage'd native
13 # (rt = $(canonhost)-stamp-3stage-done, do-cygnus for cross)
14 # native - set up install directories, build 3stage native
15 # (rt = $(canonhost)-stamp-3stage-1)
16 # build-cygnus - build 3stage native and all supported cross targets
17 # (rt = $(canonhost)-stamp-3stage-done, build-cygnus for cross)
18 # build-latest - build native and all supported cross targets
19 # (rt = build-latest)
20 # all-native - set up install directories, build native
21 # (rt = do-native)
22 # all-cross - set up install directories, build all targets
23 # (rt = do-cygnus)
24 # config - configure native and all supported cross targets
25 # (rt = do1-config, do-native-config for cross)
26 # build - build native and all supported cross targets
27 # (rt = do1-build, build-native for cross)
28 # 3build - build 3stage native and all supported cross targets
29 # (rt = all, build-cygnus for cross)
30 # build-all-latest - build 3stage native and all supported cross targets
31 # (rt = $(canonhost)-stamp-3stage-done, build-latest for cross)
32 # clean - remove objdir directories, stamp files
33 # (rt = clean)
34 #
35 # To configure/build for fewer targets, specify TARGETS="native cross1 ...".
36
37 TREE = devo
38 include $(TREE)/release-info
39
40 TEST_INSTALL_DISK = /tug
41
42 INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
43
44 ifndef host
45 host := $(shell $(TREE)/config.guess)
46 endif
47
48 NATIVE = native
49
50 GCC = gcc -O
51 CFLAGS = -g
52 CXXFLAGS = -g -O
53 MAKEINFOFLAGS =
54
55 log = 1>$(canonhost)-build-log 2>&1
56 clog = 1>$(canonhost)-check-log 2>&1
57 cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
58 latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1
59 natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
60
61 canonhost := $(shell $(TREE)/config.sub $(host))
62
63 # Convert config.guess results to a simpler form.
64 ifeq ($(canonhost),sparc-sun-solaris2.1)
65 canonhost := sparc-sun-solaris2
66 endif
67 ifeq ($(canonhost),sparc-sun-solaris2.3)
68 canonhost := sparc-sun-solaris2
69 endif
70 ifeq ($(canonhost),mips-dec-ultrix4.2)
71 canonhost := mips-dec-ultrix
72 endif
73 ifeq ($(canonhost),mips-sgi-irix4.0.1)
74 canonhost := mips-sgi-irix4
75 endif
76 ifeq ($(canonhost),mips-sgi-irix4.0.5H)
77 canonhost := mips-sgi-irix4
78 endif
79 ifeq ($(canonhost),rs6000-ibm-aix3.2)
80 canonhost := rs6000-ibm-aix
81 endif
82 ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
83 canonhost := i386-sco3.2v4
84 endif
85 ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
86 canonhost := i386-sco3.2v4
87 endif
88 ifeq ($(canonhost),i386-unknown-sco3.2v4)
89 canonhost := i386-sco3.2v4
90 endif
91 ifeq ($(canonhost),i386-unknown-go32)
92 canonhost := i386-go32
93 endif
94 ifeq ($(canonhost),i386-unknown-sysv4.2)
95 canonhost := i386-sysv4.2
96 endif
97 ifeq ($(canonhost),i386-lynx-lynxos)
98 canonhost := i386-lynx
99 endif
100 ifeq ($(canonhost),m68k-lynx-lynxos)
101 canonhost := m68k-lynx
102 endif
103
104 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
105 TARGETS = $(NATIVE) \
106 i386-go32 \
107 a29k-amd-udi \
108 h8300-hms \
109 i386-aout \
110 i386-lynx \
111 i960-vxworks \
112 mips-idt-ecoff \
113 m68k-aout m68k-vxworks m68k-coff \
114 m68k-lynx \
115 sh-hms \
116 sparc-aout sparc-vxworks \
117 sparclite-aout sparclite-vxworks \
118 sparclite-coff z8k-coff
119 GCC = gcc -O -pipe
120 all: all-cygnus
121 endif
122
123 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
124 TARGETS = $(NATIVE) \
125 m68k-coff
126 GCC = gcc -O -msoft-float
127 CC = cc -J
128 all: all-cygnus
129 endif
130
131 ifeq ($(canonhost),sparc-sun-solaris2)
132 TARGETS = $(NATIVE) \
133 a29k-amd-udi \
134 i960-vxworks \
135 m68k-aout m68k-coff m68k-vxworks \
136 m88k-coff \
137 mipsel-idt-ecoff \
138 sparclite-aout
139 CC = cc -Xs
140 GCC = gcc -O -pipe
141 all: all-cygnus
142 endif
143
144 ifeq ($(canonhost),mips-dec-ultrix)
145 TARGETS = $(NATIVE) m68k-aout
146 CC = cc -Wf,-XNg1000
147 all: all-cygnus
148 endif
149
150 ifeq ($(canonhost),mips-sgi-irix4)
151 TARGETS = $(NATIVE) \
152 mips-idt-ecoff sh-hms
153 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
154 all: all-cygnus
155 endif
156
157 ifeq ($(canonhost),rs6000-ibm-aix)
158 TARGETS = $(NATIVE) \
159 i960-vxworks \
160 m68k-aout
161 all: all-cygnus
162 endif
163
164 ifeq ($(canonhost),m68k-hp-hpux)
165 TARGETS = $(NATIVE) m68k-aout
166 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
167 CC = cc -Wp,-P
168 #CFLAGS = +O1000
169 CFLAGS =
170 all: all-cygnus
171 endif
172
173 ifeq ($(canonhost),hppa1.1-hp-hpux)
174 TARGETS = \
175 $(NATIVE) \
176 i960-vxworks \
177 m68k-aout m68k-vxworks
178 CC = cc
179 #CFLAGS = +Obb2000
180 CFLAGS = -g
181 all: all-native
182 endif
183
184 ifeq ($(canonhost),i386-sco3.2v4)
185 TARGETS = $(NATIVE) i386-aout
186 all: all-cygnus
187 endif
188
189 ifeq ($(canonhost),i386-go32)
190 TARGETS = \
191 a29k-amd-udi \
192 h8300-hms \
193 i386-aout \
194 m68k-aout m68k-coff \
195 mips-idt-ecoff \
196 sh-hms \
197 sparclite-aout
198 CC = i386-go32-gcc
199 GCC = i386-go32-gcc -O
200 CFLAGS =
201 CXXFLAGS = -O
202 MAKEINFOFLAGS = --no-split
203 all: all-cross
204 endif
205
206 ifeq ($(canonhost),i386-sysv4.2)
207 TARGETS = $(NATIVE) i386-netware
208 CC = cc
209 all: all-cygnus
210 endif
211
212 ifeq ($(canonhost),i386-lynx)
213 TARGETS = $(NATIVE)
214 CC = /bin/gcc
215 all: all-cygnus
216 SHELL=/bin/bash
217 endif
218
219 ifeq ($(canonhost),m68k-lynx)
220 TARGETS = $(NATIVE)
221 CC = /bin/gcc
222 all: all-cygnus
223 SHELL=/bin/bash
224 endif
225
226 FLAGS_TO_PASS := \
227 "GCC=$(GCC)" \
228 "CC=$(CC)" \
229 "CFLAGS=$(CFLAGS)" \
230 "CXXFLAGS=$(CXXFLAGS)" \
231 "host=$(canonhost)" \
232 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
233 "RELEASE_TAG=$(RELEASE_TAG)" \
234 "SHELL=$(SHELL)"
235
236 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
237 ifeq ($(patsubst %-lynxos,lynxos,$(canonhost)),lynxos)
238 FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
239 endif
240
241 all-emacs:
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) do1 > $(canonhost)-emacs-native-log 2>&1
247 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
248 @echo done at `date`
249
250 all-cygnus:
251 @echo build started at `date`
252 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
253 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
254 @for i in $(TARGETS) ; do \
255 if [ "$$i" = "native" ] ; then \
256 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
257 echo "3staging $(canonhost) native" ; \
258 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
259 echo " completed successfully" ; \
260 else \
261 true ; \
262 fi ; \
263 else \
264 echo "building $(canonhost) cross to $$i" ; \
265 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
266 echo " completed successfully" ; \
267 fi ; \
268 done
269 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
270 echo checking $(canonhost) native ; \
271 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
272 touch $(canonhost)-stamp-3stage-checked ; \
273 else \
274 true ; \
275 fi
276 @echo done at `date`
277
278 native:
279 @echo build started at `date`
280 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
281 rm -f $(ROOTING)/$(RELEASE_TAG)
282 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
283 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
284 @echo done at `date`
285
286 build-cygnus:
287 @echo build started at `date`
288 @for i in $(TARGETS) ; do \
289 if [ "$$i" = "native" ] ; then \
290 if [ ! -f $(canonhost)-3stage-done ] ; then \
291 echo "3staging $(canonhost) native" ; \
292 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
293 echo " completed successfully" ; \
294 fi ; \
295 else \
296 echo "building $(canonhost) cross to $$i:" `date` ; \
297 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
298 echo " completed successfully" ; \
299 fi ; \
300 done
301 @echo done at `date`
302
303 build-latest:
304 @echo build started at `date`
305 @for i in $(TARGETS) ; do \
306 if [ "$$i" != "native" ] ; then \
307 echo "building $(canonhost) cross to $$i:" `date` ; \
308 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
309 echo " completed successfully" ; \
310 fi ; \
311 done
312 @echo done at `date`
313
314 all-native:
315 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
316 rm -f $(ROOTING)/$(RELEASE_TAG)
317 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
318 @for i in $(TARGETS) ; do \
319 echo "building $(canonhost) cross to $$i" ; \
320 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
321 echo " completed successfully" ; \
322 done
323
324 all-cross:
325 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
326 rm -f $(ROOTING)/$(RELEASE_TAG)
327 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
328 @for i in $(TARGETS) ; do \
329 echo "building $(canonhost) cross to $$i" ; \
330 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
331 echo " completed successfully" ; \
332 done
333
334 do-dos:
335 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
336 all-dos:
337 @for i in $(TARGETS) ; do \
338 echo "building $(canonhost) cross to $$i" ; \
339 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $
340 (cyglog) && \
341 echo " completed successfully at `date`" ; \
342 done
343
344 config:
345 @for i in $(TARGETS) ; do \
346 if [ "$$i" = "native" ] ; then \
347 echo "config stage1 for $(canonhost)" ; \
348 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
349 echo " completed successfully" ; \
350 else \
351 echo "config $(canonhost) cross to $$i" ; \
352 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
353 echo " completed successfully" ; \
354 fi ; \
355 done
356
357
358 build:
359 @for i in $(TARGETS) ; do \
360 if [ "$$i" = "native" ] ; then \
361 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
362 echo " completed successfully" ; \
363 else \
364 echo "building $(canonhost) cross to $$i" ; \
365 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
366 echo " completed successfully" ; \
367 fi ; \
368 done
369
370
371 3build:
372 @for i in $(TARGETS) ; do \
373 if [ "$$i" = "native" ] ; then \
374 echo "building 3stage for $(canonhost)" ; \
375 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
376 echo " completed successfully" ; \
377 else \
378 echo "building $(canonhost) cross to $$i" ; \
379 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
380 echo " completed successfully" ; \
381 fi ; \
382 done
383
384 build-all-latest:
385 @for i in $(TARGETS) ; do \
386 if [ "$$i" = "native" ] ; then \
387 echo "building 3stage for $(canonhost)" ; \
388 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
389 echo " completed successfully" ; \
390 else \
391 echo "building $(canonhost) cross to $$i" ; \
392 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
393 echo " completed successfully" ; \
394 fi ; \
395 done
396
397 clean:
398 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)
399
400 ### Local Variables:
401 ### fill-column: 131
402 ### End:
This page took 0.048446 seconds and 4 git commands to generate.