update from FSF
[deliverable/binutils-gdb.git] / build-all.mk
CommitLineData
543cf4ac
DZ
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
543cf4ac 8TREE = devo
022f8f67 9include $(TREE)/release-info
543cf4ac 10
32480238 11TEST_INSTALL_DISK = /big
543cf4ac 12
022f8f67 13INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
543cf4ac 14
12eda620
ILT
15ifndef host
16host := $(shell $(TREE)/config.guess)
17endif
18
022f8f67
DZ
19NATIVE = native
20
e87f9243
ILT
21GCC = gcc -O
22CFLAGS = -g
23CXXFLAGS = -g -O
9823504d 24MAKEINFOFLAGS =
543cf4ac
DZ
25
26log = 1>$(canonhost)-build-log 2>&1
f74859e4
DZ
27cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
28natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
543cf4ac
DZ
29
30canonhost := $(shell $(TREE)/config.sub $(host))
12eda620
ILT
31
32# Convert config.guess results to a simpler form.
89da237f
ILT
33ifeq ($(canonhost),sparc-sun-solaris2.1)
34canonhost := sparc-sun-solaris2
35endif
12eda620
ILT
36ifeq ($(canonhost),mips-dec-ultrix4.2)
37canonhost := mips-dec-ultrix
38endif
39ifeq ($(canonhost),mips-sgi-irix4.0.1)
40canonhost := mips-sgi-irix4
41endif
db526bd7
ILT
42ifeq ($(canonhost),rs6000-ibm-aix3.2)
43canonhost := rs6000-ibm-aix
44endif
12eda620 45ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
21412832
ILT
46canonhost := i386-sco3.2v4
47endif
ec782faa
DZ
48ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
49canonhost := i386-sco3.2v4
50endif
08629ab8
DZ
51ifeq ($(canonhost),i386-unknown-sco3.2v4)
52canonhost := i386-sco3.2v4
53endif
60986901
ILT
54ifeq ($(canonhost),i386-unknown-go32)
55canonhost := i386-go32
56endif
f358c814
DZ
57ifeq ($(canonhost),i386-lynx-lynxos)
58canonhost := i386-lynxos
59endif
60ifeq ($(canonhost),m68k-lynx-lynxos)
61canonhost := m68k-lynxos
62endif
543cf4ac 63
32480238
DZ
64ifeq ($(canonhost),sparc-sun-sunos4.1.3)
65TARGETS = $(NATIVE) \
66 a29k-amd-udi \
67 h8300-hms h8500-hms \
68 i386-aout i386-go32 i386-coff \
07be0634 69 i960-intel-nindy i960-vxworks \
32480238
DZ
70 mips-idt-ecoff \
71 m68k-aout m68k-vxworks m68k-coff \
72 m88k-coff \
54278e28 73 sh-hms \
07be0634
DZ
74 sparc-aout sparc-vxworks sparclite-aout \
75 z8k-sim z8k-coff
32480238 76GCC = gcc -O -pipe
543cf4ac
DZ
77all: all-cygnus
78endif
79
80ifeq ($(canonhost),m68k-sun-sunos4.1.1)
32480238
DZ
81TARGETS = $(NATIVE) \
82 i960-intel-nindy \
07be0634 83 m68k-aout m68k-vxworks m68k-coff
e37dbf93 84GCC = gcc -O -msoft-float
7cc2923a 85CC = cc -J
543cf4ac
DZ
86all: all-cygnus
87endif
88
89ifeq ($(canonhost),sparc-sun-solaris2)
32480238
DZ
90TARGETS = $(NATIVE) \
91 a29k-amd-udi \
32480238
DZ
92 i386-aout \
93 i960-vxworks i960-intel-nindy \
07be0634
DZ
94 m68k-aout m68k-coff m68k-vxworks \
95 mips-idt-ecoff \
32480238 96 sparc-aout sparc-vxworks sparclite-aout
6d98b3d2 97CC = cc -Xs
32480238 98GCC = gcc -O -pipe
543cf4ac
DZ
99all: all-cygnus
100endif
101
102ifeq ($(canonhost),mips-dec-ultrix)
e110c2a8 103TARGETS = $(NATIVE) m68k-aout
872ff7ef 104CC = cc -Wf,-XNg1000
543cf4ac
DZ
105all: all-cygnus
106endif
107
108ifeq ($(canonhost),mips-sgi-irix4)
f358c814 109TARGETS = $(NATIVE) sh-hms
4cb66853 110CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
543cf4ac
DZ
111all: all-cygnus
112endif
113
114ifeq ($(canonhost),rs6000-ibm-aix)
32480238
DZ
115TARGETS = $(NATIVE) \
116 i960-vxworks i960-intel-nindy \
117 m68k-aout m68k-vxworks
543cf4ac
DZ
118all: all-cygnus
119endif
120
121ifeq ($(canonhost),m68k-hp-hpux)
07be0634 122TARGETS = $(NATIVE) m68k-aout
e37dbf93 123TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
32480238
DZ
124CC = cc -Wp,-P
125#CFLAGS = +O1000
126CFLAGS = -g
eb0293dc 127all: all-cygnus
543cf4ac
DZ
128endif
129
130ifeq ($(canonhost),hppa1.1-hp-hpux)
32480238
DZ
131TARGETS = \
132 i960-vxworks \
133 m68k-aout m68k-vxworks
134# a29k-amd-udi \
135# h8300-hms h8500-hms \
136# i386-aout i386-go32 \
137# i960-vxworks i960-intel-nindy \
138# mips-idt-ecoff \
139# m68k-aout m68k-vxworks m68k-coff \
140# m88k-coff \
141# sparc-aout sparclite-aout \
142# z8k-sim
143CC = cc
144#CFLAGS = +Obb2000
145CFLAGS = -g
26de3d0c 146all: all-native
543cf4ac
DZ
147endif
148
21412832
ILT
149ifeq ($(canonhost),i386-sco3.2v4)
150TARGETS = $(NATIVE) i386-aout
21412832
ILT
151all: all-cygnus
152endif
153
60986901 154ifeq ($(canonhost),i386-go32)
32480238
DZ
155TARGETS = \
156 a29k-amd-udi \
07be0634 157 h8300-hms h8500-hms \
32480238
DZ
158 i386-aout \
159 m68k-aout m68k-coff \
160 mips-idt-ecoff \
07be0634 161 sh-hms \
32480238 162 sparclite-aout
60986901
ILT
163CC = i386-go32-gcc
164GCC = i386-go32-gcc -O
9823504d
ILT
165CFLAGS =
166CXXFLAGS = -O
167MAKEINFOFLAGS = --no-split
60986901
ILT
168all: all-cross
169endif
170
9805e2a6 171ifeq ($(canonhost),i386-univel-sysv4.2)
32480238
DZ
172TARGETS = $(NATIVE)
173CC = cc
174all: all-cygnus
175endif
176
f358c814
DZ
177ifeq ($(canonhost),i386-lynxos)
178TARGETS = $(NATIVE)
179CC = /bin/gcc
180all: all-cygnus
181endif
182
183ifeq ($(canonhost),m68k-lynxos)
184TARGETS = $(NATIVE)
185CC = /bin/gcc
186all: all-cygnus
187endif
188
189
543cf4ac
DZ
190FLAGS_TO_PASS := \
191 "GCC=$(GCC)" \
7cc2923a 192 "CC=$(CC)" \
543cf4ac 193 "CFLAGS=$(CFLAGS)" \
e87f9243 194 "CXXFLAGS=$(CXXFLAGS)" \
12eda620 195 "host=$(canonhost)" \
9823504d 196 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
022f8f67 197 "RELEASE_TAG=$(RELEASE_TAG)"
543cf4ac 198
57dfb584
DZ
199all-emacs:
200 @echo build started at `date`
201 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
f358c814 202 -rm -f $(ROOTING)/$(RELEASE_TAG)
022f8f67 203 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
08629ab8
DZ
204 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
205 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
57dfb584
DZ
206 @echo done at `date`
207
543cf4ac
DZ
208all-cygnus:
209 @echo build started at `date`
210 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
211 rm -f $(ROOTING)/$(RELEASE_TAG)
212 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
543cf4ac
DZ
213 @for i in $(TARGETS) ; do \
214 if [ "$$i" = "native" ] ; then \
75217b36 215 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
543cf4ac 216 echo "3staging $(canonhost) native" ; \
21412832 217 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
543cf4ac 218 echo " completed successfully" ; \
75217b36
ILT
219 else \
220 true ; \
543cf4ac
DZ
221 fi \
222 else \
223 echo "building $(canonhost) cross to $$i" ; \
f74859e4 224 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
543cf4ac
DZ
225 echo " completed successfully" ; \
226 fi ; \
227 done
228 @echo done at `date`
229
c676f606
DZ
230native:
231 @echo build started at `date`
232 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
233 rm -f $(ROOTING)/$(RELEASE_TAG)
234 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
21412832 235 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
c676f606
DZ
236 @echo done at `date`
237
5ba00487
DZ
238build-cygnus:
239 @echo build started at `date`
240 @for i in $(TARGETS) ; do \
241 if [ "$$i" = "native" ] ; then \
242 if [ ! -f $(canonhost)-3stage-done ] ; then \
243 echo "3staging $(canonhost) native" ; \
21412832 244 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
5ba00487
DZ
245 echo " completed successfully" ; \
246 fi \
247 else \
13ec8aad 248 echo "building $(canonhost) cross to $$i:" `date` ; \
f74859e4 249 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
5ba00487
DZ
250 echo " completed successfully" ; \
251 fi ; \
252 done
253 @echo done at `date`
254
543cf4ac
DZ
255all-native:
256 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
022f8f67
DZ
257 rm -f $(ROOTING)/$(RELEASE_TAG)
258 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
543cf4ac
DZ
259 @for i in $(TARGETS) ; do \
260 echo "building $(canonhost) cross to $$i" ; \
f74859e4 261 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
543cf4ac
DZ
262 echo " completed successfully" ; \
263 done
264
60986901
ILT
265all-cross:
266 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
a9377e86
ILT
267 rm -f $(ROOTING)/$(RELEASE_TAG)
268 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
60986901
ILT
269 @for i in $(TARGETS) ; do \
270 echo "building $(canonhost) cross to $$i" ; \
f74859e4 271 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
60986901
ILT
272 echo " completed successfully" ; \
273 done
274
543cf4ac
DZ
275config:
276 @for i in $(TARGETS) ; do \
277 if [ "$$i" = "native" ] ; then \
278 echo "config stage1 for $(canonhost)" ; \
279 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
280 echo " completed successfully" ; \
281 else \
282 echo "config $(canonhost) cross to $$i" ; \
f74859e4 283 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
543cf4ac
DZ
284 echo " completed successfully" ; \
285 fi ; \
286 done
287
288
289build:
290 @for i in $(TARGETS) ; do \
291 if [ "$$i" = "native" ] ; then \
292 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
293 echo " completed successfully" ; \
294 else \
295 echo "building $(canonhost) cross to $$i" ; \
f74859e4 296 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(cyglog) && \
543cf4ac
DZ
297 echo " completed successfully" ; \
298 fi ; \
299 done
300
301
3023build:
303 @for i in $(TARGETS) ; do \
304 if [ "$$i" = "native" ] ; then \
305 echo "building 3stage for $(canonhost)" ; \
306 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
307 echo " completed successfully" ; \
308 else \
309 echo "building $(canonhost) cross to $$i" ; \
f74859e4 310 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
543cf4ac
DZ
311 echo " completed successfully" ; \
312 fi ; \
313 done
314
543cf4ac
DZ
315### Local Variables:
316### fill-column: 131
317### End:
This page took 0.059836 seconds and 4 git commands to generate.