gprof(1) can have more than one profile data file, so have the usage
[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 "RELEASE_TAG=$(RELEASE_TAG)"
73
74 ifneq '$(CC)' 'cc'
75 FLAGS_TO_PASS := "CC=$(CC)" $(FLAGS_TO_PASS)
76 endif
77
78
79 prefixes = --prefix=$(release_root) --exec-prefix=$(release_root)/H-$(host)
80 relbindir = $(release_root)/H-$(host)/bin
81
82 ifeq ($(host),mips-dec-ultrix)
83 configargs = -with-gnu-as
84 else
85 configargs =
86 endif
87
88 ### general config stuff
89 WORKING_DIR := $(host)-objdir
90 STAGE1DIR := $(WORKING_DIR).1
91 STAGE2DIR := $(WORKING_DIR).2
92 STAGE3DIR := $(WORKING_DIR).3
93 INPLACEDIR := $(host)-in-place
94 HOLESDIR := $(host)-holes
95
96 SET_NATIVE_HOLES := SHELL=sh ; PATH=`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
97 SET_CYGNUS_PATH := SHELL=sh ; PATH=$(relbindir):`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
98 SET_LATEST_PATH := SHELL=sh ; PATH=/usr/latest/bin:`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
99
100
101
102 .PHONY: all
103 ifdef target
104 ##
105 ## This is a cross compilation
106 ##
107 arch = $(host)-x-$(target)
108 config = $(host) -target=$(target)
109 FLAGS_TO_PASS := $(FLAGS_TO_PASS) "target=$(target)"
110
111 all: do-native do-latest
112 build-all: build-native build-latest
113
114 else
115 ##
116 ## This is a native compilation
117 ##
118 arch = $(host)
119 config = $(host)
120 all: $(host)-stamp-3stage-done
121 #all: in-place do1 do2 do3 comparison
122 endif
123
124 NATIVEDIR := $(arch)-native-objdir
125 CYGNUSDIR := $(arch)-cygnus-objdir
126 LATESTDIR := $(arch)-latest-objdir
127
128
129 everything: do-cross
130 #everything: in-place do1 do2 do3 comparison do-cygnus
131
132 .PHONY: do-native
133 do-native: $(host)-stamp-holes $(arch)-stamp-native
134 do-native-config: $(arch)-stamp-native-configured
135 build-native: $(host)-stamp-holes $(arch)-stamp-native-checked
136 config-native: $(host)-stamp-holes $(arch)-stamp-native-configured
137
138 $(arch)-stamp-native: $(host)-stamp-holes
139 $(SET_NATIVE_HOLES) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-native-installed $(FLAGS_TO_PASS)
140 if [ -f CLEAN_ALL ] ; then rm -rf $(NATIVEDIR) ; else true ; fi
141 touch $(arch)-stamp-native
142
143 $(arch)-stamp-native-installed: $(host)-stamp-holes $(arch)-stamp-native-checked
144 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install
145 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) install-info
146 touch $@
147
148 $(arch)-stamp-native-checked: $(arch)-stamp-native-built
149 # cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) check
150 touch $@
151
152 $(arch)-stamp-native-built: $(host)-stamp-holes $(arch)-stamp-native-configured
153 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) all
154 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) info
155 touch $@
156
157 $(arch)-stamp-native-configured: $(host)-stamp-holes
158 [ -d $(NATIVEDIR) ] || mkdir $(NATIVEDIR)
159 $(SET_NATIVE_HOLES) cd $(NATIVEDIR) ; $(TIME) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
160 touch $@
161
162
163 .PHONY: do-cygnus
164 do-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus
165 build-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus-checked
166 config-cygnus: $(host)-stamp-holes $(arch)-stamp-cygnus-configured
167
168 $(arch)-stamp-cygnus:
169 [ -f $(relbindir)/gcc ] || (echo "must have gcc available"; exit 1)
170 $(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-cygnus-installed $(FLAGS_TO_PASS)
171 if [ -f CLEAN_ALL ] ; then rm -rf $(CYGNUSDIR) ; else true ; fi
172 touch $(arch)-stamp-cygnus
173
174 $(arch)-stamp-cygnus-installed: $(host)-stamp-holes $(arch)-stamp-cygnus-checked
175 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
176 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
177 touch $@
178
179 $(arch)-stamp-cygnus-checked: $(host)-stamp-holes $(arch)-stamp-cygnus-built
180 # cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
181 touch $@
182
183 $(arch)-stamp-cygnus-built: $(host)-stamp-holes $(arch)-stamp-cygnus-configured
184 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
185 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
186 touch $@
187
188 $(arch)-stamp-cygnus-configured: $(host)-stamp-holes
189 [ -d $(CYGNUSDIR) ] || mkdir $(CYGNUSDIR)
190 $(SET_CYGNUS_PATH) cd $(CYGNUSDIR) ; $(GNUC) $(TIME) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
191 touch $@
192
193 .PHONY: do-latest
194 do-latest: $(host)-stamp-holes $(arch)-stamp-latest
195 build-latest: $(host)-stamp-holes $(arch)-stamp-latest-checked
196
197 $(arch)-stamp-latest:
198 $(SET_LATEST_PATH) $(TIME) $(GNU_MAKE) -f test-build.mk $(arch)-stamp-latest-installed $(FLAGS_TO_PASS)
199 touch $(arch)-stamp-latest
200
201
202 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install
203 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) install-info
204 touch $@
205
206 $(arch)-stamp-latest-checked: $(arch)-stamp-latest-built
207 # $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) check
208 touch $@
209
210 $(arch)-stamp-latest-built: $(arch)-stamp-latest-configured
211 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) all
212 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) $(GNUC) info
213 touch $@
214
215 $(arch)-stamp-latest-configured:
216 [ -d $(LATESTDIR) ] || mkdir $(LATESTDIR)
217 $(SET_LATEST_PATH) cd $(LATESTDIR) ; $(GNUC) $(TIME) ../$(TREE)/configure $(config) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
218 touch $@
219
220
221 .PHONY: in-place
222 in-place: $(host)-stamp-in-place
223
224 $(host)-stamp-in-place:
225 PATH=/bin:/usr/bin:/usr/ucb ; \
226 export PATH ; \
227 SHELL=/bin/sh ; export SHELL ; \
228 $(TIME) $(GNU_MAKE) -f test-build.mk $(host)-stamp-in-place-installed host=$(host) $(FLAGS_TO_PASS)
229 touch $@
230 if [ -f CLEAN_ALL ] ; then \
231 rm -rf $(INPLACEDIR) ; \
232 else \
233 mv $(INPLACEDIR) $(STAGE1DIR) ; \
234 fi
235
236 $(host)-stamp-in-place-installed: $(host)-stamp-in-place-checked
237 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install host=$(host)
238 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install-info host=$(host)
239 touch $@
240
241 $(host)-stamp-in-place-checked: $(host)-stamp-in-place-built
242 # cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" check host=$(host)
243 touch $@
244
245 $(host)-stamp-in-place-built: $(host)-stamp-in-place-configured
246 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" all host=$(host)
247 cd $(INPLACEDIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" info host=$(host)
248 touch $@
249
250 $(host)-stamp-in-place-configured: $(host)-stamp-in-place-cp
251 cd $(INPLACEDIR) ; $(TIME) ./configure $(host) -v $(prefixes) $(configargs)
252 touch $@
253
254 $(host)-stamp-in-place-cp:
255 rm -rf $(INPLACEDIR)
256 mkdir $(INPLACEDIR)
257 (cd $(TREE) ; tar cf - .) | (cd $(INPLACEDIR) ; tar xf -)
258 touch $@
259
260 $(host)-stamp-3stage-done: do1 do2 do3 comparison
261 touch $@
262
263
264 .PHONY: do1
265 do1: $(host)-stamp-holes $(host)-stamp-stage1
266 do1-config: $(host)-stamp-holes $(host)-stamp-stage1-configured
267 do1-build: $(host)-stamp-holes $(host)-stamp-stage1-checked
268
269 $(host)-stamp-stage1:
270 if [ -d $(STAGE1DIR) ] ; then \
271 mv $(STAGE1DIR) $(WORKING_DIR) ; \
272 else \
273 true ; \
274 fi
275 $(SET_NATIVE_HOLES) $(TIME) $(GNU_MAKE) -f test-build.mk $(FLAGS_TO_PASS) host=$(host) $(host)-stamp-stage1-installed
276 touch $@
277 if [ -f CLEAN_ALL ] ; then \
278 rm -rf $(WORKING_DIR) ; \
279 else \
280 mv $(WORKING_DIR) $(STAGE1DIR) ; \
281 fi
282
283 $(host)-stamp-stage1-installed: $(host)-stamp-stage1-checked
284 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install host=$(host)
285 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" install-info host=$(host)
286 ifeq ($(host),rs6000-ibm-aix)
287 rm $(relbindir)/make
288 endif
289 touch $@
290
291 $(host)-stamp-stage1-checked: $(host)-stamp-stage1-built
292 # $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" check host=$(host)
293 touch $@
294
295 $(host)-stamp-stage1-built: $(host)-stamp-stage1-configured
296 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" all host=$(host)
297 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; $(TIME) $(MAKE) $(FLAGS_TO_PASS) "CFLAGS=$(CFLAGS)" info host=$(host)
298 touch $@
299
300 $(host)-stamp-stage1-configured:
301 [ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
302 $(SET_NATIVE_HOLES) cd $(WORKING_DIR) ; \
303 $(TIME) ../$(TREE)/configure $(host) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
304 touch $@
305
306 .PHONY: do2
307 do2: $(HOLESDIR) $(host)-stamp-stage2
308
309 $(host)-stamp-stage2:
310 if [ -d $(STAGE2DIR) ] ; then \
311 mv $(STAGE2DIR) $(WORKING_DIR) ; \
312 else \
313 true ; \
314 fi
315 $(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage2-installed
316 mv $(WORKING_DIR) $(STAGE2DIR)
317 touch $@
318
319
320 $(host)-stamp-stage2-installed: $(host)-stamp-stage2-checked
321 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install host=$(host)
322 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install-info host=$(host)
323 touch $@
324
325 $(host)-stamp-stage2-checked: $(host)-stamp-stage2-built
326 # $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" check host=$(host)
327 touch $@
328
329 $(host)-stamp-stage2-built: $(host)-stamp-stage2-configured
330 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" all host=$(host)
331 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" info host=$(host)
332 touch $@
333
334 $(host)-stamp-stage2-configured:
335 [ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
336 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; \
337 $(GNUC) $(TIME) ../$(TREE)/configure $(host) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
338 touch $@
339
340 .PHONY: do3
341 do3: $(HOLESDIR) $(host)-stamp-stage3
342
343 $(host)-stamp-stage3:
344 if [ -d $(STAGE3DIR) ] ; then \
345 mv $(STAGE3DIR) $(WORKING_DIR) ; \
346 else \
347 true ; \
348 fi
349 $(SET_CYGNUS_PATH) $(TIME) $(GNU_MAKE) $(FLAGS_TO_PASS) -f test-build.mk -w $(host)-stamp-stage3-checked
350 mv $(WORKING_DIR) $(STAGE3DIR)
351 touch $@
352
353
354 $(host)-stamp-stage3-installed: $(host)-stamp-stage3-checked
355 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install host=$(host)
356 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" install-info host=$(host)
357 touch $@
358
359 $(host)-stamp-stage3-checked: $(host)-stamp-stage3-built
360 # $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" check host=$(host)
361 touch $@
362
363 $(host)-stamp-stage3-built: $(host)-stamp-stage3-configured
364 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" all host=$(host)
365 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; $(TIME) $(MAKE) -w $(FLAGS_TO_PASS) $(GNUC) "CFLAGS=$(CFLAGS)" info host=$(host)
366 touch $@
367
368 $(host)-stamp-stage3-configured:
369 [ -d $(WORKING_DIR) ] || mkdir $(WORKING_DIR)
370 $(SET_CYGNUS_PATH) cd $(WORKING_DIR) ; \
371 $(GNUC) $(TIME) ../$(TREE)/configure $(host) -v --srcdir=../$(TREE) $(prefixes) $(configargs)
372 touch $@
373
374 # These things are needed by a three-stage, but are not included locally.
375
376 HOLES := \
377 [ \
378 ar \
379 as \
380 awk \
381 basename \
382 cat \
383 cc \
384 chmod \
385 cmp \
386 cp \
387 cpio \
388 date \
389 diff \
390 echo \
391 egrep \
392 ex \
393 expr \
394 false \
395 find \
396 grep \
397 head \
398 hostname \
399 install \
400 ld \
401 lex \
402 ln \
403 ls \
404 make \
405 mkdir \
406 mv \
407 nm \
408 pwd \
409 ranlib \
410 rm \
411 rmdir \
412 sed \
413 sh \
414 sort \
415 tar \
416 test \
417 time \
418 touch \
419 tr \
420 true \
421 uudecode \
422 wc \
423 whoami
424
425 ### so far only sun make supports VPATH
426 ifeq ($(subst sun3,sun4,$(host)),sun4)
427 MAKE_HOLE :=
428 else
429 MAKE_HOLE := make
430 endif
431
432 ### solaris 2 -- don't use /usr/ucb/cc
433 ifeq (sparc-sun-solaris2,$(host))
434 SET_NATIVE_HOLES := SHELL=sh ; PATH=/opt/SUNWspro/bin:`pwd`/$(HOLESDIR) ; export PATH ; export SHELL ;
435 HOLE_DIRS := /usr/ccs/bin
436 CC_HOLE :=
437 NUKEM := cc
438 endif
439
440 ### These things are also needed by a three-stage, but in this case, the GNU version of the tool is required.
441 PARTIAL_HOLES := \
442 $(MAKE_HOLE) \
443 $(CC_HOLE) \
444 flex \
445 m4
446
447 ### look in these directories for things missing from a three-stage
448 HOLE_DIRS := \
449 $(HOLE_DIRS) \
450 /bin \
451 /usr/bin \
452 /usr/ucb \
453 /usr/unsupported/bin
454
455 ### look in these directories for alternate versions of some tools.
456 PARTIAL_HOLE_DIRS := \
457 /usr/latest/bin \
458 /usr/progressive/bin \
459 $(PARTIAL_HOLE_DIRS) \
460 /usr/vintage/bin \
461 /usr/unsupported/bin
462
463 $(HOLESDIR): $(host)-stamp-holes
464
465 $(host)-stamp-holes:
466 -rm -rf $(HOLESDIR)
467 -mkdir $(HOLESDIR)
468 @for i in $(HOLES) ; do \
469 found= ; \
470 for j in $(HOLE_DIRS) ; do \
471 if [ -x $$j/$$i ] ; then \
472 ln -s $$j/$$i $(HOLESDIR) || cp $$j/$$i $(HOLESDIR) ; \
473 echo $$i from $$j ; \
474 found=t ; \
475 break ; \
476 fi ; \
477 done ; \
478 case "$$found" in \
479 t) ;; \
480 *) echo $$i is NOT found ;; \
481 esac ; \
482 done
483 @for i in $(PARTIAL_HOLES) ; do \
484 found= ; \
485 for j in $(PARTIAL_HOLE_DIRS) ; do \
486 if [ -x $$j/$$i ] ; then \
487 rm -f $(HOLESDIR)/$$i ; \
488 cp $$j/$$i $(HOLESDIR)/$$i || exit 1; \
489 echo $$i from $$j ; \
490 found=t ; \
491 break ; \
492 fi ; \
493 done ; \
494 case "$$found" in \
495 t) ;; \
496 *) echo $$i is NOT found ;; \
497 esac ; \
498 done
499 ifdef NUKEM
500 cd $(HOLESDIR); rm -f $(NUKEM)
501 endif
502 touch $@
503
504 .PHONY: comparison
505 comparison: $(host)-stamp-3stage-compared
506
507 $(host)-stamp-3stage-compared:
508 rm -f .bad-compare
509 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)
510 for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
511 tail +10c $(STAGE2DIR)/$$i > foo1 ; \
512 tail +10c $(STAGE3DIR)/$$i > foo2 ; \
513 if cmp foo1 foo2 ; then \
514 true ; \
515 else \
516 echo $$i ; \
517 touch .bad-compare ; \
518 fi ; \
519 done
520 rm -f foo1 foo2
521 else
522 for i in `cd $(STAGE3DIR) ; find . -name \*.o -print` ; do \
523 cmp $(STAGE2DIR)/$$i $(STAGE3DIR)/$$i || touch .bad-compare ; \
524 done
525 endif
526 if [ -f CLEAN_ALL ] ; then \
527 rm -rf $(STAGE2DIR) $(STAGE3DIR) ; \
528 else \
529 if [ -f CLEAN_STAGES ] ; then \
530 if [ -f .bad-compare ] ; then \
531 true ; \
532 else \
533 rm -rf $(STAGE1DIR) $(STAGE2DIR) ; \
534 fi ; \
535 else true ; \
536 fi ; \
537 fi
538 touch $@
539
540 .PHONY: clean
541 clean:
542 rm -rf $(HOLESDIR) $(INPLACEDIR) $(WORKING_DIR)* $(host)-stamp-* *~
543
544 .PHONY: very
545 very:
546 rm -rf $(TREE)
547
548 force:
549
550 endif # host
551
552 ### Local Variables:
553 ### fill-column: 131
554 ### End:
This page took 0.040427 seconds and 4 git commands to generate.