(gas-dg-test): Detect invalid values of `do_what'.
[deliverable/binutils-gdb.git] / build-all.mk
CommitLineData
87fa4c38 1# Build all of the targets for any given host.....
543cf4ac 2#
87fa4c38
KC
3# This file is going to be ugly. It will be VERY specific to the
4# Cygnus environment and build-process.
543cf4ac 5#
85195426
DE
6# Useful targets (rt = recursion target):
7# (please correct or expand on this)
8# FIXME: Might some of these be superfluous?
543cf4ac 9#
85195426
DE
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)
87fa4c38 18# build-latest - build all supported cross targets
85195426
DE
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)
44c1515d
DE
32# clean - remove objdir directories, stamp files
33# (rt = clean)
85195426
DE
34#
35# To configure/build for fewer targets, specify TARGETS="native cross1 ...".
36
543cf4ac 37TREE = devo
022f8f67 38include $(TREE)/release-info
543cf4ac 39
323f277f 40TEST_INSTALL_DISK = /abc
543cf4ac 41
022f8f67 42INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
543cf4ac 43
12eda620
ILT
44ifndef host
45host := $(shell $(TREE)/config.guess)
46endif
47
022f8f67
DZ
48NATIVE = native
49
b39958ad 50GCC = gcc
e87f9243 51CFLAGS = -g
b39958ad
JM
52GNUCFLAGS= -g -O2
53CXXFLAGS = -g -O2
9823504d 54MAKEINFOFLAGS =
543cf4ac
DZ
55
56log = 1>$(canonhost)-build-log 2>&1
0689f73a 57clog = 1>$(canonhost)-check-log 2>&1
f74859e4 58cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
39ad69d8 59latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1
f74859e4 60natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
543cf4ac
DZ
61
62canonhost := $(shell $(TREE)/config.sub $(host))
12eda620
ILT
63
64# Convert config.guess results to a simpler form.
89da237f
ILT
65ifeq ($(canonhost),sparc-sun-solaris2.1)
66canonhost := sparc-sun-solaris2
67endif
85195426
DE
68ifeq ($(canonhost),sparc-sun-solaris2.3)
69canonhost := sparc-sun-solaris2
70endif
12eda620
ILT
71ifeq ($(canonhost),mips-dec-ultrix4.2)
72canonhost := mips-dec-ultrix
73endif
74ifeq ($(canonhost),mips-sgi-irix4.0.1)
75canonhost := mips-sgi-irix4
76endif
85195426
DE
77ifeq ($(canonhost),mips-sgi-irix4.0.5H)
78canonhost := mips-sgi-irix4
79endif
175e702b
KC
80ifeq ($(canonhost),mips-sgi-irix5.2)
81canonhost := mips-sgi-irix5
82endif
db526bd7
ILT
83ifeq ($(canonhost),rs6000-ibm-aix3.2)
84canonhost := rs6000-ibm-aix
85endif
12eda620 86ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
21412832
ILT
87canonhost := i386-sco3.2v4
88endif
ec782faa
DZ
89ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
90canonhost := i386-sco3.2v4
91endif
08629ab8
DZ
92ifeq ($(canonhost),i386-unknown-sco3.2v4)
93canonhost := i386-sco3.2v4
94endif
60986901
ILT
95ifeq ($(canonhost),i386-unknown-go32)
96canonhost := i386-go32
97endif
89745e93
DZ
98ifeq ($(canonhost),i386-unknown-sysv4.2)
99canonhost := i386-sysv4.2
100endif
f358c814 101ifeq ($(canonhost),i386-lynx-lynxos)
8456a631 102canonhost := i386-lynx
f358c814
DZ
103endif
104ifeq ($(canonhost),m68k-lynx-lynxos)
8456a631 105canonhost := m68k-lynx
f358c814 106endif
c5a1c226
KC
107ifeq ($(canonhost),sparc-lynx-lynxos)
108canonhost := sparc-lynx
109endif
110ifeq ($(canonhost),rs6000-lynx-lynxos)
055cc3ff
KC
111canonhost := rs6000-lynx
112endif
b39958ad
JM
113ifeq ($(canonhost),i386-unknown-linux)
114canonhost := i386-linux
115endif
116ifeq ($(canonhost),i486-unknown-linux)
117canonhost := i486-linux
118endif
119ifeq ($(canonhost),i586-unknown-linux)
120canonhost := i486-linux
121endif
c55c62ed
JM
122ifeq ($(canonhost),i386-unknown-linuxaout)
123canonhost := i386-linuxaout
b39958ad 124endif
c55c62ed
JM
125ifeq ($(canonhost),i486-unknown-linuxaout)
126canonhost := i486-linuxaout
b39958ad 127endif
c55c62ed
JM
128ifeq ($(canonhost),i586-unknown-linuxaout)
129canonhost := i486-linuxaout
b39958ad 130endif
543cf4ac 131
e3f6f4cf
BC
132#
133# The following TARGETS variable settings probably ought to
134# be made automatically from the
135# /s1/cygnus/progressive/host-target-pairs.tbl file, using
136# the /s1/cygnus/progressive/targets script. But, be sure
137# that the native is spelled 'native'.
138#
139
32480238
DZ
140ifeq ($(canonhost),sparc-sun-sunos4.1.3)
141TARGETS = $(NATIVE) \
d5b2cb76 142 i386-go32 \
32480238 143 a29k-amd-udi \
d5b2cb76
DZ
144 h8300-hms \
145 i386-aout \
146 i386-lynx \
87fa4c38 147 i960-vxworks5.0 i960-vxworks5.1 \
055cc3ff 148 mips-idt-ecoff mips64-elf mips-elf \
32480238 149 m68k-aout m68k-vxworks m68k-coff \
d5b2cb76
DZ
150 m68k-lynx \
151 sh-hms \
055cc3ff 152 sparc-aout sparc-lynx sparc-vxworks \
d5b2cb76 153 sparclite-aout sparclite-vxworks \
e3f6f4cf 154 sparclite-coff z8k-coff \
06a8010d
BC
155 OSE68000 OSE68k mips-ncd-elf
156# The OSE68000 and OSE68k targets are for Ericsson only;
157# the mips-ncd-elf target is for NCD only.
a846e83d 158GCC = gcc -O2 -pipe
543cf4ac
DZ
159all: all-cygnus
160endif
161
162ifeq ($(canonhost),m68k-sun-sunos4.1.1)
32480238 163TARGETS = $(NATIVE) \
a4c50dd0 164 m68k-coff
a846e83d 165GCC = gcc -O2 -msoft-float
7cc2923a 166CC = cc -J
543cf4ac
DZ
167all: all-cygnus
168endif
169
170ifeq ($(canonhost),sparc-sun-solaris2)
32480238 171TARGETS = $(NATIVE) \
d5b2cb76 172 a29k-amd-udi \
87fa4c38 173 i960-vxworks5.0 i960-vxworks5.1 \
8456a631 174 m68k-aout m68k-coff m68k-vxworks \
87fa4c38 175 mipsel-idt-ecoff sparc-lynx \
e3f6f4cf
BC
176 sparclite-aout sparclite-coff m88k-coff z8k-coff \
177 OSE68000 OSE68k \
178 sparc-sun-sunos4.1.3
179# The latter assures that BNR's special build (which they now
180# do for themselves from sources) hasn't developed bit-rot.
181# The OSE68000 and OSE68k targets are for Ericsson only.
182
ac42799d 183CC = cc
a846e83d 184GCC = gcc -O2 -pipe
543cf4ac
DZ
185all: all-cygnus
186endif
187
188ifeq ($(canonhost),mips-dec-ultrix)
e110c2a8 189TARGETS = $(NATIVE) m68k-aout
872ff7ef 190CC = cc -Wf,-XNg1000
543cf4ac
DZ
191all: all-cygnus
192endif
193
b39958ad 194ifeq ($(patsubst alpha-dec-osf%,alpha,$(canonhost)),alpha)
87fa4c38
KC
195TARGETS = $(NATIVE)
196CC = cc
197all: all-cygnus
198endif
199
543cf4ac 200ifeq ($(canonhost),mips-sgi-irix4)
89745e93 201TARGETS = $(NATIVE) \
055cc3ff
KC
202 mips-idt-ecoff sh-hms \
203 mips64-elf
fea15001 204CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
543cf4ac
DZ
205all: all-cygnus
206endif
207
175e702b
KC
208ifeq ($(canonhost),mips-sgi-irix5)
209TARGETS = $(NATIVE) \
210 mips-idt-ecoff sh-hms \
211 mips64-elf
212CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
213all: all-cygnus
214endif
215
543cf4ac 216ifeq ($(canonhost),rs6000-ibm-aix)
32480238 217TARGETS = $(NATIVE) \
87fa4c38 218 i960-vxworks5.0 i960-vxworks5.1 \
a4c50dd0 219 m68k-aout
543cf4ac
DZ
220all: all-cygnus
221endif
222
223ifeq ($(canonhost),m68k-hp-hpux)
07be0634 224TARGETS = $(NATIVE) m68k-aout
e37dbf93 225TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
32480238
DZ
226CC = cc -Wp,-P
227#CFLAGS = +O1000
87fa4c38 228CFLAGS = -g
eb0293dc 229all: all-cygnus
543cf4ac
DZ
230endif
231
232ifeq ($(canonhost),hppa1.1-hp-hpux)
32480238 233TARGETS = \
d5b2cb76 234 $(NATIVE) \
87fa4c38
KC
235 i960-vxworks5.0 i960-vxworks5.1 \
236 m68k-aout m68k-coff m68k-vxworks \
237 z8k-coff
055cc3ff 238CC = cc -Wp,-H256000
32480238
DZ
239#CFLAGS = +Obb2000
240CFLAGS = -g
055cc3ff 241all: all-cygnus
543cf4ac
DZ
242endif
243
21412832
ILT
244ifeq ($(canonhost),i386-sco3.2v4)
245TARGETS = $(NATIVE) i386-aout
21412832
ILT
246all: all-cygnus
247endif
248
60986901 249ifeq ($(canonhost),i386-go32)
d5b2cb76 250TARGETS = \
32480238 251 a29k-amd-udi \
d5b2cb76
DZ
252 h8300-hms \
253 i386-aout \
32480238 254 m68k-aout m68k-coff \
d5b2cb76
DZ
255 mips-idt-ecoff \
256 sh-hms \
32480238 257 sparclite-aout
60986901 258CC = i386-go32-gcc
a846e83d 259GCC = i386-go32-gcc -O2
9823504d 260CFLAGS =
a846e83d 261CXXFLAGS = -O2
9823504d 262MAKEINFOFLAGS = --no-split
055cc3ff 263all: all-dos
60986901
ILT
264endif
265
7f82101d 266ifeq ($(canonhost),i386-sysv4.2)
a4c50dd0 267TARGETS = $(NATIVE) i386-netware
32480238
DZ
268CC = cc
269all: all-cygnus
270endif
271
8456a631 272ifeq ($(canonhost),i386-lynx)
f358c814 273TARGETS = $(NATIVE)
756b40d5 274CC = /usr/cygnus/progressive/bin/gcc
f358c814 275all: all-cygnus
fb682d69 276SHELL=/bin/bash
f358c814
DZ
277endif
278
8456a631 279ifeq ($(canonhost),m68k-lynx)
f358c814 280TARGETS = $(NATIVE)
756b40d5 281CC = /usr/cygnus/progressive/bin/gcc
f358c814 282all: all-cygnus
fb682d69 283SHELL=/bin/bash
f358c814
DZ
284endif
285
055cc3ff
KC
286ifeq ($(canonhost),sparc-lynx)
287TARGETS = $(NATIVE)
756b40d5 288CC = /usr/cygnus/progressive/bin/gcc
055cc3ff
KC
289all: all-cygnus
290SHELL=/bin/bash
291endif
292
293ifeq ($(canonhost),rs6000-lynx)
294TARGETS = $(NATIVE)
b5775df3 295CC = /usr/cygnus/progressive/bin/gcc
055cc3ff
KC
296all: all-cygnus
297SHELL=/bin/bash
298endif
299
c55c62ed 300ifeq ($(patsubst %-linux,linux,$(patsubst %-linuxaout,linux,$(canonhost))),linux)
b39958ad
JM
301TARGETS = $(NATIVE)
302all: all-cygnus
303endif
304
543cf4ac
DZ
305FLAGS_TO_PASS := \
306 "GCC=$(GCC)" \
7cc2923a 307 "CC=$(CC)" \
543cf4ac 308 "CFLAGS=$(CFLAGS)" \
b39958ad 309 "GNUCFLAGS=$(GNUCFLAGS)" \
e87f9243 310 "CXXFLAGS=$(CXXFLAGS)" \
12eda620 311 "host=$(canonhost)" \
9823504d 312 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
fb682d69
ME
313 "RELEASE_TAG=$(RELEASE_TAG)" \
314 "SHELL=$(SHELL)"
543cf4ac 315
7ae68194 316# set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
87fa4c38 317ifeq ($(patsubst %-lynx,lynx,$(canonhost)),lynx)
7ae68194
ME
318FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
319endif
320
c55c62ed 321ifeq ($(patsubst %-linux,linux,$(patsubst %-linuxaout,linux,$(canonhost))),linux)
b39958ad
JM
322FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)"
323endif
324
57dfb584
DZ
325all-emacs:
326 @echo build started at `date`
327 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
f358c814 328 -rm -f $(ROOTING)/$(RELEASE_TAG)
022f8f67 329 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
08629ab8
DZ
330 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
331 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
57dfb584
DZ
332 @echo done at `date`
333
543cf4ac
DZ
334all-cygnus:
335 @echo build started at `date`
336 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
c262769a 337 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
c5a1c226 338#
87fa4c38
KC
339# The following line to be used during regular progressive builds
340# to help developers test, but should be commented out for final
341# progressive build.
c5a1c226 342#
87fa4c38 343# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
543cf4ac
DZ
344 @for i in $(TARGETS) ; do \
345 if [ "$$i" = "native" ] ; then \
75217b36 346 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
543cf4ac 347 echo "3staging $(canonhost) native" ; \
87fa4c38 348 echo Flags passed to make: $(FLAGS_TO_PASS) ; \
21412832 349 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
543cf4ac 350 echo " completed successfully" ; \
75217b36
ILT
351 else \
352 true ; \
1900e815 353 fi ; \
543cf4ac
DZ
354 else \
355 echo "building $(canonhost) cross to $$i" ; \
f74859e4 356 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
543cf4ac
DZ
357 echo " completed successfully" ; \
358 fi ; \
359 done
0689f73a
ME
360 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
361 echo checking $(canonhost) native ; \
362 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
363 touch $(canonhost)-stamp-3stage-checked ; \
364 else \
365 true ; \
366 fi
543cf4ac
DZ
367 @echo done at `date`
368
c676f606
DZ
369native:
370 @echo build started at `date`
371 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
c5a1c226
KC
372 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
373# -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
21412832 374 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
c676f606
DZ
375 @echo done at `date`
376
5ba00487
DZ
377build-cygnus:
378 @echo build started at `date`
379 @for i in $(TARGETS) ; do \
380 if [ "$$i" = "native" ] ; then \
381 if [ ! -f $(canonhost)-3stage-done ] ; then \
382 echo "3staging $(canonhost) native" ; \
21412832 383 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
5ba00487 384 echo " completed successfully" ; \
1900e815 385 fi ; \
5ba00487 386 else \
13ec8aad 387 echo "building $(canonhost) cross to $$i:" `date` ; \
f74859e4 388 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
5ba00487
DZ
389 echo " completed successfully" ; \
390 fi ; \
391 done
392 @echo done at `date`
393
39ad69d8
DZ
394build-latest:
395 @echo build started at `date`
396 @for i in $(TARGETS) ; do \
397 if [ "$$i" != "native" ] ; then \
398 echo "building $(canonhost) cross to $$i:" `date` ; \
399 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
400 echo " completed successfully" ; \
401 fi ; \
402 done
403 @echo done at `date`
404
543cf4ac
DZ
405all-native:
406 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
407 rm -f $(ROOTING)/$(RELEASE_TAG)
408 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
543cf4ac
DZ
409 @for i in $(TARGETS) ; do \
410 echo "building $(canonhost) cross to $$i" ; \
f74859e4 411 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
543cf4ac
DZ
412 echo " completed successfully" ; \
413 done
414
60986901
ILT
415all-cross:
416 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
a9377e86
ILT
417 rm -f $(ROOTING)/$(RELEASE_TAG)
418 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
60986901
ILT
419 @for i in $(TARGETS) ; do \
420 echo "building $(canonhost) cross to $$i" ; \
f74859e4 421 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
60986901
ILT
422 echo " completed successfully" ; \
423 done
424
8456a631
KC
425do-dos:
426 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
427all-dos:
428 @for i in $(TARGETS) ; do \
429 echo "building $(canonhost) cross to $$i" ; \
055cc3ff 430 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \
8456a631
KC
431 echo " completed successfully at `date`" ; \
432 done
433
543cf4ac
DZ
434config:
435 @for i in $(TARGETS) ; do \
436 if [ "$$i" = "native" ] ; then \
437 echo "config stage1 for $(canonhost)" ; \
438 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
439 echo " completed successfully" ; \
440 else \
441 echo "config $(canonhost) cross to $$i" ; \
f74859e4 442 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
543cf4ac
DZ
443 echo " completed successfully" ; \
444 fi ; \
445 done
446
447
448build:
449 @for i in $(TARGETS) ; do \
450 if [ "$$i" = "native" ] ; then \
451 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
452 echo " completed successfully" ; \
453 else \
454 echo "building $(canonhost) cross to $$i" ; \
c262769a 455 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
543cf4ac
DZ
456 echo " completed successfully" ; \
457 fi ; \
458 done
459
460
4613build:
462 @for i in $(TARGETS) ; do \
463 if [ "$$i" = "native" ] ; then \
464 echo "building 3stage for $(canonhost)" ; \
465 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
466 echo " completed successfully" ; \
467 else \
468 echo "building $(canonhost) cross to $$i" ; \
f74859e4 469 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
543cf4ac
DZ
470 echo " completed successfully" ; \
471 fi ; \
472 done
473
87c6c079
DZ
474build-all-latest:
475 @for i in $(TARGETS) ; do \
476 if [ "$$i" = "native" ] ; then \
477 echo "building 3stage for $(canonhost)" ; \
478 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
479 echo " completed successfully" ; \
480 else \
481 echo "building $(canonhost) cross to $$i" ; \
482 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
483 echo " completed successfully" ; \
484 fi ; \
485 done
486
44c1515d
DE
487clean:
488 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)
489
543cf4ac
DZ
490### Local Variables:
491### fill-column: 131
492### End:
This page took 0.157377 seconds and 4 git commands to generate.