Remove sh sanitization comments.
[deliverable/binutils-gdb.git] / build-all.mk
1 # Build all of the targets for any given host.....
2 #
3 # This file is going to be ugly. It will be VERY specific to the
4 # Cygnus environment and build-process.
5 #
6 #
7
8 TREE = devo
9 include $(TREE)/release-info
10
11 TEST_INSTALL_DISK = /cirdan/abc
12
13 INSTALLDIR = $(TEST_INSTALL_DISK)/$(TREE)-test/$(RELEASE_TAG)
14
15 ifndef host
16 host := $(shell $(TREE)/config.guess)
17 endif
18
19 NATIVE = native
20
21 GCC = gcc -O
22 CFLAGS = -g
23
24 log = 1>$(canonhost)-build-log 2>&1
25 tlog = 1> $(canonhost)-x-$$i-build-log 2>&1
26
27 canonhost := $(shell $(TREE)/config.sub $(host))
28
29 # Convert config.guess results to a simpler form.
30 ifeq ($(canonhost),sparc-sun-solaris2.1)
31 canonhost := sparc-sun-solaris2
32 endif
33 ifeq ($(canonhost),mips-dec-ultrix4.2)
34 canonhost := mips-dec-ultrix
35 endif
36 ifeq ($(canonhost),mips-sgi-irix4.0.1)
37 canonhost := mips-sgi-irix4
38 endif
39 ifeq ($(canonhost),rs6000-ibm-aix3.2)
40 canonhost := rs6000-ibm-aix
41 endif
42 ifeq ($(canonhost),i486-unknown-sco3.2v4.0)
43 canonhost := i386-sco3.2v4
44 endif
45 ifeq ($(canonhost),i386-unknown-go32)
46 canonhost := i386-go32
47 endif
48
49 ifeq ($(canonhost),sparc-sun-sunos4.1.1)
50 TARGETS = $(NATIVE) i386-go32 m68k-aout m68k-vxworks \
51 i960-intel-nindy i386-aout a29k-amd-udi \
52 sparc-vxworks m68k-coff i960-vxworks sparc-aout \
53 sparclite-aout sparclitefrwcompat-aout h8300-hms \
54 z8k-sim mips-idt-ecoff
55 all: all-cygnus
56 endif
57
58 ifeq ($(canonhost),m68k-sun-sunos4.1.1)
59 TARGETS = $(NATIVE) m68k-aout m68k-vxworks m68k-coff
60 GCC = gcc -O -msoft-float
61 CC = cc -J
62 all: all-cygnus
63 endif
64
65 ifeq ($(canonhost),sparc-sun-solaris2)
66 TARGETS = $(NATIVE) m68k-vxworks m68k-aout sparc-aout mips-idt-ecoff
67 CC = cc -Xs
68 all: all-cygnus
69 endif
70
71 ifeq ($(canonhost),mips-dec-ultrix)
72 TARGETS = $(NATIVE) m68k-aout
73 # TARGETS = $(NATIVE) m68k-vxworks m68k-aout i960-vxworks \
74 # sparc-vxworks m68k-coff i386-aout sparc-aout i960-intel-nindy
75 CC = cc -Wf,-XNg1000
76 all: all-cygnus
77 endif
78
79 ifeq ($(canonhost),mips-sgi-irix4)
80 TARGETS = $(NATIVE) m68k-vxworks
81 CC = cc -cckr -Wf,-XNg1500 -Wf,-XNk1000 -Wf,-XNh1500
82 all: all-cygnus
83 endif
84
85 ifeq ($(canonhost),rs6000-ibm-aix)
86 TARGETS = $(NATIVE) m68k-aout m68k-vxworks i960-vxworks
87 all: all-cygnus
88 endif
89
90 ifeq ($(canonhost),m68k-hp-hpux)
91 TARGETS = $(NATIVE) m68k-vxworks
92 TMPDIR := $(shell mkdir $(canonhost)-tmpdir; cd $(canonhost)-tmpdir ; pwd)
93 CC = cc +O1000 -Wp,-P
94 CFLAGS =
95 all: all-cygnus
96 endif
97
98 ifeq ($(canonhost),hppa1.1-hp-hpux)
99 TARGETS = i960-vxworks m68k-aout m68k-vxworks m68k-hp-hpux
100 #TARGETS = m68k-aout m68k-coff m68k-vxworks i960-vxworks a29k-amd-udi
101 #TARGETS = m68k-aout i386-aout a29k-amd-udi \
102 # i960-vxworks m68k-coff m68k-vxworks \
103 # sparc-aout sparc-vxworks \
104 # sparclite-aout sparclitefrwcompat-aout
105 CC = cc
106 all: all-native
107 endif
108
109 ifeq ($(canonhost),i386-sco3.2v4)
110 TARGETS = $(NATIVE) i386-aout
111 all: all-cygnus
112 endif
113
114 ifeq ($(canonhost),i386-go32)
115 TARGETS = m68k-aout a29k-amd-udi m68k-coff i386-aout sparclite-aout \
116 h8300-sim mips-idt-ecoff
117 ifndef build
118 build := $(shell $(TREE)/config.guess)
119 endif
120 CC = i386-go32-gcc
121 GCC = i386-go32-gcc -O
122 all: all-cross
123 endif
124
125 FLAGS_TO_PASS := \
126 "GCC=$(GCC)" \
127 "CC=$(CC)" \
128 "CFLAGS=$(CFLAGS)" \
129 "host=$(canonhost)" \
130 "RELEASE_TAG=$(RELEASE_TAG)"
131
132 all-emacs:
133 @echo build started at `date`
134 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
135 rm -f $(ROOTING)/$(RELEASE_TAG)
136 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
137 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1 > $(canonhost)-native-log 2>&1
138 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do-latest > $(canonhost)-latest-log 2>&1
139 @echo done at `date`
140
141 all-cygnus:
142 @echo build started at `date`
143 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
144 rm -f $(ROOTING)/$(RELEASE_TAG)
145 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
146 @for i in $(TARGETS) ; do \
147 if [ "$$i" = "native" ] ; then \
148 if [ ! -f $(canonhost)-3stage-done ] ; then \
149 echo "3staging $(canonhost) native" ; \
150 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
151 echo " completed successfully" ; \
152 fi \
153 else \
154 echo "building $(canonhost) cross to $$i" ; \
155 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-cygnus $(tlog) && \
156 echo " completed successfully" ; \
157 fi ; \
158 done
159 @echo done at `date`
160
161 native:
162 @echo build started at `date`
163 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
164 rm -f $(ROOTING)/$(RELEASE_TAG)
165 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
166 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log)
167 @echo done at `date`
168
169 build-cygnus:
170 @echo build started at `date`
171 @for i in $(TARGETS) ; do \
172 if [ "$$i" = "native" ] ; then \
173 if [ ! -f $(canonhost)-3stage-done ] ; then \
174 echo "3staging $(canonhost) native" ; \
175 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) $(canonhost)-stamp-3stage-done $(log) && \
176 echo " completed successfully" ; \
177 fi \
178 else \
179 echo "building $(canonhost) cross to $$i:" `date` ; \
180 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
181 echo " completed successfully" ; \
182 fi ; \
183 done
184 @echo done at `date`
185
186 all-native:
187 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
188 rm -f $(ROOTING)/$(RELEASE_TAG)
189 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
190 @for i in $(TARGETS) ; do \
191 echo "building $(canonhost) cross to $$i" ; \
192 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native $(tlog) && \
193 echo " completed successfully" ; \
194 done
195
196 all-cross:
197 [ -d $(INSTALLDIR) ] || mkdir $(INSTALLDIR)
198 rm -f $(ROOTING)/$(RELEASE_TAG)
199 ln -s $(INSTALLDIR) $(ROOTING)/$(RELEASE_TAG)
200 @for i in $(TARGETS) ; do \
201 echo "building $(canonhost) cross to $$i" ; \
202 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build=$(build) do-cygnus $(tlog) && \
203 echo " completed successfully" ; \
204 done
205
206 config:
207 @for i in $(TARGETS) ; do \
208 if [ "$$i" = "native" ] ; then \
209 echo "config stage1 for $(canonhost)" ; \
210 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-config $(log) && \
211 echo " completed successfully" ; \
212 else \
213 echo "config $(canonhost) cross to $$i" ; \
214 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i do-native-config $(tlog) && \
215 echo " completed successfully" ; \
216 fi ; \
217 done
218
219
220 build:
221 @for i in $(TARGETS) ; do \
222 if [ "$$i" = "native" ] ; then \
223 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) do1-build $(log) && \
224 echo " completed successfully" ; \
225 else \
226 echo "building $(canonhost) cross to $$i" ; \
227 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-native $(tlog) && \
228 echo " completed successfully" ; \
229 fi ; \
230 done
231
232
233 3build:
234 @for i in $(TARGETS) ; do \
235 if [ "$$i" = "native" ] ; then \
236 echo "building 3stage for $(canonhost)" ; \
237 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) all $(log) && \
238 echo " completed successfully" ; \
239 else \
240 echo "building $(canonhost) cross to $$i" ; \
241 $(MAKE) -f test-build.mk $(FLAGS_TO_PASS) target=$$i build-cygnus $(tlog) && \
242 echo " completed successfully" ; \
243 fi ; \
244 done
245
246 ### Local Variables:
247 ### fill-column: 131
248 ### End:
This page took 0.033257 seconds and 4 git commands to generate.