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