log for configure change
[deliverable/binutils-gdb.git] / test-build.mk
1 ###
2 ### Makefile used to three-stage build a tree of source code. Also used to
3 ### compile other bundles, first with cc, then with gcc.
4 ###
5
6 ###
7 ### USE OF THIS FILE REQUIRES GNU MAKE!!!
8 ###
9
10 ### The first versions of the file were written by Rich Pixley (rich@cygnus.com).
11 ### Many subsequent additions (and current maintainance by) david d `zoo' zuhn,
12 ### (zoo@cygnus.com).
13
14 ### Every invocation of this Makefile needs to have a variable set (host),
15 ### which is the named used for ./configure, and also the prefix for the
16 ### various files and directories used in a three stage.
17
18 ifndef host
19 error:
20 @echo You must set the variable \"host\" to use this Makefile ; exit 1
21 else
22
23 ### from here to very near the end of the file is the real guts of this
24 ### Makefile, and it is not seen if the variable 'host' is not set
25
26 ###
27 ### START EDITTING HERE!!!
28 ### These things will need to be set differently for each release.
29 ###
30
31 ### from which cvs tree are we working?
32 TREE := devo
33
34 ### binaries should be installed into?
35 ROOTING := /usr/cygnus
36
37 ### When working from a tagged set of source, this should be the tag. If not,
38 ### then set the macro to be empty.
39 CVS_TAG :=
40
41 ### The name of the cvs module for this release. The intersection of
42 ### CVS_MODULE and CVS_TAG defines the source files in this release.
43 CVS_MODULE := latest
44
45 ### Historically, this was identical to CVS_TAG. This is changing.
46 RELEASE_TAG := latest-930319
47
48 ### Historically, binaries were installed here. This is changing.
49 release_root := $(ROOTING)/$(RELEASE_TAG)
50
51 ### STOP EDITTING HERE!!!
52 ### With luck, eventually, nothing else will need to be editted.
53
54 TIME := time
55 GCC := gcc -O
56 GNUC := CC="$(GCC)"
57 CFLAGS := -g
58 GNU_MAKE := /usr/latest/bin/make -w
59
60 override MAKE := make
61 override MFLAGS :=
62 #override MAKEFLAGS :=
63
64 SHELL := /bin/sh
65
66 FLAGS_TO_PASS := \
67 "GCC=$(GCC)" \
68 "CFLAGS=$(CFLAGS)" \
69 "TIME=$(TIME)" \
70 "MF=$(MF)" \
71 "host=$(host)"
72
73 ifneq '$(CC)' 'cc'
74 FLAGS_TO_PASS := "CC=$(CC)" $(FLAGS_TO_PASS)
75 endif
76
77
78 prefixes = --prefix=$(release_root) --exec_prefix=$(release_root)/H-$(host)
79 relbindir = $(release_root)/H-$(host)/bin
80
81
82 ### general config stuff
83 WORKING_DIR := $(host)-objdir
84 STAGE1DIR := $(WORKING_DIR).1
85 STAGE2DIR := $(WORKING_DIR).2
86 STAGE3DIR := $(WORKING_DIR).3
87 INPLACEDIR := $(host)-in-place
88 HOLESDIR := $(host)-holes
89
90 SET_NATIVE_HOLES := SHELL=sh ; PATH=`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
91 SET_CYGNUS_PATH := SHELL=sh ; PATH=$(relbindir):`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
92 SET_LATEST_PATH := SHELL=sh ; PATH=/usr/latest/bin:`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
93
94
95
96 .PHONY: all
97 ifdef target
98 ##
99 ## This is a cross compilation
100 ##
101 arch = $(host)-x-$(target)
102 config = $(host) -target=$(target)
103 FLAGS_TO_PASS := $(FLAGS_TO_PASS) "target=$(target)"
104
105 all: do-native do-latest
106 build-all: build-native build-latest
107
108 else
109 ##
110 ## This is a native compilation
111 ##
112 arch = $(host)
113 config = $(host)
114 all: $(host)-stamp-3stage-done
115 #all: in-place do1 do2 do3 comparison
116 endif
117
118 NATIVEDIR := $(arch)-native-objdir
119 CYGNUSDIR := $(arch)-cygnus-objdir
120 LATESTDIR := $(arch)-latest-objdir
121
122
123 everything: do-cross
124 #everything: in-place do1 do2 do3 comparison do-cygnus
125
126 .PHONY: do-native
127 do-native: $(host)-stamp-holes $(arch)-stamp-native
128 do-native-config: $(arch)-stamp-native-configured
129 build-native: $(host)-stamp-holes $(arch)-stamp-native-checked
130 config-native: $(host)-stamp-holes $(arch)-stamp-native-configured
131
132 $(arch)-stamp-native: $(host)-stamp-holes
133 $(SET_NATIVE_HOLES) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-native-installed $(FLAGS_TO_PASS)
134 if [ -f CLEAN_ALL ] ; then rm -rf $(NATIVEDIR) ; else true ; fi
135 touch $(arch)-stamp-native
136
137 $(arch)-stamp-native-installed: $(host)-stamp-holes $(arch)-stamp-native-checked
138 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install
139 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install-info
140 touch $@
141
142 $(arch)-stamp-native-checked: $(arch)-stamp-native-built
143 # cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) check
144 touch $@
145
146 $(arch)-stamp-native-built: $(host)-stamp-holes $(arch)-stamp-native-configured
147 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) all
148 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) info
149 touch $@
150
151 $(arch)-stamp-native-configured: $(host)-stamp-holes
152 [ -d $(NATIVEDIR) ] || mkdir $(NATIVEDIR)
153 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes)
154 touch $@
155
156
157 .PHONY: do-cygnus
158 do-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus
159 build-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus-checked
160 config-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus-configured
161
162 $(arch)-stamp-cygnus:
163 [ -f $(relbindir)/gcc ] || (echo "must have gcc available"; exit 1)
164 $(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-cygnus-installed $(FLAGS_TO_PASS)
165 if [ -f CLEAN_ALL ] ; then rm -rf $(CYGNUSDIR) ; else true ; fi
166 touch $(arch)-stamp-cygnus
167
168 $(arch)-stamp-cygnus-installed: $(host)-stamp-holes $(arch)-stamp-cygnus-checked
169 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
170 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
171 touch $@
172
173 $(arch)-stamp-cygnus-checked: $(host)-stamp-holes $(arch)-stamp-cygnus-built
174 # cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
175 touch $@
176
177 $(arch)-stamp-cygnus-built: $(host)-stamp-holes $(arch)-stamp-cygnus-configured
178 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
179 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
180 touch $@
181
182 $(arch)-stamp-cygnus-configured: $(host)-stamp-holes
183 [ -d $(CYGNUSDIR) ] || mkdir $(CYGNUSDIR)
184 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(GNUC) $(TIME) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes)
185 touch $@
186
187 .PHONY: do-latest
188 do-latest: $(host)-stamp-holes $(arch)-stamp-latest
189 build-latest: $(host)-stamp-holes $(arch)-stamp-latest-checked
190
191 $(arch)-stamp-latest:
192 $(SET_LATEST_PATH) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-latest-installed $(FLAGS_TO_PASS)
193 touch $(arch)-stamp-latest
194
195
196 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
197 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
198 touch $@
199
200 $(arch)-stamp-latest-checked: $(arch)-stamp-latest-built
201 # $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
202 touch $@
203
204 $(arch)-stamp-latest-built: $(arch)-stamp-latest-configured
205 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
206 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
207 touch $@
208
209 $(arch)-stamp-latest-configured:
210 [ -d $(LATESTDIR) ] || mkdir $(LATESTDIR)
211 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(GNUC) $(TIME) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes)
212 touch $@
213
214
215 .PHONY: in-place
216 in-place: $(host)-stamp-in-place
217
218 $(host)-stamp-in-place:
219 PATH=/bin:/usr/bin:/usr/ucb ; \
220 export PATH ; \
221 SHELL=/bin/sh ; export SHELL ; \
222 $(TIME) $(GNU_MAKE) -f test-build.mk $(host)-stamp-in-place-installed host=$(host) $(FLAGS_TO_PASS)
223 touch $@
224 if [ -f CLEAN_ALL ] ; then \
225 rm -rf $(INPLACEDIR) ; \
226 else \
227 mv $(INPLACEDIR) $(STAGE1DIR) ; \
228 fi
229
230 $(host)-stamp-in-place-installed: $(host)-stamp-in-place-checked
231 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install host=$(host)
232 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install-info host=$(host)
233 touch $@
234
235 $(host)-stamp-in-place-checked: $(host)-stamp-in-place-built
236 # cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" check host=$(host)
237 touch $@
238
239 $(host)-stamp-in-place-built: $(host)-stamp-in-place-configured
240 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" all host=$(host)
241 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" info host=$(host)
242 touch $@
243
244 $(host)-stamp-in-place-configured: $(host)-stamp-in-place-cp
245 cd $(INPLACEDIR) ; $(TIME) ./configure $(host) -v $(prefixes)
246 touch $@
247
248 $(host)-stamp-in-place-cp:
249 rm -rf $(INPLACEDIR)
250 mkdir $(INPLACEDIR)
251 (cd $(TREE) ; tar cf - .) | (cd $(INPLACEDIR) ; tar xf -)
252 touch $@
253
254 $(host)-stamp-3stage-done: do1 do2 do3 comparison
255 touch $@
256
257
258 .PHONY: do1
259 do1: $(host)-stamp-holes $(host)-stamp-stage1
260 do1-config: $(host)-stamp-holes $(host)-stamp-stage1-configured
261 do1-build: $(host)-stamp-holes $(host)-stamp-stage1-checked
262
263 $(host)-stamp-stage1:
264 if [ -d $(STAGE1DIR) ] ; then \
265 mv $(STAGE1DIR) $(WORKING_DIR) ; \
266 else \
267 true ; \
268 fi
269 $(SET_NATIVE_HOLES) $(TIME) $(GNU_MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) $(host)-stamp-stage1-installed
270 touch $@
271 if [ -f CLEAN_ALL ] ; then \
272 rm -rf $(WORKING_DIR) ; \
273 else \
274 mv $(WORKING_DIR) $(STAGE1DIR) ; \
275 fi
276
277 $(host)-stamp-stage1-installed: $(host)-stamp-stage1-checked
278 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install host=$(host)
279 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install-info host=$(host)
280 ifeq ($(host),rs6000-ibm-aix)
281 rm $(relbindir)/make
282 endif
283 touch $@
284
285 $(host)-stamp-stage1-checked: $(host)-stamp-stage1-built
286 # $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" check host=$(host)
287 touch $@
288
289 $(host)-stamp-stage1-built: $(host)-stamp-stage1-configured
290 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" all host=$(host)
291 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" info host=$(host)
292 touch $@
293
294 $(host)-stamp-stage1-configured:
295 [ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
296 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; \
297 $(TIME) ../$(TREE)/configure $(host) -v --srcdir=../$(TREE) $(prefixes)
298 touch $@
299
300 .PHONY: do2
301 do2: $(HOLESDIR) $(host)-stamp-stage2
302
303 $(host)-stamp-stage2:
304 if [ -d $(STAGE2DIR) ] ; then \
305 mv $(STAGE2DIR) $(WORKING_DIR) ; \
306 else \
307 true ; \
308 fi
309 $(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage2-installed
310 mv $(WORKING_DIR) $(STAGE2DIR)
311 touch $@
312
313
314 $(host)-stamp-stage2-installed: $(host)-stamp-stage2-checked
315 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install host=$(host)
316 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install-info host=$(host)
317 touch $@
318
319 $(host)-stamp-stage2-checked: $(host)-stamp-stage2-built
320 # $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" check host=$(host)
321 touch $@
322
323 $(host)-stamp-stage2-built: $(host)-stamp-stage2-configured
324 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" all host=$(host)
325 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" info host=$(host)
326 touch $@
327
328 $(host)-stamp-stage2-configured:
329 [ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
330 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; \
331 $(GNUC) $(TIME) ../$(TREE)/configure $(host) -v --srcdir=../$(TREE) $(prefixes)
332 touch $@
333
334 .PHONY: do3
335 do3: $(HOLESDIR) $(host)-stamp-stage3
336
337 $(host)-stamp-stage3:
338 if [ -d $(STAGE3DIR) ] ; then \
339 mv $(STAGE3DIR) $(WORKING_DIR) ; \
340 else \
341 true ; \
342 fi
343 $(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage3-checked
344 mv $(WORKING_DIR) $(STAGE3DIR)
345 touch $@
346
347
348 $(host)-stamp-stage3-installed: $(host)-stamp-stage3-checked
349 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install host=$(host)
350 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install-info host=$(host)
351 touch $@
352
353 $(host)-stamp-stage3-checked: $(host)-stamp-stage3-built
354 # $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" check host=$(host)
355 touch $@
356
357 $(host)-stamp-stage3-built: $(host)-stamp-stage3-configured
358 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" all host=$(host)
359 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" info host=$(host)
360 touch $@
361
362 $(host)-stamp-stage3-configured:
363 [ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
364 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; \
365 $(GNUC) $(TIME) ../$(TREE)/configure $(host) -v --srcdir=../$(TREE) $(prefixes)
366 touch $@
367
368 # These things are needed by a three-stage, but are not included locally.
369
370 HOLES := \
371 [ \
372 ar \
373 as \
374 awk \
375 basename \
376 cat \
377 cc \
378 chmod \
379 cmp \
380 cp \
381 cpio \
382 date \
383 diff \
384 echo \
385 egrep \
386 ex \
387 expr \
388 false \
389 find \
390 grep \
391 head \
392 hostname \
393 install \
394 ld \
395 lex \
396 ln \
397 ls \
398 make \
399 mkdir \
400 mv \
401 nm \
402 pwd \
403 ranlib \
404 rm \
405 rmdir \
406 sed \
407 sh \
408 sort \
409 tar \
410 test \
411 time \
412 touch \
413 tr \
414 true \
415 uudecode \
416 wc \
417 whoami
418
419 ### so far only sun make supports VPATH
420 ifeq ($(subst sun3,sun4,$(host)),sun4)
421 MAKE_HOLE :=
422 else
423 MAKE_HOLE := make
424 endif
425
426 ### solaris 2 -- don't use /usr/ucb/cc
427 ifeq (sparc-sun-solaris2,$(host))
428 SET_NATIVE_HOLES := SHELL=sh ; PATH=/opt/SUNWspro/bin:`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
429 HOLE_DIRS := /usr/ccs/bin
430 CC_HOLE :=
431 NUKEM := cc
432 endif
433
434 ### rs6000 as is busted. We cache a patched version in unsupported.
435 ifeq ($(host),rs6000-ibm-aix)
436 AS_HOLE := as
437 else
438 AS_HOLE :=
439 endif
440
441 ### These things are also needed by a three-stage, but in this case, the GNU version of the tool is required.
442 PARTIAL_HOLES := \
443 $(AS_HOLE) \
444 $(MAKE_HOLE) \
445 $(CC_HOLE) \
446 flex \
447 m4
448
449 ### look in these directories for things missing from a three-stage
450 HOLE_DIRS := \
451 $(HOLE_DIRS) \
452 /bin \
453 /usr/bin \
454 /usr/ucb \
455 /usr/unsupported/bin
456
457 ### look in these directories for alternate versions of some tools.
458 PARTIAL_HOLE_DIRS := \
459 /usr/latest/bin \
460 /usr/progressive/bin \
461 $(PARTIAL_HOLE_DIRS) \
462 /usr/vintage/bin \
463 /usr/unsupported/bin
464
465 $(HOLESDIR): $(host)-stamp-holes
466
467 $(host)-stamp-holes:
468 -rm -rf $(HOLESDIR)
469 -mkdir $(HOLESDIR)
470 @for i in $(HOLES) ; do \
471 found= ; \
472 for j in $(HOLE_DIRS) ; do \
473 if [ -x $$j/$$i ] ; then \
474 ln -s $$j/$$i $(HOLESDIR) || cp $$j/$$i $(HOLESDIR) ; \
475 echo $$i from $$j ; \
476 found=t ; \
477 break ; \
478 fi ; \
479 done ; \
480 case "$$found" in \
481 t) ;; \
482 *) echo $$i is NOT found ;; \
483 esac ; \
484 done
485 @for i in $(PARTIAL_HOLES) ; do \
486 found= ; \
487 for j in $(PARTIAL_HOLE_DIRS) ; do \
488 if [ -x $$j/$$i ] ; then \
489 rm -f $(HOLESDIR)/$$i ; \
490 cp $$j/$$i $(HOLESDIR)/$$i || exit 1; \
491 echo $$i from $$j ; \
492 found=t ; \
493 break ; \
494 fi ; \
495 done ; \
496 case "$$found" in \
497 t) ;; \
498 *) echo $$i is NOT found ;; \
499 esac ; \
500 done
501 ifdef NUKEM
502 cd $(HOLESDIR); rm -f $(NUKEM)
503 endif
504 touch $@
505
506 .PHONY: comparison
507 comparison: $(host)-stamp-3stage-compared
508
509 $(host)-stamp-3stage-compared:
510 rm -f .bad-compare
511 ifeq ($(subst i386-sco3.2v4,mips-sgi-irix4,$(subst rs6000-ibm-aix,mips-sgi-irix4,$(subst mips-dec-ultrix,mips-sgi-irix4,$(host)))),mips-sgi-irix4)
512 for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
513 tail +10c $(STAGE2DIR)/$$i > foo1 ; \
514 tail +10c $(STAGE3DIR)/$$i > foo2 ; \
515 if cmp foo1 foo2 ; then \
516 true ; \
517 else \
518 echo $$i ; \
519 touch .bad-compare ; \
520 fi ; \
521 done
522 rm -f foo1 foo2
523 else
524 for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
525 cmp $(STAGE2DIR)/$$i $(STAGE3DIR)/$$i || touch .bad-compare ; \
526 done
527 endif
528 if [ -f CLEAN_ALL ] ; then \
529 rm -rf $(STAGE2DIR) $(STAGE3DIR) ; \
530 else \
531 if [ -f CLEAN_STAGES ] ; then \
532 if [ -f .bad-compare ] ; then \
533 true ; \
534 else \
535 rm -rf $(STAGE1DIR) $(STAGE2DIR) ; \
536 fi ; \
537 else true ; \
538 fi ; \
539 fi
540 touch $@
541
542 .PHONY: clean
543 clean:
544 rm -rf $(HOLESDIR) $(INPLACEDIR) $(WORKING_DIR)* $(host)-stamp-* *~
545
546 .PHONY: very
547 very:
548 rm -rf $(TREE)
549
550 force:
551
552 endif # host
553
554 ### Local Variables:
555 ### fill-column: 131
556 ### End:
This page took 0.066836 seconds and 4 git commands to generate.