1 # Build all of the targets for any given host.....
3 # This file is going to be ugly. It will be VERY specific to the
4 # Cygnus environment and build-process.
6 # Useful targets (rt = recursion target):
7 # (please correct or expand on this)
8 # FIXME: Might some of these be superfluous?
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
20 # all-native - set up install directories, build native
22 # all-cross - set up install directories, build all targets
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)
32 # clean - remove objdir directories, stamp files
35 # To configure/build for fewer targets, specify TARGETS="native cross1 ...".
38 include $(TREE
)/release-info
40 TEST_INSTALL_DISK
= /galt
42 INSTALLDIR
= $(TEST_INSTALL_DISK
)/$(TREE
)-test/$(RELEASE_TAG
)
45 host
:= $(shell $(TREE
)/config.guess
)
55 log
= 1>$(canonhost
)-build-log
2>&1
56 clog
= 1>$(canonhost
)-check-log
2>&1
57 cyglog
= 1> $(canonhost
)-x-
$$i-cygnus
-build
-log
2>&1
58 latestlog
= 1> $(canonhost
)-x-
$$i-latest
-build
-log
2>&1
59 natlog
= 1> $(canonhost
)-x-
$$i-native
-build
-log
2>&1
61 canonhost
:= $(shell $(TREE
)/config.sub
$(host
))
63 # Convert config.guess results to a simpler form.
64 ifeq ($(canonhost
),sparc-sun-solaris2.1
)
65 canonhost
:= sparc-sun-solaris2
67 ifeq ($(canonhost
),sparc-sun-solaris2.3
)
68 canonhost
:= sparc-sun-solaris2
70 ifeq ($(canonhost
),mips-dec-ultrix4.2
)
71 canonhost
:= mips-dec-ultrix
73 ifeq ($(canonhost
),mips-sgi-irix4.0
.1)
74 canonhost
:= mips-sgi-irix4
76 ifeq ($(canonhost
),mips-sgi-irix4.0
.5H
)
77 canonhost
:= mips-sgi-irix4
79 ifeq ($(canonhost
),rs6000-ibm-aix3.2
)
80 canonhost
:= rs6000-ibm-aix
82 ifeq ($(canonhost
),i486-unknown-sco3.2v4.0
)
83 canonhost
:= i386-sco3.2v4
85 ifeq ($(canonhost
),i386-unknown-sco3.2v4.0
)
86 canonhost
:= i386-sco3.2v4
88 ifeq ($(canonhost
),i386-unknown-sco3.2v4
)
89 canonhost
:= i386-sco3.2v4
91 ifeq ($(canonhost
),i386-unknown-go32
)
92 canonhost
:= i386-go32
94 ifeq ($(canonhost
),i386-unknown-sysv4.2
)
95 canonhost
:= i386-sysv4.2
97 ifeq ($(canonhost
),i386-lynx-lynxos
)
98 canonhost
:= i386-lynx
100 ifeq ($(canonhost
),m68k-lynx-lynxos
)
101 canonhost
:= m68k-lynx
103 ifeq ($(canonhost
),rs6000-lynx-lynxos2.2
.2)
104 canonhost
:= rs6000-lynx
107 ifeq ($(canonhost
),sparc-sun-sunos4.1
.3)
108 TARGETS
= $(NATIVE
) \
115 mips-idt-ecoff mips64-elf mips-elf \
116 m68k-aout m68k-vxworks m68k-coff \
119 sparc-aout sparc-lynx sparc-vxworks \
120 sparclite-aout sparclite-vxworks \
121 sparclite-coff z8k-coff
126 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
127 TARGETS
= $(NATIVE
) \
129 GCC
= gcc
-O
-msoft-float
134 ifeq ($(canonhost
),sparc-sun-solaris2
)
135 TARGETS
= $(NATIVE
) \
138 m68k-aout m68k-coff m68k-vxworks \
140 mipsel-idt-ecoff sparc-lynx
146 ifeq ($(canonhost
),mips-dec-ultrix
)
147 TARGETS
= $(NATIVE
) m68k-aout
152 ifeq ($(canonhost
),mips-sgi-irix4
)
153 TARGETS
= $(NATIVE
) \
154 mips-idt-ecoff sh-hms \
156 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
160 ifeq ($(canonhost
),rs6000-ibm-aix
)
161 TARGETS
= $(NATIVE
) \
167 ifeq ($(canonhost
),m68k-hp-hpux
)
168 TARGETS
= $(NATIVE
) m68k-aout
169 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
176 ifeq ($(canonhost
),hppa1.1
-hp-hpux
)
180 m68k-aout m68k-vxworks
187 ifeq ($(canonhost
),i386-sco3.2v4
)
188 TARGETS
= $(NATIVE
) i386-aout
192 ifeq ($(canonhost
),i386-go32
)
197 m68k-aout m68k-coff \
202 GCC
= i386-go32-gcc
-O
205 MAKEINFOFLAGS
= --no-split
209 ifeq ($(canonhost
),i386-sysv4.2
)
210 TARGETS
= $(NATIVE
) i386-netware
215 ifeq ($(canonhost
),i386-lynx
)
222 ifeq ($(canonhost
),m68k-lynx
)
229 ifeq ($(canonhost
),sparc-lynx
)
236 ifeq ($(canonhost
),rs6000-lynx
)
238 CC
= /usr
/cygnus
/progressive
/bin
/gcc
247 "CXXFLAGS=$(CXXFLAGS)" \
248 "host=$(canonhost)" \
249 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
250 "RELEASE_TAG=$(RELEASE_TAG)" \
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"
259 @echo build started at
`date`
260 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
261 -rm -f
$(ROOTING
)/$(RELEASE_TAG
)
262 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
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
268 @echo build started at
`date`
269 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
270 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
271 @for i in
$(TARGETS
) ; do \
272 if
[ "$$i" = "native" ] ; then \
273 if
[ ! -f
$(canonhost
)-stamp-3stage-done
] ; then \
274 echo
"3staging $(canonhost) native" ; \
275 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
276 echo
" completed successfully" ; \
281 echo
"building $(canonhost) cross to $$i" ; \
282 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(cyglog
) && \
283 echo
" completed successfully" ; \
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
; \
296 @echo build started at
`date`
297 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
298 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
299 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
300 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
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" ; \
309 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
310 echo
" completed successfully" ; \
313 echo
"building $(canonhost) cross to $$i:" `date` ; \
314 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
315 echo
" completed successfully" ; \
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" ; \
332 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
333 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
334 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
335 @for i in
$(TARGETS
) ; do \
336 echo
"building $(canonhost) cross to $$i" ; \
337 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(natlog
) && \
338 echo
" completed successfully" ; \
342 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
343 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
344 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
345 @for i in
$(TARGETS
) ; do \
346 echo
"building $(canonhost) cross to $$i" ; \
347 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build
=$(build
) do-cygnus
$(cyglog
) && \
348 echo
" completed successfully" ; \
352 $(MAKE
) -f build-all.mk build
=$(host
) host
=i386-go32 all-dos
354 @for i in
$(TARGETS
) ; do \
355 echo
"building $(canonhost) cross to $$i" ; \
356 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) host
=$(host
) target
=$$i do-dos
$(cyglog
) && \
357 echo
" completed successfully at `date`" ; \
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" ; \
367 echo
"config $(canonhost) cross to $$i" ; \
368 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(cyglog
) && \
369 echo
" completed successfully" ; \
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" ; \
380 echo
"building $(canonhost) cross to $$i" ; \
381 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(natlog
) && \
382 echo
" completed successfully" ; \
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" ; \
394 echo
"building $(canonhost) cross to $$i" ; \
395 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
396 echo
" completed successfully" ; \
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" ; \
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" ; \
414 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) clean $(log
)