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
= /tug
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
104 ifeq ($(canonhost
),sparc-sun-sunos4.1
.3)
105 TARGETS
= $(NATIVE
) \
113 m68k-aout m68k-vxworks m68k-coff \
116 sparc-aout sparc-vxworks \
117 sparclite-aout sparclite-vxworks \
118 sparclite-coff z8k-coff
123 ifeq ($(canonhost
),m68k-sun-sunos4.1
.1)
124 TARGETS
= $(NATIVE
) \
126 GCC
= gcc
-O
-msoft-float
131 ifeq ($(canonhost
),sparc-sun-solaris2
)
132 TARGETS
= $(NATIVE
) \
135 m68k-aout m68k-coff m68k-vxworks \
144 ifeq ($(canonhost
),mips-dec-ultrix
)
145 TARGETS
= $(NATIVE
) m68k-aout
150 ifeq ($(canonhost
),mips-sgi-irix4
)
151 TARGETS
= $(NATIVE
) \
152 mips-idt-ecoff sh-hms
153 CC
= cc -cckr
-Wf
,-XNg1500
-Wf
,-XNk1000
-Wf
,-XNh2000
157 ifeq ($(canonhost
),rs6000-ibm-aix
)
158 TARGETS
= $(NATIVE
) \
164 ifeq ($(canonhost
),m68k-hp-hpux
)
165 TARGETS
= $(NATIVE
) m68k-aout
166 TMPDIR
:= $(shell mkdir
$(canonhost
)-tmpdir
; cd
$(canonhost
)-tmpdir
; pwd
)
173 ifeq ($(canonhost
),hppa1.1
-hp-hpux
)
177 m68k-aout m68k-vxworks
184 ifeq ($(canonhost
),i386-sco3.2v4
)
185 TARGETS
= $(NATIVE
) i386-aout
189 ifeq ($(canonhost
),i386-go32
)
194 m68k-aout m68k-coff \
199 GCC
= i386-go32-gcc
-O
202 MAKEINFOFLAGS
= --no-split
206 ifeq ($(canonhost
),i386-sysv4.2
)
207 TARGETS
= $(NATIVE
) i386-netware
212 ifeq ($(canonhost
),i386-lynx
)
219 ifeq ($(canonhost
),m68k-lynx
)
230 "CXXFLAGS=$(CXXFLAGS)" \
231 "host=$(canonhost)" \
232 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
233 "RELEASE_TAG=$(RELEASE_TAG)" \
236 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
237 ifeq ($(patsubst %-lynxos
,lynxos
,$(canonhost
)),lynxos
)
238 FLAGS_TO_PASS
:= $(FLAGS_TO_PASS
) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
242 @echo build started at
`date`
243 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
244 -rm -f
$(ROOTING
)/$(RELEASE_TAG
)
245 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
246 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1
> $(canonhost
)-emacs-native-log
2>&1
247 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do-latest
> $(canonhost
)-emacs-latest-log
2>&1
251 @echo build started at
`date`
252 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
253 -rm -f
$(ROOTING
)/$(RELEASE_TAG
) && ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
254 @for i in
$(TARGETS
) ; do \
255 if
[ "$$i" = "native" ] ; then \
256 if
[ ! -f
$(canonhost
)-stamp-3stage-done
] ; then \
257 echo
"3staging $(canonhost) native" ; \
258 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
259 echo
" completed successfully" ; \
264 echo
"building $(canonhost) cross to $$i" ; \
265 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-cygnus
$(cyglog
) && \
266 echo
" completed successfully" ; \
269 @if
[ ! -f
$(canonhost
)-stamp-3stage-checked
] ; then \
270 echo checking
$(canonhost
) native
; \
271 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-check-3stage
$(clog
) ; \
272 touch
$(canonhost
)-stamp-3stage-checked
; \
279 @echo build started at
`date`
280 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
281 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
282 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
283 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
)
287 @echo build started at
`date`
288 @for i in
$(TARGETS
) ; do \
289 if
[ "$$i" = "native" ] ; then \
290 if
[ ! -f
$(canonhost
)-3stage-done
] ; then \
291 echo
"3staging $(canonhost) native" ; \
292 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
293 echo
" completed successfully" ; \
296 echo
"building $(canonhost) cross to $$i:" `date` ; \
297 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
298 echo
" completed successfully" ; \
304 @echo build started at
`date`
305 @for i in
$(TARGETS
) ; do \
306 if
[ "$$i" != "native" ] ; then \
307 echo
"building $(canonhost) cross to $$i:" `date` ; \
308 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(latestlog
) && \
309 echo
" completed successfully" ; \
315 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
316 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
317 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
318 @for i in
$(TARGETS
) ; do \
319 echo
"building $(canonhost) cross to $$i" ; \
320 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native
$(natlog
) && \
321 echo
" completed successfully" ; \
325 [ -d
$(INSTALLDIR
) ] || mkdir
$(INSTALLDIR
)
326 rm -f
$(ROOTING
)/$(RELEASE_TAG
)
327 ln
-s
$(INSTALLDIR
) $(ROOTING
)/$(RELEASE_TAG
)
328 @for i in
$(TARGETS
) ; do \
329 echo
"building $(canonhost) cross to $$i" ; \
330 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build
=$(build
) do-cygnus
$(cyglog
) && \
331 echo
" completed successfully" ; \
335 $(MAKE
) -f build-all.mk build
=$(host
) host
=i386-go32 all-dos
337 @for i in
$(TARGETS
) ; do \
338 echo
"building $(canonhost) cross to $$i" ; \
339 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) host
=$(host
) target
=$$i do-dos
$
341 echo
" completed successfully at `date`" ; \
345 @for i in
$(TARGETS
) ; do \
346 if
[ "$$i" = "native" ] ; then \
347 echo
"config stage1 for $(canonhost)" ; \
348 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-config
$(log
) && \
349 echo
" completed successfully" ; \
351 echo
"config $(canonhost) cross to $$i" ; \
352 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i do-native-config
$(cyglog
) && \
353 echo
" completed successfully" ; \
359 @for i in
$(TARGETS
) ; do \
360 if
[ "$$i" = "native" ] ; then \
361 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) do1-build
$(log
) && \
362 echo
" completed successfully" ; \
364 echo
"building $(canonhost) cross to $$i" ; \
365 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-native
$(natlog
) && \
366 echo
" completed successfully" ; \
372 @for i in
$(TARGETS
) ; do \
373 if
[ "$$i" = "native" ] ; then \
374 echo
"building 3stage for $(canonhost)" ; \
375 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) all $(log
) && \
376 echo
" completed successfully" ; \
378 echo
"building $(canonhost) cross to $$i" ; \
379 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-cygnus
$(cyglog
) && \
380 echo
" completed successfully" ; \
385 @for i in
$(TARGETS
) ; do \
386 if
[ "$$i" = "native" ] ; then \
387 echo
"building 3stage for $(canonhost)" ; \
388 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) $(canonhost
)-stamp-3stage-done
$(log
) && \
389 echo
" completed successfully" ; \
391 echo
"building $(canonhost) cross to $$i" ; \
392 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) target
=$$i build-latest
$(cyglog
) && \
393 echo
" completed successfully" ; \
398 $(MAKE
) -f test-build.mk
$(FLAGS_TO_PASS
) clean $(log
)