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