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