]>
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 | |
f74859e4 | 27 | cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1 |
39ad69d8 | 28 | latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1 |
f74859e4 | 29 | natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1 |
543cf4ac DZ |
30 | |
31 | canonhost := $(shell $(TREE)/config.sub $(host)) | |
12eda620 ILT |
32 | |
33 | # Convert config.guess results to a simpler form. | |
89da237f ILT |
34 | ifeq ($(canonhost),sparc-sun-solaris2.1) |
35 | canonhost := sparc-sun-solaris2 | |
36 | endif | |
12eda620 ILT |
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 | |
db526bd7 ILT |
43 | ifeq ($(canonhost),rs6000-ibm-aix3.2) |
44 | canonhost := rs6000-ibm-aix | |
45 | endif | |
12eda620 | 46 | ifeq ($(canonhost),i486-unknown-sco3.2v4.0) |
21412832 ILT |
47 | canonhost := i386-sco3.2v4 |
48 | endif | |
ec782faa DZ |
49 | ifeq ($(canonhost),i386-unknown-sco3.2v4.0) |
50 | canonhost := i386-sco3.2v4 | |
51 | endif | |
08629ab8 DZ |
52 | ifeq ($(canonhost),i386-unknown-sco3.2v4) |
53 | canonhost := i386-sco3.2v4 | |
54 | endif | |
60986901 ILT |
55 | ifeq ($(canonhost),i386-unknown-go32) |
56 | canonhost := i386-go32 | |
57 | endif | |
89745e93 DZ |
58 | ifeq ($(canonhost),i386-unknown-sysv4.2) |
59 | canonhost := i386-sysv4.2 | |
60 | endif | |
f358c814 DZ |
61 | ifeq ($(canonhost),i386-lynx-lynxos) |
62 | canonhost := i386-lynxos | |
63 | endif | |
64 | ifeq ($(canonhost),m68k-lynx-lynxos) | |
65 | canonhost := m68k-lynxos | |
66 | endif | |
543cf4ac | 67 | |
32480238 DZ |
68 | ifeq ($(canonhost),sparc-sun-sunos4.1.3) |
69 | TARGETS = $(NATIVE) \ | |
c262769a | 70 | i386-go32 \ |
32480238 DZ |
71 | a29k-amd-udi \ |
72 | h8300-hms h8500-hms \ | |
c262769a | 73 | i386-aout i386-coff \ |
39ad69d8 | 74 | i386-lynx i386-netware \ |
07be0634 | 75 | i960-intel-nindy i960-vxworks \ |
32480238 DZ |
76 | mips-idt-ecoff \ |
77 | m68k-aout m68k-vxworks m68k-coff \ | |
78 | m88k-coff \ | |
54278e28 | 79 | sh-hms \ |
07be0634 | 80 | sparc-aout sparc-vxworks sparclite-aout \ |
39ad69d8 | 81 | z8k-coff |
32480238 | 82 | GCC = gcc -O -pipe |
543cf4ac DZ |
83 | all: all-cygnus |
84 | endif | |
85 | ||
86 | ifeq ($(canonhost),m68k-sun-sunos4.1.1) | |
32480238 DZ |
87 | TARGETS = $(NATIVE) \ |
88 | i960-intel-nindy \ | |
07be0634 | 89 | m68k-aout m68k-vxworks m68k-coff |
e37dbf93 | 90 | GCC = gcc -O -msoft-float |
7cc2923a | 91 | CC = cc -J |
543cf4ac DZ |
92 | all: all-cygnus |
93 | endif | |
94 | ||
95 | ifeq ($(canonhost),sparc-sun-solaris2) | |
32480238 | 96 | TARGETS = $(NATIVE) \ |
32480238 | 97 | i386-aout \ |
c262769a DZ |
98 | i960-vxworks i960-intel-nindy \ |
99 | m68k-aout m68k-coff m68k-vxworks \ | |
07be0634 | 100 | mips-idt-ecoff \ |
c262769a DZ |
101 | sparc-aout sparc-vxworks sparclite-aout \ |
102 | h8300-hms h8500-hms \ | |
103 | a29k-amd-udi \ | |
104 | i386-coff | |
6d98b3d2 | 105 | CC = cc -Xs |
32480238 | 106 | GCC = gcc -O -pipe |
543cf4ac DZ |
107 | all: all-cygnus |
108 | endif | |
109 | ||
110 | ifeq ($(canonhost),mips-dec-ultrix) | |
e110c2a8 | 111 | TARGETS = $(NATIVE) m68k-aout |
872ff7ef | 112 | CC = cc -Wf,-XNg1000 |
543cf4ac DZ |
113 | all: all-cygnus |
114 | endif | |
115 | ||
116 | ifeq ($(canonhost),mips-sgi-irix4) | |
89745e93 DZ |
117 | TARGETS = $(NATIVE) \ |
118 | mips-idt-ecoff sh-hms | |
4cb66853 | 119 | CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500 |
543cf4ac DZ |
120 | all: all-cygnus |
121 | endif | |
122 | ||
123 | ifeq ($(canonhost),rs6000-ibm-aix) | |
32480238 | 124 | TARGETS = $(NATIVE) \ |
39ad69d8 DZ |
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 | |
543cf4ac DZ |
137 | all: all-cygnus |
138 | endif | |
139 | ||
140 | ifeq ($(canonhost),m68k-hp-hpux) | |
07be0634 | 141 | TARGETS = $(NATIVE) m68k-aout |
e37dbf93 | 142 | TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd) |
32480238 DZ |
143 | CC = cc -Wp,-P |
144 | #CFLAGS = +O1000 | |
c262769a | 145 | CFLAGS = |
eb0293dc | 146 | all: all-cygnus |
543cf4ac DZ |
147 | endif |
148 | ||
149 | ifeq ($(canonhost),hppa1.1-hp-hpux) | |
32480238 DZ |
150 | TARGETS = \ |
151 | i960-vxworks \ | |
89745e93 DZ |
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 | |
c262769a | 162 | # sh-hms # doesn't work |
32480238 DZ |
163 | CC = cc |
164 | #CFLAGS = +Obb2000 | |
165 | CFLAGS = -g | |
26de3d0c | 166 | all: all-native |
543cf4ac DZ |
167 | endif |
168 | ||
21412832 ILT |
169 | ifeq ($(canonhost),i386-sco3.2v4) |
170 | TARGETS = $(NATIVE) i386-aout | |
21412832 ILT |
171 | all: all-cygnus |
172 | endif | |
173 | ||
60986901 | 174 | ifeq ($(canonhost),i386-go32) |
89745e93 | 175 | TARGETS = \p |
32480238 | 176 | a29k-amd-udi \ |
07be0634 | 177 | h8300-hms h8500-hms \ |
32480238 DZ |
178 | i386-aout \ |
179 | m68k-aout m68k-coff \ | |
180 | mips-idt-ecoff \ | |
07be0634 | 181 | sh-hms \ |
32480238 | 182 | sparclite-aout |
60986901 ILT |
183 | CC = i386-go32-gcc |
184 | GCC = i386-go32-gcc -O | |
9823504d ILT |
185 | CFLAGS = |
186 | CXXFLAGS = -O | |
187 | MAKEINFOFLAGS = --no-split | |
60986901 ILT |
188 | all: all-cross |
189 | endif | |
190 | ||
7f82101d | 191 | ifeq ($(canonhost),i386-sysv4.2) |
89745e93 | 192 | TARGETS = $(NATIVE) |
32480238 DZ |
193 | CC = cc |
194 | all: all-cygnus | |
195 | endif | |
196 | ||
89745e93 DZ |
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 | ||
f358c814 DZ |
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 | ||
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)" \ |
022f8f67 | 233 | "RELEASE_TAG=$(RELEASE_TAG)" |
543cf4ac | 234 | |
57dfb584 DZ |
235 | all-emacs: |
236 | @echo build started at `date` | |
237 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
f358c814 | 238 | -rm -f $(ROOTING)/$(RELEASE_TAG) |
022f8f67 | 239 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) |
08629ab8 DZ |
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 | |
57dfb584 DZ |
242 | @echo done at `date` |
243 | ||
543cf4ac DZ |
244 | all-cygnus: |
245 | @echo build started at `date` | |
246 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
c262769a | 247 | -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) |
543cf4ac DZ |
248 | @for i in $(TARGETS) ; do \ |
249 | if [ "$$i" = "native" ] ; then \ | |
75217b36 | 250 | if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \ |
543cf4ac | 251 | echo "3staging $(canonhost) native" ; \ |
21412832 | 252 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
543cf4ac | 253 | echo " completed successfully" ; \ |
75217b36 ILT |
254 | else \ |
255 | true ; \ | |
543cf4ac DZ |
256 | fi \ |
257 | else \ | |
258 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 259 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \ |
543cf4ac DZ |
260 | echo " completed successfully" ; \ |
261 | fi ; \ | |
262 | done | |
263 | @echo done at `date` | |
264 | ||
c676f606 DZ |
265 | native: |
266 | @echo build started at `date` | |
267 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
268 | rm -f $(ROOTING)/$(RELEASE_TAG) |
269 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
21412832 | 270 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) |
c676f606 DZ |
271 | @echo done at `date` |
272 | ||
5ba00487 DZ |
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" ; \ | |
21412832 | 279 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \ |
5ba00487 DZ |
280 | echo " completed successfully" ; \ |
281 | fi \ | |
282 | else \ | |
13ec8aad | 283 | echo "building $(canonhost) cross to $$i:" `date` ; \ |
f74859e4 | 284 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
5ba00487 DZ |
285 | echo " completed successfully" ; \ |
286 | fi ; \ | |
287 | done | |
288 | @echo done at `date` | |
289 | ||
39ad69d8 DZ |
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 | ||
543cf4ac DZ |
301 | all-native: |
302 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
022f8f67 DZ |
303 | rm -f $(ROOTING)/$(RELEASE_TAG) |
304 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
543cf4ac DZ |
305 | @for i in $(TARGETS) ; do \ |
306 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 307 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \ |
543cf4ac DZ |
308 | echo " completed successfully" ; \ |
309 | done | |
310 | ||
60986901 ILT |
311 | all-cross: |
312 | [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR) | |
a9377e86 ILT |
313 | rm -f $(ROOTING)/$(RELEASE_TAG) |
314 | ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG) | |
60986901 ILT |
315 | @for i in $(TARGETS) ; do \ |
316 | echo "building $(canonhost) cross to $$i" ; \ | |
f74859e4 | 317 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \ |
60986901 ILT |
318 | echo " completed successfully" ; \ |
319 | done | |
320 | ||
543cf4ac DZ |
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" ; \ | |
f74859e4 | 329 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \ |
543cf4ac DZ |
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" ; \ | |
c262769a | 342 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \ |
543cf4ac DZ |
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" ; \ | |
f74859e4 | 356 | $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \ |
543cf4ac DZ |
357 | echo " completed successfully" ; \ |
358 | fi ; \ | |
359 | done | |
360 | ||
543cf4ac DZ |
361 | ### Local Variables: |
362 | ### fill-column: 131 | |
363 | ### End: |