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 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
= /dumbo
42 INSTALLDIR
= $(TEST_INSTALL_DISK
)/$(TREE
)-test/$(RELEASE_TAG
)
45 host
:= $(shell $(TREE
)/config.guess
)
56 log
= 1>$(canonhost
)-build-log
2>&1
57 clog
= 1>$(canonhost
)-check-log
2>&1
58 cyglog
= 1> $(canonhost
)-x-
$$i-cygnus
-build
-log
2>&1
59 latestlog
= 1> $(canonhost
)-x-
$$i-latest
-build
-log
2>&1
60 natlog
= 1> $(canonhost
)-x-
$$i-native
-build
-log
2>&1
62 canonhost
:= $(shell $(TREE
)/config.sub
$(host
))
64 # Convert config.guess results to a simpler form.
65 ifeq ($(canonhost
),sparc-sun-solaris2.1
)
66 canonhost
:= sparc-sun-solaris2
68 ifeq ($(canonhost
),sparc-sun-solaris2.3
)
69 canonhost
:= sparc-sun-solaris2
71 ifeq ($(canonhost
),mips-dec-ultrix4.2
)
72 canonhost
:= mips-dec-ultrix
74 ifeq ($(canonhost
),mips-dec-ultrix4.4
)
75 canonhost
:= mips-dec-ultrix
77 ifeq ($(canonhost
),mips-sgi-irix4.0
.1)
78 canonhost
:= mips-sgi-irix4
80 ifeq ($(canonhost
),mips-sgi-irix4.0
.5H
)
81 canonhost
:= mips-sgi-irix4
83 ifeq ($(canonhost
),mips-sgi-irix5.2
)
84 canonhost
:= mips-sgi-irix5
86 ifeq ($(canonhost
),rs6000-ibm-aix3.2
)
87 canonhost
:= rs6000-ibm-aix
89 ifeq ($(canonhost
),i486-unknown-sco3.2v4.0
)
90 canonhost
:= i386-sco3.2v4
92 ifeq ($(canonhost
),i386-unknown-sco3.2v4.0
)
93 canonhost
:= i386-sco3.2v4
95 ifeq ($(canonhost
),i386-unknown-sco3.2v4
)
96 canonhost
:= i386-sco3.2v4
98 ifeq ($(canonhost
),i386-unknown-go32
)
99 canonhost
:= i386-go32
101 ifeq ($(canonhost
),i386-unknown-sysv4.2
)
102 canonhost
:= i386-sysv4.2
104 ifeq ($(canonhost
),i386-lynx-lynxos
)
105 canonhost
:= i386-lynx
107 ifeq ($(canonhost
),m68k-lynx-lynxos
)
108 canonhost
:= m68k-lynx
110 ifeq ($(canonhost
),sparc-lynx-lynxos
)
111 canonhost
:= sparc-lynx
113 ifeq ($(canonhost
),rs6000-lynx-lynxos
)
114 canonhost
:= rs6000-lynx
116 ifeq ($(canonhost
),i386-unknown-linux
)
117 canonhost
:= i386-linux
119 ifeq ($(canonhost
),i486-unknown-linux
)
120 canonhost
:= i486-linux
122 ifeq ($(canonhost
),i586-unknown-linux
)
123 canonhost
:= i486-linux
125 ifeq ($(canonhost
),i386-unknown-linuxaout
)
126 canonhost
:= i386-linuxaout
128 ifeq ($(canonhost
),i486-unknown-linuxaout
)
129 canonhost
:= i486-linuxaout
131 ifeq ($(canonhost
),i586-unknown-linuxaout
)
132 canonhost
:= i486-linuxaout
136 # The following TARGETS variable settings probably ought to
137 # be made automatically from the
138 # /s1/cygnus/progressive/host-target-pairs.tbl file, using
139 # the /s1/cygnus/progressive/targets script. But, be sure
140 # that the native is spelled 'native'.
143 ifeq ($(canonhost
),sparc-sun-sunos4.1
)
144 TARGETS
= $(NATIVE
) \
146 a29k-amd-udi a29k-vxworks5.1 \
148 powerpc-eabi hppa1.1
-hp-proelf \
150 i960-nindy-coff i960-vxworks5.0 i960-vxworks5.1 \
151 m68k-aout m68k-coff m68k-elf m68k-vxworks5.1 \
152 mips-elf mips-idt-ecoff mips64-elf \
153 sparc-aout sparclite-aout sparclite-coff \
154 z8k-coff i386-unixware mips-ncd-elf \
160 ifeq ($(canonhost
),sparc-sun-sunos4.1
.3)
161 TARGETS
= $(NATIVE
) \
164 h8300-hms h8500-hms \
167 i960-nindy-coff i960-vxworks5.0 i960-vxworks5.1 \
168 m68k-aout m68k-coff m68k-elf m68k-vxworks5.1 \
169 mips-idt-ecoff mips64-elf mips-elf \
171 sparc-aout sparc64-aout sparc-vxworks \
172 sparclite-aout sparclite-coff sparclite-vxworks \
174 OSE68000 OSE68k mips-ncd-elf i386-unixware
175 # The OSE68000 and OSE68k targets are for Ericsson only.
180 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
182 GCC
= gcc
-O2
-msoft-float
187 ifeq ($(canonhost
),sparc-sun-solaris2
)
188 TARGETS
= $(NATIVE
) \
190 h8300-hms h8500-hms \
192 i960-vxworks5.0 i960-vxworks5.1 \
193 m68k-aout m68k-coff m68k-vxworks5.1 m88k-coff \
194 mips-idt-ecoff mips-elf \
195 sparc64-elf sparclite-aout sparclite-coff \
198 # The latter assures that BNR's special build (which they now
199 # do for themselves from sources) hasn't developed bit-rot.
200 # The OSE68000 and OSE68k targets are for Ericsson only.
207 ifeq ($(canonhost
),mips-dec-ultrix
)
211 SHELL
= /usr
/unsupported
/bin
/bash
212 CONFIG_SHELL
= /usr
/unsupported
/bin
/bash
213 TMPDIR
= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
216 ifeq ($(patsubst alpha-dec-osf
%,alpha
,$(canonhost
)),alpha
)
222 ifeq ($(canonhost
),mips-sgi-irix4
)
223 TARGETS
= $(NATIVE
) \
225 mips-elf mips64-elf \
227 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
231 ifeq ($(canonhost
),mips-sgi-irix5
)
232 TARGETS
= $(NATIVE
) \
234 mips-elf mips64-elf \
236 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
240 ifeq ($(canonhost
),powerpc-ibm-aix4.1
)
245 ifeq ($(canonhost
),rs6000-ibm-aix
)
246 TARGETS
= $(NATIVE
) \
247 i960-vxworks5.0 i960-vxworks5.1 \
252 ifeq ($(canonhost
),rs6000-ibm-aix3.2
.5)
253 TARGETS
= $(NATIVE
) \
254 i960-vxworks5.0 i960-vxworks5.1 \
259 ifeq ($(canonhost
),rs6000-ibm-aix4.1
)
264 ifeq ($(canonhost
),m68k-hp-hpux9
)
266 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
267 CC
= cc -Wp
,-P
,-H256000
273 ifeq ($(canonhost
),hppa1.1
-hp-hpux9
)
278 i960-vxworks5.0 i960-vxworks5.1 \
279 m68k-aout m68k-coff m68k-vxworks5.1
286 #ifeq ($(canonhost),hppa1.1-hp-hpux10)
287 ifeq ($(patsubst hppa1.1
-hp-hpux10
%,hpux10
,$(canonhost
)),hpux10
)
295 ifeq ($(canonhost
),i386-sco3.2v4
)
300 ifeq ($(canonhost
),i386-go32
)
303 h8300-hms hppa1.1
-hp-proelf \
305 m68k-aout m68k-coff \
306 mips-elf mips-idt-ecoff mips64-elf \
308 sparc-aout sparclite-aout sparclite-coff
310 GCC
= i386-go32-gcc
-O2
313 MAKEINFOFLAGS
= --no-split
317 ifeq ($(canonhost
),i386-sysv4.2
)
318 TARGETS
= $(NATIVE
) i386-netware
323 ifeq ($(canonhost
),i386-ncr-sysv4.3
)
326 SHELL
= /usr
/unsupported
/bin
/bash
327 CONFIG_SHELL
= /usr
/unsupported
/bin
/bash
331 ifeq ($(canonhost
),i386-lynx
)
333 CC
= /usr
/cygnus
/progressive
/bin
/gcc
338 ifeq ($(canonhost
),m68k-lynx
)
340 CC
= /usr
/cygnus
/progressive
/bin
/gcc
345 ifeq ($(canonhost
),sparc-lynx
)
347 CC
= /usr
/cygnus
/progressive
/bin
/gcc
352 ifeq ($(canonhost
),rs6000-lynx
)
354 CC
= /usr
/cygnus
/progressive
/bin
/gcc
359 ifeq ($(patsubst %-linux
,linux
,$(patsubst %-linuxaout
,linux
,$(canonhost
))),linux
)
368 "GNUCFLAGS=$(GNUCFLAGS)" \
369 "CXXFLAGS=$(CXXFLAGS)" \
370 "host=$(canonhost)" \
371 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
372 "RELEASE_TAG=$(RELEASE_TAG)" \
375 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
376 ifeq ($(patsubst %-lynx
,lynx
,$(canonhost
)),lynx
)
377 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
380 ifeq ($(patsubst %-linux
,linux
,$(patsubst %-linuxaout
,linux
,$(canonhost
))),linux
)
381 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)"
384 ifeq ($(patsubst %i386-ncr-sysv4.3
,ncr
,$(canonhost
)),ncr
)
385 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "CONFIG_SHELL=/usr/unsupported/bin/bash"
389 @echo build started at
`date`
390 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
391 -rm -f
$(ROOTING
)/$(RELEASE_TAG
)
392 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
393 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1
> $(canonhost
)-emacs-native-log
2>&1
394 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do-latest
> $(canonhost
)-emacs-latest-log
2>&1
398 @echo build started at
`date`
399 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
400 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
402 # The following line to be used during regular progressive builds
403 # to help developers test, but should be commented out for final
406 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
407 @for i in
$(TARGETS
) ; do \
408 if
[ "$$i" = "native" ] ; then \
409 if
[ ! -f
$(canonhost
)-stamp-3stage-done
] ; then \
410 echo
"3staging $(canonhost) native" ; \
411 echo Flags passed to make
: $(FLAGS_TO_PASS
) ; \
412 if
$(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
); then \
413 echo
" completed successfully" ; \
421 echo
"building $(canonhost) cross to $$i" ; \
422 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(cyglog
) && \
423 echo
" completed successfully" ; \
426 @if
[ ! -f
$(canonhost
)-stamp-3stage-checked
] ; then \
427 echo checking
$(canonhost
) native
; \
428 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-check-3stage
$(clog
) ; \
429 touch
$(canonhost
)-stamp-3stage-checked
; \
436 @echo build started at
`date`
437 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
438 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
439 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
440 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
444 @echo build started at
`date`
445 @for i in
$(TARGETS
) ; do \
446 if
[ "$$i" = "native" ] ; then \
447 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
448 echo
"3staging $(canonhost) native" ; \
449 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
450 echo
" completed successfully" ; \
453 echo
"building $(canonhost) cross to $$i:" `date` ; \
454 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
455 echo
" completed successfully" ; \
461 @echo build started at
`date`
462 @for i in
$(TARGETS
) ; do \
463 if
[ "$$i" != "native" ] ; then \
464 echo
"building $(canonhost) cross to $$i:" `date` ; \
465 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(latestlog
) && \
466 echo
" completed successfully" ; \
472 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
473 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
474 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
475 @for i in
$(TARGETS
) ; do \
476 echo
"building $(canonhost) cross to $$i" ; \
477 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(natlog
) && \
478 echo
" completed successfully" ; \
482 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
483 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
484 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
485 @for i in
$(TARGETS
) ; do \
486 echo
"building $(canonhost) cross to $$i" ; \
487 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build
=$(build
) do-cygnus
$(cyglog
) && \
488 echo
" completed successfully" ; \
492 $(MAKE
) -f build-all.mk build
=$(host
) host
=i386-go32 all-dos
494 @for i in
$(TARGETS
) ; do \
495 echo
"building $(canonhost) cross to $$i" ; \
496 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) host
=$(host
) target
=$$i do-dos
$(cyglog
) && \
497 echo
" completed successfully at `date`" ; \
501 @for i in
$(TARGETS
) ; do \
502 if
[ "$$i" = "native" ] ; then \
503 echo
"config stage1 for $(canonhost)" ; \
504 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-config
$(log
) && \
505 echo
" completed successfully" ; \
507 echo
"config $(canonhost) cross to $$i" ; \
508 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(cyglog
) && \
509 echo
" completed successfully" ; \
515 @for i in
$(TARGETS
) ; do \
516 if
[ "$$i" = "native" ] ; then \
517 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-build
$(log
) && \
518 echo
" completed successfully" ; \
520 echo
"building $(canonhost) cross to $$i" ; \
521 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(natlog
) && \
522 echo
" completed successfully" ; \
528 @for i in
$(TARGETS
) ; do \
529 if
[ "$$i" = "native" ] ; then \
530 echo
"building 3stage for $(canonhost)" ; \
531 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) all $(log
) && \
532 echo
" completed successfully" ; \
534 echo
"building $(canonhost) cross to $$i" ; \
535 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
536 echo
" completed successfully" ; \
541 @for i in
$(TARGETS
) ; do \
542 if
[ "$$i" = "native" ] ; then \
543 echo
"building 3stage for $(canonhost)" ; \
544 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
545 echo
" completed successfully" ; \
547 echo
"building $(canonhost) cross to $$i" ; \
548 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(cyglog
) && \
549 echo
" completed successfully" ; \
554 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) clean $(log
)