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
)
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-linuxelf
)
123 canonhost
:= i386-linuxelf
125 ifeq ($(canonhost
),i486-unknown-linuxelf
)
126 canonhost
:= i486-linuxelf
128 ifeq ($(canonhost
),i586-unknown-linuxelf
)
129 canonhost
:= i486-linuxelf
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
) \
147 i960-vxworks5.0 i960-vxworks5.1 \
148 mips-idt-ecoff mips64-elf mips-elf \
149 m68k-aout m68k-vxworks m68k-coff \
152 sparc-aout sparc-lynx sparc-vxworks \
153 sparclite-aout sparclite-vxworks \
154 sparclite-coff z8k-coff \
155 OSE68000 OSE68k mips-ncd-elf
156 # The OSE68000 and OSE68k targets are for Ericsson only;
157 # the mips-ncd-elf target is for NCD only.
162 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
163 TARGETS
= $(NATIVE
) \
165 GCC
= gcc
-O2
-msoft-float
170 ifeq ($(canonhost
),sparc-sun-solaris2
)
171 TARGETS
= $(NATIVE
) \
173 i960-vxworks5.0 i960-vxworks5.1 \
174 m68k-aout m68k-coff m68k-vxworks \
175 mipsel-idt-ecoff sparc-lynx \
176 sparclite-aout sparclite-coff m88k-coff z8k-coff \
179 # The latter assures that BNR's special build (which they now
180 # do for themselves from sources) hasn't developed bit-rot.
181 # The OSE68000 and OSE68k targets are for Ericsson only.
188 ifeq ($(canonhost
),mips-dec-ultrix
)
189 TARGETS
= $(NATIVE
) m68k-aout
194 ifeq ($(patsubst alpha-dec-osf
%,alpha
,$(canonhost
)),alpha
)
200 ifeq ($(canonhost
),mips-sgi-irix4
)
201 TARGETS
= $(NATIVE
) \
202 mips-idt-ecoff sh-hms \
204 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
208 ifeq ($(canonhost
),mips-sgi-irix5
)
209 TARGETS
= $(NATIVE
) \
210 mips-idt-ecoff sh-hms \
212 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
216 ifeq ($(canonhost
),rs6000-ibm-aix
)
217 TARGETS
= $(NATIVE
) \
218 i960-vxworks5.0 i960-vxworks5.1 \
223 ifeq ($(canonhost
),m68k-hp-hpux
)
224 TARGETS
= $(NATIVE
) m68k-aout
225 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
232 ifeq ($(canonhost
),hppa1.1
-hp-hpux
)
235 i960-vxworks5.0 i960-vxworks5.1 \
236 m68k-aout m68k-coff m68k-vxworks \
244 ifeq ($(canonhost
),i386-sco3.2v4
)
245 TARGETS
= $(NATIVE
) i386-aout
249 ifeq ($(canonhost
),i386-go32
)
254 m68k-aout m68k-coff \
259 GCC
= i386-go32-gcc
-O2
262 MAKEINFOFLAGS
= --no-split
266 ifeq ($(canonhost
),i386-sysv4.2
)
267 TARGETS
= $(NATIVE
) i386-netware
272 ifeq ($(canonhost
),i386-lynx
)
274 CC
= /usr
/cygnus
/progressive
/bin
/gcc
279 ifeq ($(canonhost
),m68k-lynx
)
281 CC
= /usr
/cygnus
/progressive
/bin
/gcc
286 ifeq ($(canonhost
),sparc-lynx
)
288 CC
= /usr
/cygnus
/progressive
/bin
/gcc
293 ifeq ($(canonhost
),rs6000-lynx
)
295 CC
= /usr
/cygnus
/progressive
/bin
/gcc
300 ifeq ($(patsubst %-linux
,linux
,$(patsubst %-linuxelf
,linux
,$(canonhost
))),linux
)
309 "GNUCFLAGS=$(GNUCFLAGS)" \
310 "CXXFLAGS=$(CXXFLAGS)" \
311 "host=$(canonhost)" \
312 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
313 "RELEASE_TAG=$(RELEASE_TAG)" \
316 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
317 ifeq ($(patsubst %-lynx
,lynx
,$(canonhost
)),lynx
)
318 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
321 ifeq ($(patsubst %-linux
,linux
,$(patsubst %-linuxelf
,linux
,$(canonhost
))),linux
)
322 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)"
326 @echo build started at
`date`
327 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
328 -rm -f
$(ROOTING
)/$(RELEASE_TAG
)
329 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
330 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1
> $(canonhost
)-emacs-native-log
2>&1
331 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do-latest
> $(canonhost
)-emacs-latest-log
2>&1
335 @echo build started at
`date`
336 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
337 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
339 # The following line to be used during regular progressive builds
340 # to help developers test, but should be commented out for final
343 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
344 @for i in
$(TARGETS
) ; do \
345 if
[ "$$i" = "native" ] ; then \
346 if
[ ! -f
$(canonhost
)-stamp-3stage-done
] ; then \
347 echo
"3staging $(canonhost) native" ; \
348 echo Flags passed to make
: $(FLAGS_TO_PASS
) ; \
349 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
350 echo
" completed successfully" ; \
355 echo
"building $(canonhost) cross to $$i" ; \
356 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(cyglog
) && \
357 echo
" completed successfully" ; \
360 @if
[ ! -f
$(canonhost
)-stamp-3stage-checked
] ; then \
361 echo checking
$(canonhost
) native
; \
362 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-check-3stage
$(clog
) ; \
363 touch
$(canonhost
)-stamp-3stage-checked
; \
370 @echo build started at
`date`
371 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
372 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
373 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
374 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
378 @echo build started at
`date`
379 @for i in
$(TARGETS
) ; do \
380 if
[ "$$i" = "native" ] ; then \
381 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
382 echo
"3staging $(canonhost) native" ; \
383 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
384 echo
" completed successfully" ; \
387 echo
"building $(canonhost) cross to $$i:" `date` ; \
388 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
389 echo
" completed successfully" ; \
395 @echo build started at
`date`
396 @for i in
$(TARGETS
) ; do \
397 if
[ "$$i" != "native" ] ; then \
398 echo
"building $(canonhost) cross to $$i:" `date` ; \
399 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(latestlog
) && \
400 echo
" completed successfully" ; \
406 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
407 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
408 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
409 @for i in
$(TARGETS
) ; do \
410 echo
"building $(canonhost) cross to $$i" ; \
411 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(natlog
) && \
412 echo
" completed successfully" ; \
416 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
417 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
418 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
419 @for i in
$(TARGETS
) ; do \
420 echo
"building $(canonhost) cross to $$i" ; \
421 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build
=$(build
) do-cygnus
$(cyglog
) && \
422 echo
" completed successfully" ; \
426 $(MAKE
) -f build-all.mk build
=$(host
) host
=i386-go32 all-dos
428 @for i in
$(TARGETS
) ; do \
429 echo
"building $(canonhost) cross to $$i" ; \
430 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) host
=$(host
) target
=$$i do-dos
$(cyglog
) && \
431 echo
" completed successfully at `date`" ; \
435 @for i in
$(TARGETS
) ; do \
436 if
[ "$$i" = "native" ] ; then \
437 echo
"config stage1 for $(canonhost)" ; \
438 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-config
$(log
) && \
439 echo
" completed successfully" ; \
441 echo
"config $(canonhost) cross to $$i" ; \
442 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(cyglog
) && \
443 echo
" completed successfully" ; \
449 @for i in
$(TARGETS
) ; do \
450 if
[ "$$i" = "native" ] ; then \
451 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-build
$(log
) && \
452 echo
" completed successfully" ; \
454 echo
"building $(canonhost) cross to $$i" ; \
455 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(natlog
) && \
456 echo
" completed successfully" ; \
462 @for i in
$(TARGETS
) ; do \
463 if
[ "$$i" = "native" ] ; then \
464 echo
"building 3stage for $(canonhost)" ; \
465 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) all $(log
) && \
466 echo
" completed successfully" ; \
468 echo
"building $(canonhost) cross to $$i" ; \
469 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
470 echo
" completed successfully" ; \
475 @for i in
$(TARGETS
) ; do \
476 if
[ "$$i" = "native" ] ; then \
477 echo
"building 3stage for $(canonhost)" ; \
478 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
479 echo
" completed successfully" ; \
481 echo
"building $(canonhost) cross to $$i" ; \
482 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(cyglog
) && \
483 echo
" completed successfully" ; \
488 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) clean $(log
)