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 = /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),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
103 ifeq ($(canonhost),sparc-lynx-lynxos)
104 canonhost := sparc-lynx
106 ifeq ($(canonhost),rs6000-lynx-lynxos)
107 canonhost := rs6000-lynx
110 ifeq ($(canonhost),sparc-sun-sunos4.1.3)
111 TARGETS = $(NATIVE) \
118 mips-idt-ecoff mips64-elf mips-elf \
119 m68k-aout m68k-vxworks m68k-coff \
122 sparc-aout sparc-lynx sparc-vxworks \
123 sparclite-aout sparclite-vxworks \
124 sparclite-coff z8k-coff
129 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
130 TARGETS = $(NATIVE) \
132 GCC = gcc -O2 -msoft-float
137 ifeq ($(canonhost),sparc-sun-solaris2)
138 TARGETS = $(NATIVE) \
141 m68k-aout m68k-coff m68k-vxworks \
143 mipsel-idt-ecoff sparc-lynx
149 ifeq ($(canonhost),mips-dec-ultrix)
150 TARGETS = $(NATIVE) m68k-aout
155 ifeq ($(canonhost),mips-sgi-irix4)
156 TARGETS = $(NATIVE) \
157 mips-idt-ecoff sh-hms \
159 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh2000
163 ifeq ($(canonhost),rs6000-ibm-aix)
164 TARGETS = $(NATIVE) \
170 ifeq ($(canonhost),m68k-hp-hpux)
171 TARGETS = $(NATIVE) m68k-aout
172 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
179 ifeq ($(canonhost),hppa1.1-hp-hpux)
182 i960-vxworks m68k-aout \
183 m68k-coff m68k-vxworks
190 ifeq ($(canonhost),i386-sco3.2v4)
191 TARGETS = $(NATIVE) i386-aout
195 ifeq ($(canonhost),i386-go32)
200 m68k-aout m68k-coff \
205 GCC = i386-go32-gcc -O2
208 MAKEINFOFLAGS = --no-split
212 ifeq ($(canonhost),i386-sysv4.2)
213 TARGETS = $(NATIVE) i386-netware
218 ifeq ($(canonhost),i386-lynx)
220 CC = /usr/cygnus/progressive/bin/gcc
225 ifeq ($(canonhost),m68k-lynx)
227 CC = /usr/cygnus/progressive/bin/gcc
232 ifeq ($(canonhost),sparc-lynx)
234 CC = /usr/cygnus/progressive/bin/gcc
239 ifeq ($(canonhost),rs6000-lynx)
241 CC = /usr/cygnus/progressive/bin/gcc
250 "CXXFLAGS=$(CXXFLAGS)" \
251 "host=$(canonhost)" \
252 "MAKEINFOFLAGS=$(MAKEINFOFLAGS)" \
253 "RELEASE_TAG=$(RELEASE_TAG)" \
256 # set GNU_MAKE and CONFIG_SHELL correctly in sub-builds
257 ifeq ($(patsubst %-lynxos,lynxos,$(canonhost)),lynxos)
258 FLAGS_TO_PASS := $(FLAGS_TO_PASS) "GNU_MAKE=$(MAKE)" "CONFIG_SHELL=/bin/bash"
262 @echo build started at `date`
263 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
264 -rm -f $(ROOTING)/$(RELEASE_TAG)
265 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
266 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-emacs-native-log 2>&1
267 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-emacs-latest-log 2>&1
271 @echo build started at `date`
272 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
273 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
275 # The following line to be used during regular progressive builds
276 # to help developers test, but should be commented out for final
279 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progresssive
280 @for i in $(TARGETS) ; do \
281 if [ "$$i" = "native" ] ; then \
282 if [ ! -f $(canonhost)-stamp-3stage-done ] ; then \
283 echo "3staging $(canonhost) native" ; \
284 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
285 echo " completed successfully" ; \
290 echo "building $(canonhost) cross to $$i" ; \
291 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(cyglog) && \
292 echo " completed successfully" ; \
295 @if [ ! -f $(canonhost)-stamp-3stage-checked ] ; then \
296 echo checking $(canonhost) native ; \
297 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-check-3stage $(clog) ; \
298 touch $(canonhost)-stamp-3stage-checked ; \
305 @echo build started at `date`
306 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
307 -rm -f $(ROOTING)/$(RELEASE_TAG) && ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
308 # -rm -f $(ROOTING)/progressive-beta && ln -s $(RELEASE_TAG) $(ROOTING)/progressive-beta
309 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
313 @echo build started at `date`
314 @for i in $(TARGETS) ; do \
315 if [ "$$i" = "native" ] ; then \
316 if [ ! -f $(canonhost)-3stage-done ] ; then \
317 echo "3staging $(canonhost) native" ; \
318 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
319 echo " completed successfully" ; \
322 echo "building $(canonhost) cross to $$i:" `date` ; \
323 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
324 echo " completed successfully" ; \
330 @echo build started at `date`
331 @for i in $(TARGETS) ; do \
332 if [ "$$i" != "native" ] ; then \
333 echo "building $(canonhost) cross to $$i:" `date` ; \
334 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(latestlog) && \
335 echo " completed successfully" ; \
341 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
342 rm -f $(ROOTING)/$(RELEASE_TAG)
343 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
344 @for i in $(TARGETS) ; do \
345 echo "building $(canonhost) cross to $$i" ; \
346 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(natlog) && \
347 echo " completed successfully" ; \
351 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
352 rm -f $(ROOTING)/$(RELEASE_TAG)
353 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
354 @for i in $(TARGETS) ; do \
355 echo "building $(canonhost) cross to $$i" ; \
356 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(cyglog) && \
357 echo " completed successfully" ; \
361 $(MAKE) -f build-all.mk build=$(host) host=i386-go32 all-dos
363 @for i in $(TARGETS) ; do \
364 echo "building $(canonhost) cross to $$i" ; \
365 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) target=$$i do-dos $(cyglog) && \
366 echo " completed successfully at `date`" ; \
370 @for i in $(TARGETS) ; do \
371 if [ "$$i" = "native" ] ; then \
372 echo "config stage1 for $(canonhost)" ; \
373 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
374 echo " completed successfully" ; \
376 echo "config $(canonhost) cross to $$i" ; \
377 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(cyglog) && \
378 echo " completed successfully" ; \
384 @for i in $(TARGETS) ; do \
385 if [ "$$i" = "native" ] ; then \
386 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
387 echo " completed successfully" ; \
389 echo "building $(canonhost) cross to $$i" ; \
390 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(natlog) && \
391 echo " completed successfully" ; \
397 @for i in $(TARGETS) ; do \
398 if [ "$$i" = "native" ] ; then \
399 echo "building 3stage for $(canonhost)" ; \
400 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
401 echo " completed successfully" ; \
403 echo "building $(canonhost) cross to $$i" ; \
404 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(cyglog) && \
405 echo " completed successfully" ; \
410 @for i in $(TARGETS) ; do \
411 if [ "$$i" = "native" ] ; then \
412 echo "building 3stage for $(canonhost)" ; \
413 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
414 echo " completed successfully" ; \
416 echo "building $(canonhost) cross to $$i" ; \
417 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-latest $(cyglog) && \
418 echo " completed successfully" ; \
423 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) clean $(log)