now handle doc subdir, too
This commit is contained in:
parent
b7becc8fc3
commit
50d2bb5b4c
|
@ -266,6 +266,8 @@ TSSTART = /lib/crt0.o
|
||||||
|
|
||||||
NTSSTART = kdb-start.o
|
NTSSTART = kdb-start.o
|
||||||
|
|
||||||
|
SUBDIRS = doc
|
||||||
|
|
||||||
# For now, shortcut the "configure GDB for fewer languages" stuff.
|
# For now, shortcut the "configure GDB for fewer languages" stuff.
|
||||||
YYFILES = c-exp.tab.c m2-exp.tab.c
|
YYFILES = c-exp.tab.c m2-exp.tab.c
|
||||||
YYOBJ = c-exp.tab.o m2-exp.tab.o
|
YYOBJ = c-exp.tab.o m2-exp.tab.o
|
||||||
|
@ -276,11 +278,13 @@ YYOBJ = c-exp.tab.o m2-exp.tab.o
|
||||||
${CC} -c ${CFLAGS} $<
|
${CC} -c ${CFLAGS} $<
|
||||||
|
|
||||||
all: gdb
|
all: gdb
|
||||||
|
$(MAKE) subdir_do DO=all "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
install: gdb
|
install: gdb
|
||||||
cp gdb $(bindir)/gdb.new
|
cp gdb $(bindir)/gdb.new
|
||||||
mv $(bindir)/gdb.new $(bindir)/gdb
|
mv $(bindir)/gdb.new $(bindir)/gdb
|
||||||
$(M_INSTALL)
|
$(M_INSTALL)
|
||||||
|
$(MAKE) subdir_do DO=install "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
init.c: $(srcdir)/munch $(OBS) $(TSOBS)
|
init.c: $(srcdir)/munch $(OBS) $(TSOBS)
|
||||||
$(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
|
$(srcdir)/munch ${MUNCH_DEFINE} $(OBS) $(TSOBS) > init.c
|
||||||
|
@ -508,49 +512,73 @@ clean:
|
||||||
rm -f init.c init.o version.c
|
rm -f init.c init.o version.c
|
||||||
rm -f gdb core gdb.tar gdb.tar.Z make.log
|
rm -f gdb core gdb.tar gdb.tar.Z make.log
|
||||||
rm -f gdb[0-9]
|
rm -f gdb[0-9]
|
||||||
cd $(srcdir)/doc; $(MAKE) clean
|
$(MAKE) subdir_do DO=clean "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
|
distclean: clean c-exp.tab.c m2-exp.tab.c TAGS
|
||||||
rm -f tm.h xm.h config.status
|
rm -f tm.h xm.h config.status
|
||||||
rm -f y.output yacc.acts yacc.tmp
|
rm -f y.output yacc.acts yacc.tmp
|
||||||
rm -f ${TESTS} Makefile depend
|
rm -f ${TESTS} Makefile depend
|
||||||
|
$(MAKE) subdir_do DO=distclean "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
realclean: clean
|
realclean: clean
|
||||||
rm -f c-exp.tab.c m2-exp.tab.c TAGS
|
rm -f c-exp.tab.c m2-exp.tab.c TAGS
|
||||||
rm -f tm.h xm.h config.status
|
rm -f tm.h xm.h config.status
|
||||||
rm -f Makefile depend
|
rm -f Makefile depend
|
||||||
|
$(MAKE) subdir_do DO=realclean "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
|
STAGESTUFF=${OBS} ${TSOBS} ${NTSOBS} ${ADD_FILES} init.c init.o version.c gdb
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
# Copy the object files from a particular stage into a subdirectory.
|
# Copy the object files from a particular stage into a subdirectory.
|
||||||
stage1: force
|
stage1: force
|
||||||
-mkdir stage1
|
-mkdir stage1
|
||||||
-mv -f $(STAGESTUFF) stage1
|
-mv -f $(STAGESTUFF) stage1
|
||||||
|
$(MAKE) subdir_do DO=stage1 "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
stage2: force
|
stage2: force
|
||||||
-mkdir stage2
|
-mkdir stage2
|
||||||
-mv -f $(STAGESTUFF) stage2
|
-mv -f $(STAGESTUFF) stage2
|
||||||
|
$(MAKE) subdir_do DO=stage2 "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
stage3: force
|
stage3: force
|
||||||
-mkdir stage3
|
-mkdir stage3
|
||||||
-mv -f $(STAGESTUFF) stage3
|
-mv -f $(STAGESTUFF) stage3
|
||||||
|
$(MAKE) subdir_do DO=stage3 "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
against=stage2
|
against=stage2
|
||||||
|
|
||||||
comparison: force
|
comparison: force
|
||||||
for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
|
for i in $(STAGESTUFF) ; do cmp $$i $(against)/$$i ; done
|
||||||
|
$(MAKE) subdir_do DO=comparison "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
de-stage1: force
|
de-stage1: force
|
||||||
- (cd stage1 ; mv -f * ..)
|
- (cd stage1 ; mv -f * ..)
|
||||||
- rmdir stage1
|
- rmdir stage1
|
||||||
|
$(MAKE) subdir_do DO=de-stage1 "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
de-stage2: force
|
de-stage2: force
|
||||||
- (cd stage2 ; mv -f * ..)
|
- (cd stage2 ; mv -f * ..)
|
||||||
- rmdir stage2
|
- rmdir stage2
|
||||||
|
$(MAKE) subdir_do DO=de-stage2 "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
de-stage3: force
|
de-stage3: force
|
||||||
- (cd stage3 ; mv -f * ..)
|
- (cd stage3 ; mv -f * ..)
|
||||||
- rmdir stage3
|
- rmdir stage3
|
||||||
|
$(MAKE) subdir_do DO=de-stage3 "DODIRS=$(SUBDIRS)"
|
||||||
|
|
||||||
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
|
Makefile: $(srcdir)/Makefile.in $(host_makefile_frag) $(target_makefile_frag)
|
||||||
$(SHELL) ./config.status
|
$(SHELL) ./config.status
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
configdirs="doc"
|
||||||
srcname="GDB"
|
srcname="GDB"
|
||||||
srctrigger=main.c
|
srctrigger=main.c
|
||||||
# per-host:
|
# per-host:
|
||||||
|
|
Loading…
Reference in New Issue