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