This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit+RFC] gdbserver: configure + make clean fails (no 'common' subdir)


This problem was noticed during the nightly snapshot build,
but can be reduced to:

        % /path/to/gdb/gdbserver/configure
        % make clean

The "make clean" fails, because it tries to do a "make clean"
in the common/ subdirectory.  But the problem is that this
common/ subdirectory is NOT created during the configure phase,
but rather during the build phase.  The error is fatal because
we had put the common subdirectory in the list of REQUIRED_SUBDIRS.

The approach I chose for now is to remove "common" from the list
of REQUIRED_SUBDIRS. That way, if the directory does not exist,
"make clean" does not fail.

But now that the urgency is taken care of, what is the best approach?
I'm a little unsure, because it feels like "common" does not fit
all that well in the REQUIRED_SUBDIRS scheme; or, does it? We could
put it back, but then we'd have to add some code in configure to
also configure gdbserver/common (which means creating it first, etc).
This is already taken care of by the Makefile, and I'm not sure
how much will need to be moved, and how much will have to stay to
handle common/configure.ac changes (et al). [Note: You can't use
AC_CONFIG_SUBDIRS in this case, so the sub-configuring of
gdbserver/common has to be written manually]

gdb/gdbserver/ChangeLog:

        * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).

Tested on x86_64-linux.  Checked in.

---
 gdb/gdbserver/ChangeLog   |    4 ++++
 gdb/gdbserver/Makefile.in |    2 +-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog
index 7fa2e15..577a14b 100644
--- a/gdb/gdbserver/ChangeLog
+++ b/gdb/gdbserver/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-06  Yao Qi  <yao@codesourcery.com>
+
+	* Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
+
 2011-03-05  Yao Qi  <yao@codesourcery.com>
 
 	* Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in
index 50d468e..81cf25a 100644
--- a/gdb/gdbserver/Makefile.in
+++ b/gdb/gdbserver/Makefile.in
@@ -137,7 +137,7 @@ LIBCOMMON = $(LIBCOMMON_DIR)/libcommon.a
 LIBCOMMON_SRC = $(srcdir)/$(LIBCOMMON_DIR)
 
 CLEANDIRS = $(LIBCOMMON_DIR)
-REQUIRED_SUBDIRS = $(LIBCOMMON_DIR)
+REQUIRED_SUBDIRS = no-required-subdir-yet
 
 SOURCES = $(SFILES)
 TAGFILES = $(SOURCES) ${HFILES} ${ALLPARAM} ${POSSLIBS}
-- 
1.7.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]