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
113 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
114 TARGETS = $(NATIVE) \
120 i960-vxworks5.0 i960-vxworks5.1 \
121 mips-idt-ecoff mips64-elf mips-elf \
122 m68k-aout m68k-vxworks m68k-coff \
125 sparc-aout sparc-lynx sparc-vxworks \
126 sparclite-aout sparclite-vxworks \
127 sparclite-coff z8k-coff
132 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
133 TARGETS = $(NATIVE) \
135 GCC = gcc -O2 -msoft-float
140 ifeq ($(canonhost),sparc-sun-solaris2)
141 TARGETS = $(NATIVE) \
143 i960-vxworks5.0 i960-vxworks5.1 \
144 m68k-aout m68k-coff m68k-vxworks \
145 mipsel-idt-ecoff sparc-lynx \
146 sparclite-aout sparclite-coff m88k-coff z8k-coff
152 ifeq ($(canonhost),mips-dec-ultrix)
153 TARGETS = $(NATIVE) m68k-aout
158 ifeq ($(canonhost),alpha-dec-osf1.3)
164 ifeq ($(canonhost),mips-sgi-irix4)
165 TARGETS = $(NATIVE) \
166 mips-idt-ecoff sh-hms \
168 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
172 ifeq ($(canonhost),mips-sgi-irix5)
173 TARGETS = $(NATIVE) \
174 mips-idt-ecoff sh-hms \
176 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
180 ifeq ($(canonhost),rs6000-ibm-aix)
181 TARGETS = $(NATIVE) \
182 i960-vxworks5.0 i960-vxworks5.1 \
187 ifeq ($(canonhost),m68k-hp-hpux)
188 TARGETS = $(NATIVE) m68k-aout
189 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
196 ifeq ($(canonhost),hppa1.1-hp-hpux)
199 i960-vxworks5.0 i960-vxworks5.1 \
200 m68k-aout m68k-coff m68k-vxworks \
208 ifeq ($(canonhost),i386-sco3.2v4)
209 TARGETS = $(NATIVE) i386-aout
213 ifeq ($(canonhost),i386-go32)
218 m68k-aout m68k-coff \
223 GCC = i386-go32-gcc -O2
226 MAKEINFOFLAGS = --no-split
230 ifeq ($(canonhost),i386-sysv4.2)
231 TARGETS = $(NATIVE) i386-netware
236 ifeq ($(canonhost),i386-lynx)
238 CC = /usr/cygnus/progressive/bin/gcc
243 ifeq ($(canonhost),m68k-lynx)
245 CC = /usr/cygnus/progressive/bin/gcc
250 ifeq ($(canonhost),sparc-lynx)
252 CC = /usr/cygnus/progressive/bin/gcc
257 ifeq ($(canonhost),rs6000-lynx)
259 CC = /usr/cygnus/progressive/bin/gcc
268 "CXXFLAGS=$(CXXFLAGS)" \
269 "host=$(canonhost)" \
270 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
271 "RELEASE_TAG=$(RELEASE_TAG)" \
274 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
275 ifeq ($(patsubst %-lynx,lynx,$(canonhost)),lynx)
276 FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
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) do1 > $(canonhost)-emacs-native-log 2>&1
285 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
289 @echo build started at `date`
290 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
291 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
293 # The following line to be used during regular progressive builds
294 # to help developers test, but should be commented out for final
297 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
298 @for i in $(TARGETS) ; do \
299 if [ "$$i" = "native" ] ; then \
300 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
301 echo "3staging $(canonhost) native" ; \
302 echo Flags passed to make: $(FLAGS_TO_PASS) ; \
303 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
304 echo " completed successfully" ; \
309 echo "building $(canonhost) cross to $$i" ; \
310 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
311 echo " completed successfully" ; \
314 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
315 echo checking $(canonhost) native ; \
316 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
317 touch $(canonhost)-stamp-3stage-checked ; \
324 @echo build started at `date`
325 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
326 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
327 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
328 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
332 @echo build started at `date`
333 @for i in $(TARGETS) ; do \
334 if [ "$$i" = "native" ] ; then \
335 if [ ! -f $(canonhost)-3stage-done ] ; then \
336 echo "3staging $(canonhost) native" ; \
337 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
338 echo " completed successfully" ; \
341 echo "building $(canonhost) cross to $$i:" `date` ; \
342 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
343 echo " completed successfully" ; \
349 @echo build started at `date`
350 @for i in $(TARGETS) ; do \
351 if [ "$$i" != "native" ] ; then \
352 echo "building $(canonhost) cross to $$i:" `date` ; \
353 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
354 echo " completed successfully" ; \
360 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
361 rm -f $(ROOTING)/$(RELEASE_TAG)
362 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
363 @for i in $(TARGETS) ; do \
364 echo "building $(canonhost) cross to $$i" ; \
365 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
366 echo " completed successfully" ; \
370 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
371 rm -f $(ROOTING)/$(RELEASE_TAG)
372 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
373 @for i in $(TARGETS) ; do \
374 echo "building $(canonhost) cross to $$i" ; \
375 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
376 echo " completed successfully" ; \
380 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
382 @for i in $(TARGETS) ; do \
383 echo "building $(canonhost) cross to $$i" ; \
384 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \
385 echo " completed successfully at `date`" ; \
389 @for i in $(TARGETS) ; do \
390 if [ "$$i" = "native" ] ; then \
391 echo "config stage1 for $(canonhost)" ; \
392 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
393 echo " completed successfully" ; \
395 echo "config $(canonhost) cross to $$i" ; \
396 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
397 echo " completed successfully" ; \
403 @for i in $(TARGETS) ; do \
404 if [ "$$i" = "native" ] ; then \
405 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
406 echo " completed successfully" ; \
408 echo "building $(canonhost) cross to $$i" ; \
409 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
410 echo " completed successfully" ; \
416 @for i in $(TARGETS) ; do \
417 if [ "$$i" = "native" ] ; then \
418 echo "building 3stage for $(canonhost)" ; \
419 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
420 echo " completed successfully" ; \
422 echo "building $(canonhost) cross to $$i" ; \
423 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
424 echo " completed successfully" ; \
429 @for i in $(TARGETS) ; do \
430 if [ "$$i" = "native" ] ; then \
431 echo "building 3stage for $(canonhost)" ; \
432 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
433 echo " completed successfully" ; \
435 echo "building $(canonhost) cross to $$i" ; \
436 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
437 echo " completed successfully" ; \
442 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)