DEP = mkdep
MINUS_G=-g
+SUBDIRS = doc
#### host and target dependent Makefile fragments come in here.
###
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)
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
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
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: #__<hostname>__#