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-sgi-irix4.0
.1)
75 canonhost
:= mips-sgi-irix4
77 ifeq ($(canonhost
),mips-sgi-irix4.0
.5H
)
78 canonhost
:= mips-sgi-irix4
80 ifeq ($(canonhost
),mips-sgi-irix5.2
)
81 canonhost
:= mips-sgi-irix5
83 ifeq ($(canonhost
),rs6000-ibm-aix3.2
)
84 canonhost
:= rs6000-ibm-aix
86 ifeq ($(canonhost
),i486-unknown-sco3.2v4.0
)
87 canonhost
:= i386-sco3.2v4
89 ifeq ($(canonhost
),i386-unknown-sco3.2v4.0
)
90 canonhost
:= i386-sco3.2v4
92 ifeq ($(canonhost
),i386-unknown-sco3.2v4
)
93 canonhost
:= i386-sco3.2v4
95 ifeq ($(canonhost
),i386-unknown-go32
)
96 canonhost
:= i386-go32
98 ifeq ($(canonhost
),i386-unknown-sysv4.2
)
99 canonhost
:= i386-sysv4.2
101 ifeq ($(canonhost
),i386-lynx-lynxos
)
102 canonhost
:= i386-lynx
104 ifeq ($(canonhost
),m68k-lynx-lynxos
)
105 canonhost
:= m68k-lynx
107 ifeq ($(canonhost
),sparc-lynx-lynxos
)
108 canonhost
:= sparc-lynx
110 ifeq ($(canonhost
),rs6000-lynx-lynxos
)
111 canonhost
:= rs6000-lynx
113 ifeq ($(canonhost
),i386-unknown-linux
)
114 canonhost
:= i386-linux
116 ifeq ($(canonhost
),i486-unknown-linux
)
117 canonhost
:= i486-linux
119 ifeq ($(canonhost
),i586-unknown-linux
)
120 canonhost
:= i486-linux
122 ifeq ($(canonhost
),i386-unknown-linuxaout
)
123 canonhost
:= i386-linuxaout
125 ifeq ($(canonhost
),i486-unknown-linuxaout
)
126 canonhost
:= i486-linuxaout
128 ifeq ($(canonhost
),i586-unknown-linuxaout
)
129 canonhost
:= i486-linuxaout
133 # The following TARGETS variable settings probably ought to
134 # be made automatically from the
135 # /s1/cygnus/progressive/host-target-pairs.tbl file, using
136 # the /s1/cygnus/progressive/targets script. But, be sure
137 # that the native is spelled 'native'.
140 ifeq ($(canonhost
),sparc-sun-sunos4.1
.3)
141 TARGETS
= $(NATIVE
) \
144 h8300-hms h8500-hms \
147 i960-nindy-coff i960-vxworks5.0 i960-vxworks5.1 \
148 m68k-aout m68k-coff m68k-elf m68k-vxworks5.1 \
149 mips-idt-ecoff mips64-elf mips-elf \
151 sparc-aout sparc64-aout sparc-vxworks \
152 sparclite-aout sparclite-coff sparclite-vxworks \
154 OSE68000 OSE68k mips-ncd-elf i386-unixware
155 # The OSE68000 and OSE68k targets are for Ericsson only.
160 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
162 GCC
= gcc
-O2
-msoft-float
167 ifeq ($(canonhost
),sparc-sun-solaris2
)
168 TARGETS
= $(NATIVE
) \
170 h8300-hms h8500-hms \
172 i960-vxworks5.0 i960-vxworks5.1 \
173 m68k-aout m68k-coff m68k-vxworks5.1 m88k-coff \
174 mips-idt-ecoff mips-elf \
175 sparc64-elf sparclite-aout sparclite-coff \
178 # The latter assures that BNR's special build (which they now
179 # do for themselves from sources) hasn't developed bit-rot.
180 # The OSE68000 and OSE68k targets are for Ericsson only.
187 ifeq ($(canonhost
),mips-dec-ultrix
)
188 TARGETS
= $(NATIVE
) m68k-aout
193 ifeq ($(patsubst alpha-dec-osf
%,alpha
,$(canonhost
)),alpha
)
199 ifeq ($(canonhost
),mips-sgi-irix4
)
200 TARGETS
= $(NATIVE
) \
202 mips-elf mips64-elf \
204 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
208 ifeq ($(canonhost
),mips-sgi-irix5
)
209 TARGETS
= $(NATIVE
) \
211 mips-elf mips64-elf \
213 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
217 ifeq ($(canonhost
),powerpc-ibm-aix4.1
.1)
222 ifeq ($(canonhost
),rs6000-ibm-aix
)
223 TARGETS
= $(NATIVE
) \
224 i960-vxworks5.0 i960-vxworks5.1 \
229 ifeq ($(canonhost
),rs6000-ibm-aix3.2
.5)
230 TARGETS
= $(NATIVE
) \
231 i960-vxworks5.0 i960-vxworks5.1 \
236 ifeq ($(canonhost
),m68k-hp-hpux
)
237 TARGETS
= $(NATIVE
) m68k-aout
238 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
239 CC
= cc -Wp
,-P
,-H256000
245 ifeq ($(canonhost
),hppa1.1
-hp-hpux
)
250 i960-vxworks5.0 i960-vxworks5.1 \
251 m68k-aout m68k-coff m68k-vxworks5.1
258 ifeq ($(canonhost
),i386-sco3.2v4
)
263 ifeq ($(canonhost
),i386-go32
)
266 h8300-hms hppa1.1
-hp-proelf \
268 m68k-aout m68k-coff \
269 mips-elf mips-idt-ecoff mips64-elf \
271 sparc-aout sparclite-aout sparclite-coff
273 GCC
= i386-go32-gcc
-O2
276 MAKEINFOFLAGS
= --no-split
280 ifeq ($(canonhost
),i386-sysv4.2
)
281 TARGETS
= $(NATIVE
) i386-netware
286 ifeq ($(canonhost
),i386-ncr-sysv4.3
)
290 SHELL
= /usr
/unsupported
/bin
/bash
291 CONFIG_SHELL
= /usr
/unsupported
/bin
/bash
295 ifeq ($(canonhost
),i386-lynx
)
297 CC
= /usr
/cygnus
/progressive
/bin
/gcc
302 ifeq ($(canonhost
),m68k-lynx
)
304 CC
= /usr
/cygnus
/progressive
/bin
/gcc
309 ifeq ($(canonhost
),sparc-lynx
)
311 CC
= /usr
/cygnus
/progressive
/bin
/gcc
316 ifeq ($(canonhost
),rs6000-lynx
)
318 CC
= /usr
/cygnus
/progressive
/bin
/gcc
323 ifeq ($(patsubst %-linux
,linux
,$(patsubst %-linuxaout
,linux
,$(canonhost
))),linux
)
332 "GNUCFLAGS=$(GNUCFLAGS)" \
333 "CXXFLAGS=$(CXXFLAGS)" \
334 "host=$(canonhost)" \
335 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
336 "RELEASE_TAG=$(RELEASE_TAG)" \
339 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
340 ifeq ($(patsubst %-lynx
,lynx
,$(canonhost
)),lynx
)
341 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
344 ifeq ($(patsubst %-linux
,linux
,$(patsubst %-linuxaout
,linux
,$(canonhost
))),linux
)
345 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)"
348 ifeq ($(patsubst %i386-ncr-sysv4.3
,ncr
,$(canonhost
)),ncr
)
349 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "CONFIG_SHELL=/usr/unsupported/bin/bash"
353 @echo build started at
`date`
354 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
355 -rm -f
$(ROOTING
)/$(RELEASE_TAG
)
356 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
357 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1
> $(canonhost
)-emacs-native-log
2>&1
358 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do-latest
> $(canonhost
)-emacs-latest-log
2>&1
362 @echo build started at
`date`
363 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
364 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
366 # The following line to be used during regular progressive builds
367 # to help developers test, but should be commented out for final
370 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
371 @for i in
$(TARGETS
) ; do \
372 if
[ "$$i" = "native" ] ; then \
373 if
[ ! -f
$(canonhost
)-stamp-3stage-done
] ; then \
374 echo
"3staging $(canonhost) native" ; \
375 echo Flags passed to make
: $(FLAGS_TO_PASS
) ; \
376 if
$(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
); then \
377 echo
" completed successfully" ; \
385 echo
"building $(canonhost) cross to $$i" ; \
386 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(cyglog
) && \
387 echo
" completed successfully" ; \
390 @if
[ ! -f
$(canonhost
)-stamp-3stage-checked
] ; then \
391 echo checking
$(canonhost
) native
; \
392 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-check-3stage
$(clog
) ; \
393 touch
$(canonhost
)-stamp-3stage-checked
; \
400 @echo build started at
`date`
401 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
402 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
403 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
404 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
408 @echo build started at
`date`
409 @for i in
$(TARGETS
) ; do \
410 if
[ "$$i" = "native" ] ; then \
411 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
412 echo
"3staging $(canonhost) native" ; \
413 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
414 echo
" completed successfully" ; \
417 echo
"building $(canonhost) cross to $$i:" `date` ; \
418 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
419 echo
" completed successfully" ; \
425 @echo build started at
`date`
426 @for i in
$(TARGETS
) ; do \
427 if
[ "$$i" != "native" ] ; then \
428 echo
"building $(canonhost) cross to $$i:" `date` ; \
429 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(latestlog
) && \
430 echo
" completed successfully" ; \
436 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
437 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
438 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
439 @for i in
$(TARGETS
) ; do \
440 echo
"building $(canonhost) cross to $$i" ; \
441 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(natlog
) && \
442 echo
" completed successfully" ; \
446 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
447 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
448 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
449 @for i in
$(TARGETS
) ; do \
450 echo
"building $(canonhost) cross to $$i" ; \
451 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build
=$(build
) do-cygnus
$(cyglog
) && \
452 echo
" completed successfully" ; \
456 $(MAKE
) -f build-all.mk build
=$(host
) host
=i386-go32 all-dos
458 @for i in
$(TARGETS
) ; do \
459 echo
"building $(canonhost) cross to $$i" ; \
460 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) host
=$(host
) target
=$$i do-dos
$(cyglog
) && \
461 echo
" completed successfully at `date`" ; \
465 @for i in
$(TARGETS
) ; do \
466 if
[ "$$i" = "native" ] ; then \
467 echo
"config stage1 for $(canonhost)" ; \
468 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-config
$(log
) && \
469 echo
" completed successfully" ; \
471 echo
"config $(canonhost) cross to $$i" ; \
472 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(cyglog
) && \
473 echo
" completed successfully" ; \
479 @for i in
$(TARGETS
) ; do \
480 if
[ "$$i" = "native" ] ; then \
481 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-build
$(log
) && \
482 echo
" completed successfully" ; \
484 echo
"building $(canonhost) cross to $$i" ; \
485 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(natlog
) && \
486 echo
" completed successfully" ; \
492 @for i in
$(TARGETS
) ; do \
493 if
[ "$$i" = "native" ] ; then \
494 echo
"building 3stage for $(canonhost)" ; \
495 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) all $(log
) && \
496 echo
" completed successfully" ; \
498 echo
"building $(canonhost) cross to $$i" ; \
499 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
500 echo
" completed successfully" ; \
505 @for i in
$(TARGETS
) ; do \
506 if
[ "$$i" = "native" ] ; then \
507 echo
"building 3stage for $(canonhost)" ; \
508 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
509 echo
" completed successfully" ; \
511 echo
"building $(canonhost) cross to $$i" ; \
512 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(cyglog
) && \
513 echo
" completed successfully" ; \
518 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) clean $(log
)