#
# Makefile for directory with subdirs to build.
#
-# Last Mod Mon May 27 15:55:09 PDT 1991, by rich@cygint.cygnus.com
+# Last Mod Fri May 31 10:35:51 PDT 1991, by rich@cygint.cygnus.com
#
# $Id$
$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS) $(OTHERS)"
subdir_do: force
- for i in $(DODIRS); \
- do \
- if [ -d $(srcdir)/$$i -o -d $(srcdir)/$$i.$(target) ] ; then \
- if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
- then echo .$(target) ; fi`$(subdir); \
- $(MAKE) \
- "destdir=$(destdir)" \
- "AR=$(AR)" \
- "AR_FLAGS=$(AR_FLAGS)" \
- "RANLIB=$(RANLIB)" $(DO)) ; \
- then true ; \
- else exit 1 ; \
- fi ;\
- else true; fi ; \
- done
+ for i in $(DODIRS); do \
+ if [ -d $(srcdir)/$$i -o -d $(srcdir)/$$i.$(target) ] ; then \
+ if (cd $(srcdir)/$$i`if [ -d $(srcdir)/$$i.$(target) ] ; \
+ then echo .$(target) ; fi`$(subdir); \
+ $(MAKE) \
+ "against=$(against)" \
+ "AR=$(AR)" \
+ "AR_FLAGS=$(AR_FLAGS)" \
+ "RANLIB=$(RANLIB)" $(DO)) ; then true ; \
+ else exit 1 ; fi ; \
+ else true ; fi ; \
+ done
bootstrap:
$(MAKE) all
$(MAKE) pass "stagepass=stage1"
$(MAKE) stage2
$(MAKE) pass "stagepass=stage2"
+ $(MAKE) comparison
bootstrap2:
$(MAKE) pass "stagepass=stage1"
$(MAKE) stage2
$(MAKE) pass "stagepass=stage2"
+ $(MAKE) comparison
bootstrap3:
$(MAKE) pass "stagepass=stage2"
+ $(MAKE) comparison
pass:
cp $(srcdir)/gcc`if [ -d $(srcdir)/gcc.$(target) ] ; \
stage4:
$(MAKE) subdir_do DO=stage4 "DODIRS=$(SUBDIRS)"
+against=stage2
+
+comparison:; $(MAKE) subdir_do DO=comparison against=$(against) "DODIRS=$(SUBDIRS)"
+
de-stage1:; $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
de-stage2:; $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
de-stage3:; $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
#
# $Log$
-# Revision 1.14 1991/05/31 12:34:55 gnu
+# Revision 1.15 1991/06/09 20:27:01 rich
+# added support for binary comparisons.
+#
+# Revision 1.14 1991/05/31 12:34:55 gnu
# Avoid error stop from Make if a directory doesn't exist during subdir_do.
#
# Revision 1.13 1991/05/27 23:03:20 rich
- mkdir stage3
- mv -f $(STAGESTUFF) stage3
+against=stage2
+
+comparison: force
+ for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done
+
de-stage1: force
- (cd stage1 ; mv -f $(STAGESTUFF) ..)
- rmdir stage1
OBJDUMP_PROG=objdump
PROGS = $(SIZE_PROG) $(COPY_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRIP_PROG) $(RANLIB_PROG)
+STAGESTUFF = $(PROGS) *.o
BASEDIR = $(srcdir)/..
LIBDIR = $(srcdir)/../bfd$(subdir)
stage1: force
- mkdir stage1
- - mv -f *.o $(PROGS) stage1
+ - mv -f $(STAGESTUFF) stage1
stage2: force
- mkdir stage2
- - mv -f *.o $(PROGS) stage2
+ - mv -f $(STAGESTUFF) stage2
stage3: force
- mkdir stage3
- - mv -f *.o $(PROGS) stage3
+ - mv -f $(STAGESTUFF) stage3
+
+against=stage2
+
+comparison: force
+ for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
de-stage1: force
- (cd stage1 ; mv -f * ..)
- rmdir stage3
clean:
- -rm -f *.o *~ \#* core $(PROGS) TAGS
+ -rm -f *.o *~ \#* core $(STAGESTUFF) TAGS
etags tags: TAGS
etags $(INCDIR)/*.h $(BFDSRC)/*.[hc] *.[hc]
realclean: clean
- -rm -f $(PROGS) TAGS
+ -rm -f $(STAGESTUFF) TAGS
install: $(PROGS)
for i in $(PROGS) ; do \
copy.o: copy.c
objdump.o: objdump.c
m68k-pinsn.o: m68k-pinsn.c
-m68k-pinsn.o: ./m68k-opcode.h
i960-pinsn.o: i960-pinsn.c
sparc-pinsn.o: sparc-pinsn.c
-sparc-pinsn.o: ./sparc-opcode.h
nm.o: nm.c
ar.o: ar.c
getopt.o:getopt.c
$(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
$(MAKE) stage2
$(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
- $(MAKE) stage-last
+ $(MAKE) comparison against=stage2
bootstrap2: force
$(MAKE) CC="$(CC)" CFLAGS="-O -Bstage1/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
$(MAKE) stage2
$(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
- $(MAKE) stage-last
+ $(MAKE) comparison against-stage2
bootstrap3: force
$(MAKE) CC="$(CC)" CFLAGS="-O -Bstage2/ $(CFLAGS)" libdir=$(libdir) ALLOCA= as
- $(MAKE) stage-last
+ $(MAKE) comparison against=stage2
# Copy the object files from a particular stage into a subdirectory.
stage1: force
-mkdir stage3
-mv $(STAGESTUFF) stage3
+against=stage2
+
+comparison: force
+ for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
+
de-stage1: force
- (cd stage1 ; mv -f * ..)
- rmdir stage1
- (cd stage3 ; mv -f * ..)
- rmdir stage3
-stage-last:
- for i in *.o; do cmp $$i stage2/$$i; done
-
# Copy just the executable files from a particular stage into a subdirectory,
# and delete the object files. Use this if you're just verifying a version
# that is pretty sure to work, and you are short of disk space.
.PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap
.PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4
-comparison: clean
- $(MAKE) "CC=/usr/local/bin/gcc -Wall" as
- $(MAKE) stage1
- - $(MAKE) "CC=/usr/local/bin/gcc -Wall -b$(target) -Bstage1/" as -k
- $(MAKE) stage2
- - $(MAKE) "CC=/usr/local/bin/gcc -Wall -b$(target)" as -k
- $(MAKE) stage-last
-
force:
Makefile: $(srcdir)/Makefile.in $(srcdir)/configure