]>
Commit | Line | Data |
---|---|---|
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 | # | |
85195426 DE |
6 | # Useful targets (rt = recursion target): |
7 | # (please correct or expand on this) | |
8 | # FIXME: Might some of these be superfluous? | |
543cf4ac | 9 | # |
85195426 DE |
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) | |
44c1515d DE |
32 | # clean - remove objdir directories, stamp files |
33 | # (rt = clean) | |
85195426 DE |
34 | # |
35 | # To configure/build for fewer targets, specify TARGETS="native cross1 ...". | |
36 | ||
543cf4ac | 37 | TREE = devo |
022f8f67 | 38 | include $(TREE)/release-info |
543cf4ac | 39 | |
055cc3ff | 40 | TEST_INSTALL_DISK = /galt |
543cf4ac | 41 | |
022f8f67 | 42 | INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG) |
543cf4ac | 43 | |
12eda620 ILT |
44 | ifndef host |
45 | host := $(shell $(TREE)/config.guess) | |
46 | endif | |
47 | ||
022f8f67 DZ |
48 | NATIVE = native |
49 | ||
e87f9243 ILT |
50 | GCC = gcc -O |
51 | CFLAGS = -g | |
52 | CXXFLAGS = -g -O | |
9823504d | 53 | MAKEINFOFLAGS = |
543cf4ac DZ |
54 | |
55 | log = 1>$(canonhost)-build-log 2>&1 | |
0689f73a | 56 | clog = 1>$(canonhost)-check-log 2>&1 |
f74859e4 | 57 | cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1 |
39ad69d8 | 58 | latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1 |
f74859e4 | 59 | natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1 |
543cf4ac DZ |
60 | |
61 | canonhost := $(shell $(TREE)/config.sub $(host)) | |
12eda620 ILT |
62 | |
63 | # Convert config.guess results to a simpler form. | |
89da237f ILT |
64 | ifeq ($(canonhost),sparc-sun-solaris2.1) |
65 | canonhost := sparc-sun-solaris2 | |
66 | endif | |
85195426 DE |
67 | ifeq ($(canonhost),sparc-sun-solaris2.3) |
68 | canonhost := sparc-sun-solaris2 | |
69 | endif | |
12eda620 ILT |
70 | ifeq ($(canonhost),mips-dec-ultrix4.2) |
71 | canonhost := mips-dec-ultrix | |
72 | endif | |
73 | ifeq ($(canonhost),mips-sgi-irix4.0.1) | |
74 | canonhost := mips-sgi-irix4 | |
75 | endif | |
85195426 DE |
76 | ifeq ($(canonhost),mips-sgi-irix4.0.5H) |
77 | canonhost := mips-sgi-irix4 | |
78 | endif | |
db526bd7 ILT |
79 | ifeq ($(canonhost),rs6000-ibm-aix3.2) |
80 | canonhost := rs6000-ibm-aix | |
81 | endif | |
12eda620 | 82 | ifeq ($(canonhost),i486-unknown-sco3.2v4.0) |
21412832 ILT |
83 | canonhost := i386-sco3.2v4 |
84 | endif | |
ec782faa DZ |
85 | ifeq ($(canonhost),i386-unknown-sco3.2v4.0) |
86 | canonhost := i386-sco3.2v4 | |
87 | endif | |
08629ab8 DZ |
88 | ifeq ($(canonhost),i386-unknown-sco3.2v4) |
89 | canonhost := i386-sco3.2v4 | |
90 | endif | |
60986901 ILT |
91 | ifeq ($(canonhost),i386-unknown-go32) |
92 | canonhost := i386-go32 | |
93 | endif | |
89745e93 DZ |
94 | ifeq ($(canonhost),i386-unknown-sysv4.2) |
95 | canonhost := i386-sysv4.2 | |
96 | endif | |
f358c814 | 97 | ifeq ($(canonhost),i386-lynx-lynxos) |
8456a631 | 98 | canonhost := i386-lynx |
f358c814 DZ |
99 | endif |
100 | ifeq ($(canonhost),m68k-lynx-lynxos) | |
8456a631 | 101 | canonhost := m68k-lynx |
f358c814 | 102 | endif |
055cc3ff KC |
103 | ifeq ($(canonhost),rs6000-lynx-lynxos2.2.2) |
104 | canonhost := rs6000-lynx | |
105 | endif | |
543cf4ac | 106 | |
32480238 DZ |
107 | ifeq ($(canonhost),sparc-sun-sunos4.1.3) |
108 | TARGETS = $(NATIVE) \ | |
d5b2cb76 | 109 | i386-go32 \ |
32480238 | 110 | a29k-amd-udi \ |
d5b2cb76 DZ |
111 | h8300-hms \ |
112 | i386-aout \ | |
113 | i386-lynx \ | |
8456a631 | 114 | i960-vxworks \ |
055cc3ff | 115 | mips-idt-ecoff mips64-elf mips-elf \ |
32480238 | 116 | m68k-aout m68k-vxworks m68k-coff \ |
d5b2cb76 DZ |
117 | m68k-lynx \ |
118 | sh-hms \ | |
055cc3ff | 119 | sparc-aout sparc-lynx sparc-vxworks \ |
d5b2cb76 | 120 | sparclite-aout sparclite-vxworks \ |
8456a631 | 121 | sparclite-coff z8k-coff |
32480238 | 122 | GCC = gcc -O -pipe |
543cf4ac DZ |
123 | all: all-cygnus |
124 | endif | |
125 | ||
126 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
32480238 | 127 | TARGETS = $(NATIVE) \ |
a4c50dd0 | 128 | m68k-coff |
e37dbf93 | 129 | GCC = gcc -O -msoft-float |
7cc2923a | 130 | CC = cc -J |
543cf4ac DZ |
131 | all: all-cygnus |
132 | endif | |
133 | ||
134 | ifeq ($(canonhost),sparc-sun-solaris2) | |
32480238 | 135 | TARGETS = $(NATIVE) \ |
d5b2cb76 | 136 | a29k-amd-udi \ |
a4c50dd0 | 137 | i960-vxworks \ |
8456a631 KC |
138 | m68k-aout m68k-coff m68k-vxworks \ |
139 | m88k-coff \ | |
055cc3ff | 140 | mipsel-idt-ecoff sparc-lynx |
6d98b3d2 | 141 | CC = cc -Xs |
32480238 | 142 | GCC = gcc -O -pipe |
543cf4ac DZ |
143 | all: all-cygnus |
144 | endif | |
145 | ||
146 | ifeq ($(canonhost),mips-dec-ultrix) | |
e110c2a8 | 147 | TARGETS = $(NATIVE) m68k-aout |
872ff7ef | 148 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
149 | all: all-cygnus |
150 | endif | |
151 | ||
152 | ifeq ($(canonhost),mips-sgi-irix4) | |
89745e93 | 153 | TARGETS = $(NATIVE) \ |
055cc3ff KC |
154 | mips-idt-ecoff sh-hms \ |
155 | mips64-elf | |
fea15001 | 156 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 |
543cf4ac DZ |
157 | all: all-cygnus |
158 | endif | |
159 | ||
160 | ifeq ($(canonhost),rs6000-ibm-aix) | |
32480238 | 161 | TARGETS = $(NATIVE) \ |
a4c50dd0 KC |
162 | i960-vxworks \ |
163 | m68k-aout | |
543cf4ac DZ |
164 | all: all-cygnus |
165 | endif | |
166 | ||
167 | ifeq ($(canonhost),m68k-hp-hpux) | |
07be0634 | 168 | TARGETS = $(NATIVE) m68k-aout |
e37dbf93 | 169 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
32480238 DZ |
170 | CC = cc -Wp,-P |
171 | #CFLAGS = +O1000 | |
c262769a | 172 | CFLAGS = |
eb0293dc | 173 | all: all-cygnus |
543cf4ac DZ |
174 | endif |
175 | ||
176 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
32480238 | 177 | TARGETS = \ |
d5b2cb76 | 178 | $(NATIVE) \ |
32480238 | 179 | i960-vxworks \ |
d5b2cb76 | 180 | m68k-aout m68k-vxworks |
055cc3ff | 181 | CC = cc -Wp,-H256000 |
32480238 DZ |
182 | #CFLAGS = +Obb2000 |
183 | CFLAGS = -g | |
055cc3ff | 184 | all: all-cygnus |
543cf4ac DZ |
185 | endif |
186 | ||
21412832 ILT |
187 | ifeq ($(canonhost),i386-sco3.2v4) |
188 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
189 | all: all-cygnus |
190 | endif | |
191 | ||
60986901 | 192 | ifeq ($(canonhost),i386-go32) |
d5b2cb76 | 193 | TARGETS = \ |
32480238 | 194 | a29k-amd-udi \ |
d5b2cb76 DZ |
195 | h8300-hms \ |
196 | i386-aout \ | |
32480238 | 197 | m68k-aout m68k-coff \ |
d5b2cb76 DZ |
198 | mips-idt-ecoff \ |
199 | sh-hms \ | |
32480238 | 200 | sparclite-aout |
60986901 ILT |
201 | CC = i386-go32-gcc |
202 | GCC = i386-go32-gcc -O | |
9823504d ILT |
203 | CFLAGS = |
204 | CXXFLAGS = -O | |
205 | MAKEINFOFLAGS = --no-split | |
055cc3ff | 206 | all: all-dos |
60986901 ILT |
207 | endif |
208 | ||
7f82101d | 209 | ifeq ($(canonhost),i386-sysv4.2) |
a4c50dd0 | 210 | TARGETS = $(NATIVE) i386-netware |
32480238 DZ |
211 | CC = cc |
212 | all: all-cygnus | |
213 | endif | |
214 | ||
8456a631 | 215 | ifeq ($(canonhost),i386-lynx) |
f358c814 DZ |
216 | TARGETS = $(NATIVE) |
217 | CC = /bin/gcc | |
218 | all: all-cygnus | |
fb682d69 | 219 | SHELL=/bin/bash |
f358c814 DZ |
220 | endif |
221 | ||
8456a631 | 222 | ifeq ($(canonhost),m68k-lynx) |
f358c814 DZ |
223 | TARGETS = $(NATIVE) |
224 | CC = /bin/gcc | |
225 | all: all-cygnus | |
fb682d69 | 226 | SHELL=/bin/bash |
f358c814 DZ |
227 | endif |
228 | ||
055cc3ff KC |
229 | ifeq ($(canonhost),sparc-lynx) |
230 | TARGETS = $(NATIVE) | |
231 | CC = /bin/gcc | |
232 | all: all-cygnus | |
233 | SHELL=/bin/bash | |
234 | endif | |
235 | ||
236 | ifeq ($(canonhost),rs6000-lynx) | |
237 | TARGETS = $(NATIVE) | |
b5775df3 | 238 | CC = /usr/cygnus/progressive/bin/gcc |
055cc3ff KC |
239 | all: all-cygnus |
240 | SHELL=/bin/bash | |
241 | endif | |
242 | ||
543cf4ac DZ |
243 | FLAGS_TO_PASS := \ |
244 | "GCC=$(GCC)" \ | |
7cc2923a | 245 | "CC=$(CC)" \ |
543cf4ac | 246 | "CFLAGS=$(CFLAGS)" \ |
e87f9243 | 247 | "CXXFLAGS=$(CXXFLAGS)" \ |
12eda620 | 248 | "host=$(canonhost)" \ |
9823504d | 249 | "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ |
fb682d69 ME |
250 | "RELEASE_TAG=$(RELEASE_TAG)" \ |
251 | "SHELL=$(SHELL)" | |
543cf4ac | 252 | |
7ae68194 ME |
253 | # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds |
254 | ifeq ($(patsubst %-lynxos,lynxos,$(canonhost)),lynxos) | |
255 | FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash" | |
256 | endif | |
257 | ||
57dfb584 DZ |
258 | all-emacs: |
259 | @echo build started at `date` | |
260 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
f358c814 | 261 | -rm -f $(ROOTING)/$(RELEASE_TAG) |
022f8f67 | 262 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) |
08629ab8 DZ |
263 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1 |
264 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1 | |
57dfb584 DZ |
265 | @echo done at `date` |
266 | ||
543cf4ac DZ |
267 | all-cygnus: |
268 | @echo build started at `date` | |
269 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
c262769a | 270 | -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) |
543cf4ac DZ |
271 | @for i in $(TARGETS) ; do \ |
272 | if [ "$$i" = "native" ] ; then \ | |
75217b36 | 273 | if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \ |
543cf4ac | 274 | echo "3staging $(canonhost) native" ; \ |
21412832 | 275 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac | 276 | echo " completed successfully" ; \ |
75217b36 ILT |
277 | else \ |
278 | true ; \ | |
1900e815 | 279 | fi ; \ |
543cf4ac DZ |
280 | else \ |
281 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 282 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \ |
543cf4ac DZ |
283 | echo " completed successfully" ; \ |
284 | fi ; \ | |
285 | done | |
0689f73a ME |
286 | @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \ |
287 | echo checking $(canonhost) native ; \ | |
288 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \ | |
289 | touch $(canonhost)-stamp-3stage-checked ; \ | |
290 | else \ | |
291 | true ; \ | |
292 | fi | |
543cf4ac DZ |
293 | @echo done at `date` |
294 | ||
c676f606 DZ |
295 | native: |
296 | @echo build started at `date` | |
297 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
298 | rm -f $(ROOTING)/$(RELEASE_TAG) |
299 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
21412832 | 300 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
301 | @echo done at `date` |
302 | ||
5ba00487 DZ |
303 | build-cygnus: |
304 | @echo build started at `date` | |
305 | @for i in $(TARGETS) ; do \ | |
306 | if [ "$$i" = "native" ] ; then \ | |
307 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
308 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 309 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 | 310 | echo " completed successfully" ; \ |
1900e815 | 311 | fi ; \ |
5ba00487 | 312 | else \ |
13ec8aad | 313 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
f74859e4 | 314 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
5ba00487 DZ |
315 | echo " completed successfully" ; \ |
316 | fi ; \ | |
317 | done | |
318 | @echo done at `date` | |
319 | ||
39ad69d8 DZ |
320 | build-latest: |
321 | @echo build started at `date` | |
322 | @for i in $(TARGETS) ; do \ | |
323 | if [ "$$i" != "native" ] ; then \ | |
324 | echo "building $(canonhost) cross to $$i:" `date` ; \ | |
325 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \ | |
326 | echo " completed successfully" ; \ | |
327 | fi ; \ | |
328 | done | |
329 | @echo done at `date` | |
330 | ||
543cf4ac DZ |
331 | all-native: |
332 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
333 | rm -f $(ROOTING)/$(RELEASE_TAG) |
334 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
335 | @for i in $(TARGETS) ; do \ |
336 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 337 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \ |
543cf4ac DZ |
338 | echo " completed successfully" ; \ |
339 | done | |
340 | ||
60986901 ILT |
341 | all-cross: |
342 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
a9377e86 ILT |
343 | rm -f $(ROOTING)/$(RELEASE_TAG) |
344 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
60986901 ILT |
345 | @for i in $(TARGETS) ; do \ |
346 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 347 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \ |
60986901 ILT |
348 | echo " completed successfully" ; \ |
349 | done | |
350 | ||
8456a631 KC |
351 | do-dos: |
352 | $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos | |
353 | all-dos: | |
354 | @for i in $(TARGETS) ; do \ | |
355 | echo "building $(canonhost) cross to $$i" ; \ | |
055cc3ff | 356 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \ |
8456a631 KC |
357 | echo " completed successfully at `date`" ; \ |
358 | done | |
359 | ||
543cf4ac DZ |
360 | config: |
361 | @for i in $(TARGETS) ; do \ | |
362 | if [ "$$i" = "native" ] ; then \ | |
363 | echo "config stage1 for $(canonhost)" ; \ | |
364 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \ | |
365 | echo " completed successfully" ; \ | |
366 | else \ | |
367 | echo "config $(canonhost) cross to $$i" ; \ | |
f74859e4 | 368 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \ |
543cf4ac DZ |
369 | echo " completed successfully" ; \ |
370 | fi ; \ | |
371 | done | |
372 | ||
373 | ||
374 | build: | |
375 | @for i in $(TARGETS) ; do \ | |
376 | if [ "$$i" = "native" ] ; then \ | |
377 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \ | |
378 | echo " completed successfully" ; \ | |
379 | else \ | |
380 | echo "building $(canonhost) cross to $$i" ; \ | |
c262769a | 381 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \ |
543cf4ac DZ |
382 | echo " completed successfully" ; \ |
383 | fi ; \ | |
384 | done | |
385 | ||
386 | ||
387 | 3build: | |
388 | @for i in $(TARGETS) ; do \ | |
389 | if [ "$$i" = "native" ] ; then \ | |
390 | echo "building 3stage for $(canonhost)" ; \ | |
391 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \ | |
392 | echo " completed successfully" ; \ | |
393 | else \ | |
394 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 395 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
543cf4ac DZ |
396 | echo " completed successfully" ; \ |
397 | fi ; \ | |
398 | done | |
399 | ||
87c6c079 DZ |
400 | build-all-latest: |
401 | @for i in $(TARGETS) ; do \ | |
402 | if [ "$$i" = "native" ] ; then \ | |
403 | echo "building 3stage for $(canonhost)" ; \ | |
404 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ | |
405 | echo " completed successfully" ; \ | |
406 | else \ | |
407 | echo "building $(canonhost) cross to $$i" ; \ | |
408 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \ | |
409 | echo " completed successfully" ; \ | |
410 | fi ; \ | |
411 | done | |
412 | ||
44c1515d DE |
413 | clean: |
414 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log) | |
415 | ||
543cf4ac DZ |
416 | ### Local Variables: |
417 | ### fill-column: 131 | |
418 | ### End: |