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)
33 # To configure/build for fewer targets, specify TARGETS="native cross1 ...".
36 include $(TREE)/release-info
38 TEST_INSTALL_DISK = /tug
40 INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
43 host := $(shell $(TREE)/config.guess)
53 log = 1>$(canonhost)-build-log 2>&1
54 clog = 1>$(canonhost)-check-log 2>&1
55 cyglog = 1> $(canonhost)-x-$$i-cygnus-build-log 2>&1
56 latestlog = 1> $(canonhost)-x-$$i-latest-build-log 2>&1
57 natlog = 1> $(canonhost)-x-$$i-native-build-log 2>&1
59 canonhost := $(shell $(TREE)/config.sub $(host))
61 # Convert config.guess results to a simpler form.
62 ifeq ($(canonhost),sparc-sun-solaris2.1)
63 canonhost := sparc-sun-solaris2
65 ifeq ($(canonhost),sparc-sun-solaris2.3)
66 canonhost := sparc-sun-solaris2
68 ifeq ($(canonhost),mips-dec-ultrix4.2)
69 canonhost := mips-dec-ultrix
71 ifeq ($(canonhost),mips-sgi-irix4.0.1)
72 canonhost := mips-sgi-irix4
74 ifeq ($(canonhost),mips-sgi-irix4.0.5H)
75 canonhost := mips-sgi-irix4
77 ifeq ($(canonhost),rs6000-ibm-aix3.2)
78 canonhost := rs6000-ibm-aix
80 ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
81 canonhost := i386-sco3.2v4
83 ifeq ($(canonhost),i386-unknown-sco3.2v4.0)
84 canonhost := i386-sco3.2v4
86 ifeq ($(canonhost),i386-unknown-sco3.2v4)
87 canonhost := i386-sco3.2v4
89 ifeq ($(canonhost),i386-unknown-go32)
90 canonhost := i386-go32
92 ifeq ($(canonhost),i386-unknown-sysv4.2)
93 canonhost := i386-sysv4.2
95 ifeq ($(canonhost),i386-lynx-lynxos)
96 canonhost := i386-lynxos
98 ifeq ($(canonhost),m68k-lynx-lynxos)
99 canonhost := m68k-lynxos
102 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
103 TARGETS = $(NATIVE) \
110 i960-vxworks i960-intel-nindy \
112 m68k-aout m68k-vxworks m68k-coff \
115 sparc-aout sparc-vxworks \
116 sparclite-aout sparclite-vxworks \
122 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
123 TARGETS = $(NATIVE) \
124 m68k-aout m68k-coff i960-intel-nindy
125 GCC = gcc -O -msoft-float
130 ifeq ($(canonhost),sparc-sun-solaris2)
131 TARGETS = $(NATIVE) \
134 i960-vxworks i960-intel-nindy \
135 m68k-aout m68k-coff m68k-vxworks \
137 mips-idt-ecoff mipsel-idt-ecoff \
138 sparc-aout sparc-vxworks sparclite-aout
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,-XNh1500
157 ifeq ($(canonhost),rs6000-ibm-aix)
158 TARGETS = $(NATIVE) \
159 i960-vxworks i960-intel-nindy \
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)
212 ifeq ($(canonhost),i386-lynxos)
219 ifeq ($(canonhost),m68k-lynxos)
231 "CXXFLAGS=$(CXXFLAGS)" \
232 "host=$(canonhost)" \
233 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
234 "RELEASE_TAG=$(RELEASE_TAG)" \
237 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
238 ifeq ($(patsubst %-lynxos,lynxos,$(canonhost)),lynxos)
239 FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
243 @echo build started at `date`
244 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
245 -rm -f $(ROOTING)/$(RELEASE_TAG)
246 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
247 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
248 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
252 @echo build started at `date`
253 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
254 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
255 @for i in $(TARGETS) ; do \
256 if [ "$$i" = "native" ] ; then \
257 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
258 echo "3staging $(canonhost) native" ; \
259 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
260 echo " completed successfully" ; \
265 echo "building $(canonhost) cross to $$i" ; \
266 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
267 echo " completed successfully" ; \
270 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
271 echo checking $(canonhost) native ; \
272 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
273 touch $(canonhost)-stamp-3stage-checked ; \
280 @echo build started at `date`
281 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
282 rm -f $(ROOTING)/$(RELEASE_TAG)
283 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
284 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
288 @echo build started at `date`
289 @for i in $(TARGETS) ; do \
290 if [ "$$i" = "native" ] ; then \
291 if [ ! -f $(canonhost)-3stage-done ] ; then \
292 echo "3staging $(canonhost) native" ; \
293 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
294 echo " completed successfully" ; \
297 echo "building $(canonhost) cross to $$i:" `date` ; \
298 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
299 echo " completed successfully" ; \
305 @echo build started at `date`
306 @for i in $(TARGETS) ; do \
307 if [ "$$i" != "native" ] ; then \
308 echo "building $(canonhost) cross to $$i:" `date` ; \
309 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
310 echo " completed successfully" ; \
316 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
317 rm -f $(ROOTING)/$(RELEASE_TAG)
318 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
319 @for i in $(TARGETS) ; do \
320 echo "building $(canonhost) cross to $$i" ; \
321 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
322 echo " completed successfully" ; \
326 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
327 rm -f $(ROOTING)/$(RELEASE_TAG)
328 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
329 @for i in $(TARGETS) ; do \
330 echo "building $(canonhost) cross to $$i" ; \
331 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
332 echo " completed successfully" ; \
336 @for i in $(TARGETS) ; do \
337 if [ "$$i" = "native" ] ; then \
338 echo "config stage1 for $(canonhost)" ; \
339 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
340 echo " completed successfully" ; \
342 echo "config $(canonhost) cross to $$i" ; \
343 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
344 echo " completed successfully" ; \
350 @for i in $(TARGETS) ; do \
351 if [ "$$i" = "native" ] ; then \
352 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
353 echo " completed successfully" ; \
355 echo "building $(canonhost) cross to $$i" ; \
356 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
357 echo " completed successfully" ; \
363 @for i in $(TARGETS) ; do \
364 if [ "$$i" = "native" ] ; then \
365 echo "building 3stage for $(canonhost)" ; \
366 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
367 echo " completed successfully" ; \
369 echo "building $(canonhost) cross to $$i" ; \
370 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
371 echo " completed successfully" ; \
376 @for i in $(TARGETS) ; do \
377 if [ "$$i" = "native" ] ; then \
378 echo "building 3stage for $(canonhost)" ; \
379 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
380 echo " completed successfully" ; \
382 echo "building $(canonhost) cross to $$i" ; \
383 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
384 echo " completed successfully" ; \