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 | |
8456a631 | 40 | TEST_INSTALL_DISK = /tug |
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 |
543cf4ac | 103 | |
32480238 DZ |
104 | ifeq ($(canonhost),sparc-sun-sunos4.1.3) |
105 | TARGETS = $(NATIVE) \ | |
d5b2cb76 | 106 | i386-go32 \ |
32480238 | 107 | a29k-amd-udi \ |
d5b2cb76 DZ |
108 | h8300-hms \ |
109 | i386-aout \ | |
110 | i386-lynx \ | |
8456a631 | 111 | i960-vxworks \ |
32480238 DZ |
112 | mips-idt-ecoff \ |
113 | m68k-aout m68k-vxworks m68k-coff \ | |
d5b2cb76 DZ |
114 | m68k-lynx \ |
115 | sh-hms \ | |
116 | sparc-aout sparc-vxworks \ | |
117 | sparclite-aout sparclite-vxworks \ | |
8456a631 | 118 | sparclite-coff z8k-coff |
32480238 | 119 | GCC = gcc -O -pipe |
543cf4ac DZ |
120 | all: all-cygnus |
121 | endif | |
122 | ||
123 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
32480238 | 124 | TARGETS = $(NATIVE) \ |
a4c50dd0 | 125 | m68k-coff |
e37dbf93 | 126 | GCC = gcc -O -msoft-float |
7cc2923a | 127 | CC = cc -J |
543cf4ac DZ |
128 | all: all-cygnus |
129 | endif | |
130 | ||
131 | ifeq ($(canonhost),sparc-sun-solaris2) | |
32480238 | 132 | TARGETS = $(NATIVE) \ |
d5b2cb76 | 133 | a29k-amd-udi \ |
a4c50dd0 | 134 | i960-vxworks \ |
8456a631 KC |
135 | m68k-aout m68k-coff m68k-vxworks \ |
136 | m88k-coff \ | |
a4c50dd0 KC |
137 | mipsel-idt-ecoff \ |
138 | sparclite-aout | |
6d98b3d2 | 139 | CC = cc -Xs |
32480238 | 140 | GCC = gcc -O -pipe |
543cf4ac DZ |
141 | all: all-cygnus |
142 | endif | |
143 | ||
144 | ifeq ($(canonhost),mips-dec-ultrix) | |
e110c2a8 | 145 | TARGETS = $(NATIVE) m68k-aout |
872ff7ef | 146 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
147 | all: all-cygnus |
148 | endif | |
149 | ||
150 | ifeq ($(canonhost),mips-sgi-irix4) | |
89745e93 DZ |
151 | TARGETS = $(NATIVE) \ |
152 | mips-idt-ecoff sh-hms | |
fea15001 | 153 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000 |
543cf4ac DZ |
154 | all: all-cygnus |
155 | endif | |
156 | ||
157 | ifeq ($(canonhost),rs6000-ibm-aix) | |
32480238 | 158 | TARGETS = $(NATIVE) \ |
a4c50dd0 KC |
159 | i960-vxworks \ |
160 | m68k-aout | |
543cf4ac DZ |
161 | all: all-cygnus |
162 | endif | |
163 | ||
164 | ifeq ($(canonhost),m68k-hp-hpux) | |
07be0634 | 165 | TARGETS = $(NATIVE) m68k-aout |
e37dbf93 | 166 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
32480238 DZ |
167 | CC = cc -Wp,-P |
168 | #CFLAGS = +O1000 | |
c262769a | 169 | CFLAGS = |
eb0293dc | 170 | all: all-cygnus |
543cf4ac DZ |
171 | endif |
172 | ||
173 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
32480238 | 174 | TARGETS = \ |
d5b2cb76 | 175 | $(NATIVE) \ |
32480238 | 176 | i960-vxworks \ |
d5b2cb76 | 177 | m68k-aout m68k-vxworks |
32480238 DZ |
178 | CC = cc |
179 | #CFLAGS = +Obb2000 | |
180 | CFLAGS = -g | |
26de3d0c | 181 | all: all-native |
543cf4ac DZ |
182 | endif |
183 | ||
21412832 ILT |
184 | ifeq ($(canonhost),i386-sco3.2v4) |
185 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
186 | all: all-cygnus |
187 | endif | |
188 | ||
60986901 | 189 | ifeq ($(canonhost),i386-go32) |
d5b2cb76 | 190 | TARGETS = \ |
32480238 | 191 | a29k-amd-udi \ |
d5b2cb76 DZ |
192 | h8300-hms \ |
193 | i386-aout \ | |
32480238 | 194 | m68k-aout m68k-coff \ |
d5b2cb76 DZ |
195 | mips-idt-ecoff \ |
196 | sh-hms \ | |
32480238 | 197 | sparclite-aout |
60986901 ILT |
198 | CC = i386-go32-gcc |
199 | GCC = i386-go32-gcc -O | |
9823504d ILT |
200 | CFLAGS = |
201 | CXXFLAGS = -O | |
202 | MAKEINFOFLAGS = --no-split | |
60986901 ILT |
203 | all: all-cross |
204 | endif | |
205 | ||
7f82101d | 206 | ifeq ($(canonhost),i386-sysv4.2) |
a4c50dd0 | 207 | TARGETS = $(NATIVE) i386-netware |
32480238 DZ |
208 | CC = cc |
209 | all: all-cygnus | |
210 | endif | |
211 | ||
8456a631 | 212 | ifeq ($(canonhost),i386-lynx) |
f358c814 DZ |
213 | TARGETS = $(NATIVE) |
214 | CC = /bin/gcc | |
215 | all: all-cygnus | |
fb682d69 | 216 | SHELL=/bin/bash |
f358c814 DZ |
217 | endif |
218 | ||
8456a631 | 219 | ifeq ($(canonhost),m68k-lynx) |
f358c814 DZ |
220 | TARGETS = $(NATIVE) |
221 | CC = /bin/gcc | |
222 | all: all-cygnus | |
fb682d69 | 223 | SHELL=/bin/bash |
f358c814 DZ |
224 | endif |
225 | ||
543cf4ac DZ |
226 | FLAGS_TO_PASS := \ |
227 | "GCC=$(GCC)" \ | |
7cc2923a | 228 | "CC=$(CC)" \ |
543cf4ac | 229 | "CFLAGS=$(CFLAGS)" \ |
e87f9243 | 230 | "CXXFLAGS=$(CXXFLAGS)" \ |
12eda620 | 231 | "host=$(canonhost)" \ |
9823504d | 232 | "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \ |
fb682d69 ME |
233 | "RELEASE_TAG=$(RELEASE_TAG)" \ |
234 | "SHELL=$(SHELL)" | |
543cf4ac | 235 | |
7ae68194 ME |
236 | # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds |
237 | ifeq ($(patsubst %-lynxos,lynxos,$(canonhost)),lynxos) | |
238 | FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash" | |
239 | endif | |
240 | ||
57dfb584 DZ |
241 | all-emacs: |
242 | @echo build started at `date` | |
243 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
f358c814 | 244 | -rm -f $(ROOTING)/$(RELEASE_TAG) |
022f8f67 | 245 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) |
08629ab8 DZ |
246 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1 |
247 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1 | |
57dfb584 DZ |
248 | @echo done at `date` |
249 | ||
543cf4ac DZ |
250 | all-cygnus: |
251 | @echo build started at `date` | |
252 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
c262769a | 253 | -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) |
543cf4ac DZ |
254 | @for i in $(TARGETS) ; do \ |
255 | if [ "$$i" = "native" ] ; then \ | |
75217b36 | 256 | if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \ |
543cf4ac | 257 | echo "3staging $(canonhost) native" ; \ |
21412832 | 258 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac | 259 | echo " completed successfully" ; \ |
75217b36 ILT |
260 | else \ |
261 | true ; \ | |
1900e815 | 262 | fi ; \ |
543cf4ac DZ |
263 | else \ |
264 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 265 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \ |
543cf4ac DZ |
266 | echo " completed successfully" ; \ |
267 | fi ; \ | |
268 | done | |
0689f73a ME |
269 | @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \ |
270 | echo checking $(canonhost) native ; \ | |
271 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \ | |
272 | touch $(canonhost)-stamp-3stage-checked ; \ | |
273 | else \ | |
274 | true ; \ | |
275 | fi | |
543cf4ac DZ |
276 | @echo done at `date` |
277 | ||
c676f606 DZ |
278 | native: |
279 | @echo build started at `date` | |
280 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
281 | rm -f $(ROOTING)/$(RELEASE_TAG) |
282 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
21412832 | 283 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
284 | @echo done at `date` |
285 | ||
5ba00487 DZ |
286 | build-cygnus: |
287 | @echo build started at `date` | |
288 | @for i in $(TARGETS) ; do \ | |
289 | if [ "$$i" = "native" ] ; then \ | |
290 | if [ ! -f $(canonhost)-3stage-done ] ; then \ | |
291 | echo "3staging $(canonhost) native" ; \ | |
21412832 | 292 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 | 293 | echo " completed successfully" ; \ |
1900e815 | 294 | fi ; \ |
5ba00487 | 295 | else \ |
13ec8aad | 296 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
f74859e4 | 297 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
5ba00487 DZ |
298 | echo " completed successfully" ; \ |
299 | fi ; \ | |
300 | done | |
301 | @echo done at `date` | |
302 | ||
39ad69d8 DZ |
303 | build-latest: |
304 | @echo build started at `date` | |
305 | @for i in $(TARGETS) ; do \ | |
306 | if [ "$$i" != "native" ] ; then \ | |
307 | echo "building $(canonhost) cross to $$i:" `date` ; \ | |
308 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \ | |
309 | echo " completed successfully" ; \ | |
310 | fi ; \ | |
311 | done | |
312 | @echo done at `date` | |
313 | ||
543cf4ac DZ |
314 | all-native: |
315 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
316 | rm -f $(ROOTING)/$(RELEASE_TAG) |
317 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
318 | @for i in $(TARGETS) ; do \ |
319 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 320 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \ |
543cf4ac DZ |
321 | echo " completed successfully" ; \ |
322 | done | |
323 | ||
60986901 ILT |
324 | all-cross: |
325 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
a9377e86 ILT |
326 | rm -f $(ROOTING)/$(RELEASE_TAG) |
327 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
60986901 ILT |
328 | @for i in $(TARGETS) ; do \ |
329 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 330 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \ |
60986901 ILT |
331 | echo " completed successfully" ; \ |
332 | done | |
333 | ||
8456a631 KC |
334 | do-dos: |
335 | $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos | |
336 | all-dos: | |
337 | @for i in $(TARGETS) ; do \ | |
338 | echo "building $(canonhost) cross to $$i" ; \ | |
339 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $ | |
340 | (cyglog) && \ | |
341 | echo " completed successfully at `date`" ; \ | |
342 | done | |
343 | ||
543cf4ac DZ |
344 | config: |
345 | @for i in $(TARGETS) ; do \ | |
346 | if [ "$$i" = "native" ] ; then \ | |
347 | echo "config stage1 for $(canonhost)" ; \ | |
348 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \ | |
349 | echo " completed successfully" ; \ | |
350 | else \ | |
351 | echo "config $(canonhost) cross to $$i" ; \ | |
f74859e4 | 352 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \ |
543cf4ac DZ |
353 | echo " completed successfully" ; \ |
354 | fi ; \ | |
355 | done | |
356 | ||
357 | ||
358 | build: | |
359 | @for i in $(TARGETS) ; do \ | |
360 | if [ "$$i" = "native" ] ; then \ | |
361 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \ | |
362 | echo " completed successfully" ; \ | |
363 | else \ | |
364 | echo "building $(canonhost) cross to $$i" ; \ | |
c262769a | 365 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \ |
543cf4ac DZ |
366 | echo " completed successfully" ; \ |
367 | fi ; \ | |
368 | done | |
369 | ||
370 | ||
371 | 3build: | |
372 | @for i in $(TARGETS) ; do \ | |
373 | if [ "$$i" = "native" ] ; then \ | |
374 | echo "building 3stage for $(canonhost)" ; \ | |
375 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \ | |
376 | echo " completed successfully" ; \ | |
377 | else \ | |
378 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 379 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
543cf4ac DZ |
380 | echo " completed successfully" ; \ |
381 | fi ; \ | |
382 | done | |
383 | ||
87c6c079 DZ |
384 | build-all-latest: |
385 | @for i in $(TARGETS) ; do \ | |
386 | if [ "$$i" = "native" ] ; then \ | |
387 | echo "building 3stage for $(canonhost)" ; \ | |
388 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ | |
389 | echo " completed successfully" ; \ | |
390 | else \ | |
391 | echo "building $(canonhost) cross to $$i" ; \ | |
392 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \ | |
393 | echo " completed successfully" ; \ | |
394 | fi ; \ | |
395 | done | |
396 | ||
44c1515d DE |
397 | clean: |
398 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log) | |
399 | ||
543cf4ac DZ |
400 | ### Local Variables: |
401 | ### fill-column: 131 | |
402 | ### End: |