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