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
= /abc
42 INSTALLDIR
= $(TEST_INSTALL_DISK
)/$(TREE
)-test/$(RELEASE_TAG
)
45 host
:= $(shell $(TREE
)/config.guess
)
52 CXXFLAGS
= -g
-O2
-fexternal-templates
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
),mips-sgi-irix5.2
)
80 canonhost
:= mips-sgi-irix5
82 ifeq ($(canonhost
),rs6000-ibm-aix3.2
)
83 canonhost
:= rs6000-ibm-aix
85 ifeq ($(canonhost
),i486-unknown-sco3.2v4.0
)
86 canonhost
:= i386-sco3.2v4
88 ifeq ($(canonhost
),i386-unknown-sco3.2v4.0
)
89 canonhost
:= i386-sco3.2v4
91 ifeq ($(canonhost
),i386-unknown-sco3.2v4
)
92 canonhost
:= i386-sco3.2v4
94 ifeq ($(canonhost
),i386-unknown-go32
)
95 canonhost
:= i386-go32
97 ifeq ($(canonhost
),i386-unknown-sysv4.2
)
98 canonhost
:= i386-sysv4.2
100 ifeq ($(canonhost
),i386-lynx-lynxos
)
101 canonhost
:= i386-lynx
103 ifeq ($(canonhost
),m68k-lynx-lynxos
)
104 canonhost
:= m68k-lynx
106 ifeq ($(canonhost
),sparc-lynx-lynxos
)
107 canonhost
:= sparc-lynx
109 ifeq ($(canonhost
),rs6000-lynx-lynxos
)
110 canonhost
:= rs6000-lynx
114 # The following TARGETS variable settings probably ought to
115 # be made automatically from the
116 # /s1/cygnus/progressive/host-target-pairs.tbl file, using
117 # the /s1/cygnus/progressive/targets script. But, be sure
118 # that the native is spelled 'native'.
121 ifeq ($(canonhost
),sparc-sun-sunos4.1
.3)
122 TARGETS
= $(NATIVE
) \
128 i960-vxworks5.0 i960-vxworks5.1 \
129 mips-idt-ecoff mips64-elf mips-elf \
130 m68k-aout m68k-vxworks m68k-coff \
133 sparc-aout sparc-lynx sparc-vxworks \
134 sparclite-aout sparclite-vxworks \
135 sparclite-coff z8k-coff \
136 OSE68000 OSE68k mips-ncd-elf
137 # The OSE68000 and OSE68k targets are for Ericsson only;
138 # the mips-ncd-elf target is for NCD only.
143 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
144 TARGETS
= $(NATIVE
) \
146 GCC
= gcc
-O2
-msoft-float
151 ifeq ($(canonhost
),sparc-sun-solaris2
)
152 TARGETS
= $(NATIVE
) \
154 i960-vxworks5.0 i960-vxworks5.1 \
155 m68k-aout m68k-coff m68k-vxworks \
156 mipsel-idt-ecoff sparc-lynx \
157 sparclite-aout sparclite-coff m88k-coff z8k-coff \
160 # The latter assures that BNR's special build (which they now
161 # do for themselves from sources) hasn't developed bit-rot.
162 # The OSE68000 and OSE68k targets are for Ericsson only.
169 ifeq ($(canonhost
),mips-dec-ultrix
)
170 TARGETS
= $(NATIVE
) m68k-aout
175 ifeq ($(canonhost
),alpha-dec-osf1.3
)
181 ifeq ($(canonhost
),mips-sgi-irix4
)
182 TARGETS
= $(NATIVE
) \
183 mips-idt-ecoff sh-hms \
185 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
189 ifeq ($(canonhost
),mips-sgi-irix5
)
190 TARGETS
= $(NATIVE
) \
191 mips-idt-ecoff sh-hms \
193 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
197 ifeq ($(canonhost
),rs6000-ibm-aix
)
198 TARGETS
= $(NATIVE
) \
199 i960-vxworks5.0 i960-vxworks5.1 \
204 ifeq ($(canonhost
),m68k-hp-hpux
)
205 TARGETS
= $(NATIVE
) m68k-aout
206 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
213 ifeq ($(canonhost
),hppa1.1
-hp-hpux
)
216 i960-vxworks5.0 i960-vxworks5.1 \
217 m68k-aout m68k-coff m68k-vxworks \
225 ifeq ($(canonhost
),i386-sco3.2v4
)
226 TARGETS
= $(NATIVE
) i386-aout
230 ifeq ($(canonhost
),i386-go32
)
235 m68k-aout m68k-coff \
240 GCC
= i386-go32-gcc
-O2
243 MAKEINFOFLAGS
= --no-split
247 ifeq ($(canonhost
),i386-sysv4.2
)
248 TARGETS
= $(NATIVE
) i386-netware
253 ifeq ($(canonhost
),i386-lynx
)
255 CC
= /usr
/cygnus
/progressive
/bin
/gcc
260 ifeq ($(canonhost
),m68k-lynx
)
262 CC
= /usr
/cygnus
/progressive
/bin
/gcc
267 ifeq ($(canonhost
),sparc-lynx
)
269 CC
= /usr
/cygnus
/progressive
/bin
/gcc
274 ifeq ($(canonhost
),rs6000-lynx
)
276 CC
= /usr
/cygnus
/progressive
/bin
/gcc
285 "CXXFLAGS=$(CXXFLAGS)" \
286 "host=$(canonhost)" \
287 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
288 "RELEASE_TAG=$(RELEASE_TAG)" \
291 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
292 ifeq ($(patsubst %-lynx
,lynx
,$(canonhost
)),lynx
)
293 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
297 @echo build started at
`date`
298 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
299 -rm -f
$(ROOTING
)/$(RELEASE_TAG
)
300 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
301 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1
> $(canonhost
)-emacs-native-log
2>&1
302 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do-latest
> $(canonhost
)-emacs-latest-log
2>&1
306 @echo build started at
`date`
307 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
308 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
310 # The following line to be used during regular progressive builds
311 # to help developers test, but should be commented out for final
314 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
315 @for i in
$(TARGETS
) ; do \
316 if
[ "$$i" = "native" ] ; then \
317 if
[ ! -f
$(canonhost
)-stamp-3stage-done
] ; then \
318 echo
"3staging $(canonhost) native" ; \
319 echo Flags passed to make
: $(FLAGS_TO_PASS
) ; \
320 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
321 echo
" completed successfully" ; \
326 echo
"building $(canonhost) cross to $$i" ; \
327 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(cyglog
) && \
328 echo
" completed successfully" ; \
331 @if
[ ! -f
$(canonhost
)-stamp-3stage-checked
] ; then \
332 echo checking
$(canonhost
) native
; \
333 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-check-3stage
$(clog
) ; \
334 touch
$(canonhost
)-stamp-3stage-checked
; \
341 @echo build started at
`date`
342 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
343 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
344 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
345 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
349 @echo build started at
`date`
350 @for i in
$(TARGETS
) ; do \
351 if
[ "$$i" = "native" ] ; then \
352 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
353 echo
"3staging $(canonhost) native" ; \
354 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
355 echo
" completed successfully" ; \
358 echo
"building $(canonhost) cross to $$i:" `date` ; \
359 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
360 echo
" completed successfully" ; \
366 @echo build started at
`date`
367 @for i in
$(TARGETS
) ; do \
368 if
[ "$$i" != "native" ] ; then \
369 echo
"building $(canonhost) cross to $$i:" `date` ; \
370 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(latestlog
) && \
371 echo
" completed successfully" ; \
377 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
378 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
379 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
380 @for i in
$(TARGETS
) ; do \
381 echo
"building $(canonhost) cross to $$i" ; \
382 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(natlog
) && \
383 echo
" completed successfully" ; \
387 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
388 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
389 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
390 @for i in
$(TARGETS
) ; do \
391 echo
"building $(canonhost) cross to $$i" ; \
392 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build
=$(build
) do-cygnus
$(cyglog
) && \
393 echo
" completed successfully" ; \
397 $(MAKE
) -f build-all.mk build
=$(host
) host
=i386-go32 all-dos
399 @for i in
$(TARGETS
) ; do \
400 echo
"building $(canonhost) cross to $$i" ; \
401 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) host
=$(host
) target
=$$i do-dos
$(cyglog
) && \
402 echo
" completed successfully at `date`" ; \
406 @for i in
$(TARGETS
) ; do \
407 if
[ "$$i" = "native" ] ; then \
408 echo
"config stage1 for $(canonhost)" ; \
409 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-config
$(log
) && \
410 echo
" completed successfully" ; \
412 echo
"config $(canonhost) cross to $$i" ; \
413 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(cyglog
) && \
414 echo
" completed successfully" ; \
420 @for i in
$(TARGETS
) ; do \
421 if
[ "$$i" = "native" ] ; then \
422 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-build
$(log
) && \
423 echo
" completed successfully" ; \
425 echo
"building $(canonhost) cross to $$i" ; \
426 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(natlog
) && \
427 echo
" completed successfully" ; \
433 @for i in
$(TARGETS
) ; do \
434 if
[ "$$i" = "native" ] ; then \
435 echo
"building 3stage for $(canonhost)" ; \
436 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) all $(log
) && \
437 echo
" completed successfully" ; \
439 echo
"building $(canonhost) cross to $$i" ; \
440 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
441 echo
" completed successfully" ; \
446 @for i in
$(TARGETS
) ; do \
447 if
[ "$$i" = "native" ] ; then \
448 echo
"building 3stage for $(canonhost)" ; \
449 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
450 echo
" completed successfully" ; \
452 echo
"building $(canonhost) cross to $$i" ; \
453 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(cyglog
) && \
454 echo
" completed successfully" ; \
459 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) clean $(log
)