From: K. Richard Pixley Date: Thu, 14 Nov 1991 00:16:05 +0000 (+0000) Subject: take care of doc subdir, too X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f259290f0dfe866a9ae7c0e95b2ca40d721624b0;p=binutils-gdb.git take care of doc subdir, too --- diff --git a/bfd/Makefile.in b/bfd/Makefile.in index ae3f44c9147..195b24c4804 100644 --- a/bfd/Makefile.in +++ b/bfd/Makefile.in @@ -33,6 +33,7 @@ CSEARCH = -I. -I$(srcdir) -I$(INCDIR) DEP = mkdep MINUS_G=-g +SUBDIRS = doc #### host and target dependent Makefile fragments come in here. ### @@ -68,6 +69,7 @@ CFILES = libbfd.c opncls.c bfd.c archive.c targets.c cache.c archures.c \ STAGESTUFF = $(TARGETLIB) $(OFILES) all: $(TARGETLIB) + $(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)" # HDEPFILES comes from the host config; TDEPFILES from the target config. OFILES = $(BFD_LIBS) $(BFD_BACKENDS) $(BFD_MACHINES) $(HDEPFILES) $(TDEPFILES) @@ -81,34 +83,56 @@ $(TARGETLIB): $(OFILES) targets.o: targets.c $(CC) $(CFLAGS) -c $(TDEFAULTS) $< +subdir_do: force + for i in $(DODIRS); do \ + if [ -d $(unsubdir)/$$i ] ; then \ + if (cd $(unsubdir)/$$i$(subdir); \ + $(MAKE) \ + "against=$(against)" \ + "AR=$(AR)" \ + "CC=$(CC)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "RANLIB=$(RANLIB)" \ + "BISON=$(BISON)" $(DO)) ; then true ; \ + else exit 1 ; fi ; \ + else true ; fi ; \ + done + stage1: force - mkdir stage1 - mv -f $(STAGESTUFF) stage1 + $(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)" stage2: force - mkdir stage2 - mv -f $(STAGESTUFF) stage2 + $(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)" stage3: force - mkdir stage3 - mv -f $(STAGESTUFF) stage3 + $(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)" against=stage2 comparison: force for i in *.o ; do cmp $$i $(against)/$$i || exit 1 ; done + $(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)" de-stage1: force - (cd stage1 ; mv -f $(STAGESTUFF) ..) - rmdir stage1 + $(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)" de-stage2: force - (cd stage2 ; mv -f $(STAGESTUFF) ..) - rmdir stage2 + $(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)" de-stage3: force - (cd stage3 ; mv -f $(STAGESTUFF) ..) - rmdir stage3 + $(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)" tags etags: TAGS @@ -117,9 +141,11 @@ TAGS: force clean: rm -f *.[oa] *~ core *.E *.p *.ip + $(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)" clobber realclean: clean rm -f libbfd.a TAGS + $(MAKE) subdir_do DO=clobber "DODIRS=$(SUBDIRS)" # Mark everything as depending on config.status, since the timestamp on # sysdep.h might actually move backwards if we reconfig and relink it @@ -183,6 +209,7 @@ install: cp libbfd.a $(libdir)/libbfd.a.new $(RANLIB) $(libdir)/libbfd.a.new mv -f $(libdir)/libbfd.a.new $(libdir)/libbfd.a + $(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)" # Target to uncomment host-specific lines in this makefile. Such lines must # have the following string beginning in column 1: #____#