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