diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-03-05 03:45:26 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-03-05 03:45:26 +0000 |
commit | 64794aa4b43e3ceb472c62fb1a2e70a71ba9e256 (patch) | |
tree | 90b49d9dddc02bb620f3ee5809b3c451461b4fae /gdb/gdbserver | |
parent | ac480657f156d963e5910b958c7b64fcee955f88 (diff) | |
download | gdb-64794aa4b43e3ceb472c62fb1a2e70a71ba9e256.zip gdb-64794aa4b43e3ceb472c62fb1a2e70a71ba9e256.tar.gz gdb-64794aa4b43e3ceb472c62fb1a2e70a71ba9e256.tar.bz2 |
fix make clean doesn't run in gdbserver/common
011-03-05 Yao Qi <yao@codesourcery.com>
* Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
(subdir_do): New make target. Copied from gdb/Makefile.
(maintainer-clean, realclean, distclean, clean): Call corresponding
make targets in common/Makefile.
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/gdbserver/Makefile.in | 21 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index b17b8f8..7fa2e15 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,10 @@ +2011-03-05 Yao Qi <yao@codesourcery.com> + + * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable. + (subdir_do): New make target. Copied from gdb/Makefile. + (maintainer-clean, realclean, distclean, clean): Call corresponding + make targets in common/Makefile. + 2011-03-04 Yao Qi <yao@codesourcery.com> * Makefile.in: Remove GNU make feature --directory. diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index 68f7bc6..50d468e 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -136,6 +136,9 @@ LIBCOMMON_DIR = common LIBCOMMON = $(LIBCOMMON_DIR)/libcommon.a LIBCOMMON_SRC = $(srcdir)/$(LIBCOMMON_DIR) +CLEANDIRS = $(LIBCOMMON_DIR) +REQUIRED_SUBDIRS = $(LIBCOMMON_DIR) + SOURCES = $(SFILES) TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS} @@ -291,6 +294,7 @@ TAGS: ${TAGFILES} tags: TAGS clean: + @$(MAKE) $(FLAGS_TO_PASS) DO=clean "DODIRS=$(CLEANDIRS)" subdir_do rm -f *.o ${ADD_FILES} *~ rm -f version.c rm -f gdbserver$(EXEEXT) gdbreplay$(EXEEXT) core make.log @@ -314,6 +318,7 @@ clean: rm -f i386-mmx.c i386-mmx-linux.c maintainer-clean realclean distclean: clean + @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(CLEANDIRS)" subdir_do rm -f nm.h tm.h xm.h config.status config.h stamp-h config.log rm -f Makefile @@ -321,6 +326,22 @@ config.h: stamp-h ; @true stamp-h: config.in config.status CONFIG_FILES="" CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status +subdir_do: force + @for i in $(DODIRS); do \ + case $$i in \ + $(REQUIRED_SUBDIRS)) \ + if [ ! -f ./$$i/Makefile ] ; then \ + echo "Missing $$i/Makefile" >&2 ; \ + exit 1 ; \ + fi ;; \ + esac ; \ + if [ -f ./$$i/Makefile ] ; then \ + if (cd ./$$i; \ + $(MAKE) $(FLAGS_TO_PASS) $(DO)) ; then true ; \ + else exit 1 ; fi ; \ + else true ; fi ; \ + done + Makefile: Makefile.in config.status CONFIG_HEADERS="" $(SHELL) ./config.status |