This is the mail archive of the gdb-cvs@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]

[binutils-gdb] Move target object files to target subdirectory


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=66599a7dc0369583229c0c51e5e009cfa7cceb73

commit 66599a7dc0369583229c0c51e5e009cfa7cceb73
Author: Tom Tromey <tom@tromey.com>
Date:   Tue Nov 21 14:29:59 2017 -0700

    Move target object files to target subdirectory
    
    Move the object files corresponding to target/*.c to the target
    subdirectory in the build tree.
    
    ChangeLog
    2017-11-27  Tom Tromey  <tom@tromey.com>
    
    	* Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
    	variables.
    	(SFILES): Use SUBDIR_TARGET_SRCS.
    	(COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
    	(CONFIG_SRC_SUBDIR): Add target.
    	(%.o): Remove target rule.

Diff:
---
 gdb/ChangeLog   |  9 +++++++++
 gdb/Makefile.in | 14 +++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c87f406..1d4d9d7 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
 2017-11-27  Tom Tromey  <tom@tromey.com>
 
+	* Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
+	variables.
+	(SFILES): Use SUBDIR_TARGET_SRCS.
+	(COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
+	(CONFIG_SRC_SUBDIR): Add target.
+	(%.o): Remove target rule.
+
+2017-11-27  Tom Tromey  <tom@tromey.com>
+
 	* Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
 	registry.o, thread-fsm.o, debug.o.
 	(COMMON_SFILES): Add filename-seen-cache.c, registry.c,
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 06d8841..c52b735c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -429,6 +429,10 @@ SUBDIR_UNITTESTS_SRCS = \
 
 SUBDIR_UNITTESTS_OBS = $(patsubst %.c,%.o,$(SUBDIR_UNITTESTS_SRCS))
 
+SUBDIR_TARGET_SRCS = target/waitstatus.c
+SUBDIR_TARGET_OBS = $(patsubst %.c,%.o,$(SUBDIR_TARGET_SRCS))
+
+
 # Opcodes currently live in one of two places.  Either they are in the
 # opcode library, typically ../opcodes, or they are in a header file
 # in INCLUDE_DIR.
@@ -518,7 +522,7 @@ CONFIG_INSTALL = @CONFIG_INSTALL@
 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
 
-CONFIG_SRC_SUBDIR = arch cli mi compile tui unittests guile python
+CONFIG_SRC_SUBDIR = arch cli mi compile tui unittests guile python target
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1152,7 +1156,7 @@ SFILES = \
 	common/vec.c \
 	common/xml-utils.c \
 	mi/mi-common.c \
-	target/waitstatus.c \
+	$(SUBDIR_TARGET_SRCS) \
 	$(COMMON_SFILES) \
 	$(SUBDIR_GCC_COMPILE_SRCS)
 
@@ -1567,10 +1571,10 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
 	signals-state-save-restore.o \
 	vec.o \
 	version.o \
-	waitstatus.o \
 	xml-builtin.o \
 	xml-utils.o \
 	$(patsubst %.c,%.o,$(COMMON_SFILES)) \
+	$(SUBDIR_TARGET_OBS) \
 	$(SUBDIR_GCC_COMPILE_OBS)
 
 TSOBS = inflow.o
@@ -1648,10 +1652,6 @@ python/%.o: INTERNAL_CFLAGS += $(PYTHON_CFLAGS)
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-%.o: ${srcdir}/target/%.c
-	$(COMPILE) $<
-	$(POSTCOMPILE)
-
 # Specify an explicit rule for gdb/common/agent.c, to avoid a clash with the
 # object file generate by gdb/agent.c.
 common-agent.o: $(srcdir)/common/agent.c


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