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