public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [RFA 06/13] Move unittests object files to unittests subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (6 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 08/13] Move python object files to python subdirectory Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:10 ` [RFA 10/13] Simplify COMMON_OBS by using list of sources Tom Tromey
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Move the object files corresponding to unittests/*.c to the unittests
subdirectory in the build tree.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
	(%.o): Remove unittests rule.
	(CONFIG_SRC_SUBDIR): Add unittests.
---
 gdb/ChangeLog   |  6 ++++++
 gdb/Makefile.in | 20 ++------------------
 2 files changed, 8 insertions(+), 18 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 77821d356e..aef015d9cf 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -490,19 +490,7 @@ SUBDIR_UNITTESTS_SRCS = \
 	unittests/scoped_restore-selftests.c \
 	unittests/xml-utils-selftests.c
 
-SUBDIR_UNITTESTS_OBS = \
-	array-view-selftests.o \
-	common-utils-selftests.o \
-	environ-selftests.o \
-	function-view-selftests.o \
-	lookup_name_info-selftests.o \
-	memory-map-selftests.o \
-	memrange-selftests.o \
-	offset-type-selftests.o \
-	optional-selftests.o \
-	ptid-selftests.o \
-	scoped_restore-selftests.o \
-	xml-utils-selftests.o
+SUBDIR_UNITTESTS_OBS = $(patsubst %.c,%.o,$(SUBDIR_UNITTESTS_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
@@ -593,7 +581,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
+CONFIG_SRC_SUBDIR = arch cli mi compile tui unittests
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1906,10 +1894,6 @@ $(CONFIG_DEP_SUBDIR):
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-%.o: ${srcdir}/unittests/%.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
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 04/13] Move compile object files to compile subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
  2017-11-21 22:10 ` [RFA 01/13] A simpler way to make the "arch" build directory Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:10 ` [RFA 11/13] Add missing files to COMMON_SFILES Tom Tromey
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Move the object files corresponding to compile/*.c to the compile
subdirectory in the build tree.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
	(%.o): Remove compile rule.
	(CONFIG_SRC_SUBDIR): Add compile.
---
 gdb/ChangeLog   |  6 ++++++
 gdb/Makefile.in | 17 +++--------------
 2 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index aade0bd995..f8b8cfdd39 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -324,15 +324,6 @@ SUBDIR_TUI_CFLAGS = -DTUI=1
 #
 # GCC Compile support sub-directory definitions
 #
-SUBDIR_GCC_COMPILE_OBS = \
-	compile.o \
-	compile-c-support.o \
-	compile-c-symbols.o \
-	compile-c-types.o \
-	compile-loc2c.o \
-	compile-object-load.o \
-	compile-object-run.o
-
 SUBDIR_GCC_COMPILE_SRCS = \
 	compile/compile.c \
 	compile/compile-c-support.c \
@@ -344,6 +335,8 @@ SUBDIR_GCC_COMPILE_SRCS = \
 	compile/compile-object-run.c \
 	compile/compile-object-run.h
 
+SUBDIR_GCC_COMPILE_OBS = $(patsubst %.c,%.o,$(filter %.c,$(SUBDIR_GCC_COMPILE_SRCS)))
+
 #
 # Guile sub directory definitons for guile support.
 #
@@ -617,7 +610,7 @@ CONFIG_INSTALL = @CONFIG_INSTALL@
 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
 
-CONFIG_SRC_SUBDIR = arch cli mi
+CONFIG_SRC_SUBDIR = arch cli mi compile
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1910,10 +1903,6 @@ $(CONFIG_DEP_SUBDIR):
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-%.o: $(srcdir)/compile/%.c
-	$(COMPILE) $<
-	$(POSTCOMPILE)
-
 %.o: $(srcdir)/gdbtk/generic/%.c
 	$(COMPILE) $(all_gdbtk_cflags) $<
 	$(POSTCOMPILE)
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 02/13] Move cli object files to cli subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (8 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 10/13] Simplify COMMON_OBS by using list of sources Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:12 ` [RFA 12/13] Move target object files to target subdirectory Tom Tromey
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Following the "arch" move, this moves the object files corresponding
to the cli/*.c source files to the "cli" build directory.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (SUBDIR_CLI_OBS): Redefine.
	(%.o): Remove cli rule.
	(CONFIG_SRC_SUBDIR): Add cli.
---
 gdb/ChangeLog   |  6 ++++++
 gdb/Makefile.in | 18 +++---------------
 2 files changed, 9 insertions(+), 15 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 31bf8db30f..c65816be26 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -232,16 +232,6 @@ GNULIB_H = $(GNULIB_BUILDDIR)/import/string.h @GNULIB_STDINT_H@
 #
 # CLI sub directory definitons
 #
-SUBDIR_CLI_OBS = \
-	cli-cmds.o \
-	cli-decode.o \
-	cli-dump.o \
-	cli-interp.o \
-	cli-logging.o \
-	cli-script.o \
-	cli-setshow.o \
-	cli-utils.o
-
 SUBDIR_CLI_SRCS = \
 	cli/cli-cmds.c \
 	cli/cli-decode.c \
@@ -252,6 +242,8 @@ SUBDIR_CLI_SRCS = \
 	cli/cli-setshow.c \
 	cli/cli-utils.c
 
+SUBDIR_CLI_OBS = $(patsubst %.c,%.o,$(SUBDIR_CLI_SRCS))
+
 SUBDIR_CLI_DEPS =
 SUBDIR_CLI_LDFLAGS =
 SUBDIR_CLI_CFLAGS =
@@ -642,7 +634,7 @@ CONFIG_INSTALL = @CONFIG_INSTALL@
 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
 
-CONFIG_SRC_SUBDIR = arch
+CONFIG_SRC_SUBDIR = arch cli
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1931,10 +1923,6 @@ $(CONFIG_DEP_SUBDIR):
 	$(SHELL) $(srcdir)/../mkinstalldirs $@
 
 # Rules for compiling .c files in the various source subdirectories.
-%.o: $(srcdir)/cli/%.c
-	$(COMPILE) $<
-	$(POSTCOMPILE)
-
 %.o: ${srcdir}/common/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 09/13] Define YYOBJ in terms of YYFILES
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (3 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 05/13] Move tui object files to tui subdirectory Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:10 ` [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources Tom Tromey
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Change YYOBJ to be defined in terms of YYFILES.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (YYFILES): Update comment.
	(YYOBJ): Redefine.
---
 gdb/ChangeLog   |  5 +++++
 gdb/Makefile.in | 15 ++++-----------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 93d819e11d..16236f4ad4 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1747,7 +1747,7 @@ CLEANDIRS = $(SUBDIRS)
 # The format here is for the `case' shell command.
 REQUIRED_SUBDIRS = doc | testsuite | $(GNULIB_BUILDDIR) | data-directory
 
-# For now, shortcut the "configure GDB for fewer languages" stuff.
+# Parser intermediate files.
 YYFILES = \
 	ada-exp.c \
 	ada-lex.c \
@@ -1760,16 +1760,9 @@ YYFILES = \
 	p-exp.c \
 	rust-exp.c
 
-YYOBJ = \
-	ada-exp.o \
-	c-exp.o \
-	cp-name-parser.o \
-	d-exp.o \
-	f-exp.o \
-	go-exp.o \
-	m2-exp.o \
-	p-exp.o \
-	rust-exp.o
+# ada-lex.c is included by another file, so it shouldn't wind up as a
+# .o itself.
+YYOBJ = $(filter-out ada-lex.o,$(patsubst %.c,%.o,$(YYFILES)))
 
 # Things which need to be built when making a distribution.
 
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 10/13] Simplify COMMON_OBS by using list of sources
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (7 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 06/13] Move unittests object files to unittests subdirectory Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-22 11:06   ` Pedro Alves
  2017-11-21 22:10 ` [RFA 02/13] Move cli object files to cli subdirectory Tom Tromey
                   ` (4 subsequent siblings)
  13 siblings, 1 reply; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This introduces a new COMMON_SFILES variable, and then defines some of
COMMON_OBS in terms of this new variable.  This simpifies adding a new
ordinary source file.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (COMMON_SFILES): New.
	(SFILES): Move some entries to COMMON_SFILES.
	(COMMON_OBS): Use COMMON_SFILES.
---
 gdb/ChangeLog   |   6 ++
 gdb/Makefile.in | 245 +++++++++-----------------------------------------------
 2 files changed, 44 insertions(+), 207 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 16236f4ad4..4161361ce3 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -905,10 +905,10 @@ TARGET_FLAGS_TO_PASS = \
 
 # All source files that go into linking GDB.
 # Links made at configuration time should not be specified here, since
-# SFILES is used in building the distribution archive.
 
-SFILES = \
-	ada-exp.y \
+# Files that should wind up in SFILES and whose corresponding .o
+# should be in COMMON_OBS.
+COMMON_SFILES = \
 	ada-lang.c \
 	ada-tasks.c \
 	ada-typeprint.c \
@@ -918,11 +918,8 @@ SFILES = \
 	agent.c \
 	annotate.c \
 	arch-utils.c \
-	arch/i386.c \
 	auto-load.c \
 	auxv.c \
-	ax-gdb.c \
-	ax-general.c \
 	bcache.c \
 	bfd-target.c \
 	block.c \
@@ -934,7 +931,6 @@ SFILES = \
 	btrace.c \
 	build-id.c \
 	buildsym.c \
-	c-exp.y \
 	c-lang.c \
 	c-typeprint.c \
 	c-valprint.c \
@@ -950,12 +946,9 @@ SFILES = \
 	corefile.c \
 	corelow.c \
 	cp-abi.c \
-	cp-name-parser.y \
 	cp-namespace.c \
 	cp-support.c \
 	cp-valprint.c \
-	ctf.c \
-	d-exp.y \
 	d-lang.c \
 	d-namespace.c \
 	d-valprint.c \
@@ -964,21 +957,18 @@ SFILES = \
 	dictionary.c \
 	disasm.c \
 	disasm-selftests.c \
-	dtrace-probe.c \
 	dummy-frame.c \
 	dwarf2-frame.c \
 	dwarf2-frame-tailcall.c \
 	dwarf2expr.c \
 	dwarf2loc.c \
 	dwarf2read.c \
-	elfread.c \
 	eval.c \
 	event-loop.c \
 	event-top.c \
 	exceptions.c \
 	expprint.c \
 	extension.c \
-	f-exp.y \
 	f-lang.c \
 	f-typeprint.c \
 	f-valprint.c \
@@ -989,7 +979,6 @@ SFILES = \
 	frame-base.c \
 	frame-unwind.c \
 	gcore.c \
-	gdb.c \
 	gdb_bfd.c \
 	gdb-dlfcn.c \
 	gdb_obstack.c \
@@ -1000,7 +989,6 @@ SFILES = \
 	gdbtypes.c \
 	gnu-v2-abi.c \
 	gnu-v3-abi.c \
-	go-exp.y \
 	go-lang.c \
 	go-typeprint.c \
 	go-valprint.c \
@@ -1009,7 +997,6 @@ SFILES = \
 	infcall.c \
 	infcmd.c \
 	inferior.c \
-	inflow.c \
 	infrun.c \
 	inline-frame.c \
 	interps.c \
@@ -1017,7 +1004,6 @@ SFILES = \
 	language.c \
 	linespec.c \
 	location.c \
-	m2-exp.y \
 	m2-lang.c \
 	m2-typeprint.c \
 	m2-valprint.c \
@@ -1042,7 +1028,6 @@ SFILES = \
 	opencl-lang.c \
 	osabi.c \
 	osdata.c \
-	p-exp.y \
 	p-lang.c \
 	p-typeprint.c \
 	p-valprint.c \
@@ -1050,7 +1035,6 @@ SFILES = \
 	printcmd.c \
 	probe.c \
 	producer.c \
-	proc-service.list \
 	progspace.c \
 	progspace-and-thread.c \
 	prologue-value.c \
@@ -1060,31 +1044,21 @@ SFILES = \
 	record-full.c \
 	regcache.c \
 	reggroups.c \
-	remote.c \
-	remote-fileio.c \
-	remote-notif.c \
 	reverse.c \
-	rust-exp.y \
 	rust-lang.c \
 	selftest-arch.c \
 	sentinel-frame.c \
-	ser-base.c \
 	ser-event.c \
-	ser-unix.c \
 	serial.c \
 	skip.c \
-	sol-thread.c \
 	solib.c \
 	solib-target.c \
 	source.c \
 	stabsread.c \
 	stack.c \
-	stap-probe.c \
 	std-regs.c \
-	stub-termcap.c \
 	symfile.c \
 	symfile-debug.c \
-	symfile-mem.c \
 	symmisc.c \
 	symtab.c \
 	target.c \
@@ -1094,13 +1068,11 @@ SFILES = \
 	thread.c \
 	tid-parse.c \
 	top.c \
-	tracepoint.c \
 	trad-frame.c \
 	tramp-frame.c \
 	target-float.c \
 	typeprint.c \
 	ui-file.c \
-	ui-file.h \
 	ui-out.c \
 	user-regs.c \
 	utils.c \
@@ -1111,7 +1083,39 @@ SFILES = \
 	varobj.c \
 	xml-support.c \
 	xml-syscall.c \
-	xml-tdesc.c \
+	xml-tdesc.c
+
+# SFILES is used in building the distribution archive.
+SFILES = \
+	ada-exp.y \
+	arch/i386.c \
+	ax-gdb.c \
+	ax-general.c \
+	c-exp.y \
+	cp-name-parser.y \
+	ctf.c \
+	d-exp.y \
+	dtrace-probe.c \
+	elfread.c \
+	f-exp.y \
+	gdb.c \
+	go-exp.y \
+	inflow.c \
+	m2-exp.y \
+	p-exp.y \
+	proc-service.list \
+	remote.c \
+	remote-fileio.c \
+	remote-notif.c \
+	rust-exp.y \
+	ser-base.c \
+	ser-unix.c \
+	sol-thread.c \
+	stap-probe.c \
+	stub-termcap.c \
+	symfile-mem.c \
+	tracepoint.c \
+	ui-file.h \
 	common/agent.c \
 	common/btrace-common.c \
 	common/buffer.c \
@@ -1140,6 +1144,7 @@ SFILES = \
 	common/xml-utils.c \
 	mi/mi-common.c \
 	target/waitstatus.c \
+	$(COMMON_SFILES) \
 	$(SUBDIR_GCC_COMPILE_SRCS)
 
 LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
@@ -1524,216 +1529,42 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
 TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
 
 COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
-	ada-lang.o \
-	ada-tasks.o \
-	ada-typeprint.o \
-	ada-valprint.o \
-	ada-varobj.o \
-	addrmap.o \
-	agent.o \
-	annotate.o \
-	arch-utils.o \
-	auto-load.o \
-	auxv.o \
-	bcache.o \
-	bfd-target.o \
-	block.o \
-	blockframe.o \
-	break-catch-sig.o \
-	break-catch-syscall.o \
-	break-catch-throw.o \
-	breakpoint.o \
-	btrace.o \
 	btrace-common.o \
 	buffer.o \
-	build-id.o \
-	buildsym.o \
-	c-lang.o \
-	c-typeprint.o \
-	c-valprint.o \
-	c-varobj.o \
-	charset.o \
 	cleanups.o \
-	cli-out.o \
-	coff-pe-read.o \
-	coffread.o \
 	common-agent.o \
 	common-debug.o \
 	common-exceptions.o \
 	job-control.o \
 	common-regcache.o \
 	common-utils.o \
-	complaints.o \
-	completer.o \
-	continuations.o \
-	copying.o \
-	corefile.o \
-	corelow.o \
-	cp-abi.o \
-	cp-namespace.o \
-	cp-support.o \
-	cp-valprint.o \
-	d-lang.o \
-	d-namespace.o \
-	d-valprint.o \
-	dbxread.o \
 	debug.o \
-	demangle.o \
-	dictionary.o \
-	disasm.o \
-	disasm-selftests.o \
-	dummy-frame.o \
-	dwarf2-frame.o \
-	dwarf2-frame-tailcall.o \
-	dwarf2expr.o \
-	dwarf2loc.o \
-	dwarf2read.o \
 	environ.o \
 	errors.o \
-	eval.o \
-	event-loop.o \
-	event-top.o \
-	exceptions.o \
 	exec.o \
-	expprint.o \
-	extension.o \
-	f-lang.o \
-	f-typeprint.o \
-	f-valprint.o \
 	fileio.o \
 	filename-seen-cache.o \
 	filestuff.o \
-	filesystem.o \
-	findcmd.o \
-	findvar.o \
 	format.o \
-	frame.o \
-	frame-base.o \
-	frame-unwind.o \
-	gcore.o \
-	gdb_bfd.o \
 	gdb_tilde_expand.o \
-	gdb-dlfcn.o \
-	gdb_obstack.o \
-	gdb_regex.o \
-	gdb_usleep.o \
 	gdb_vecs.o \
-	gdbarch.o \
-	gdbarch-selftests.o \
-	gdbtypes.o \
-	gnu-v2-abi.o \
-	gnu-v3-abi.o \
-	go-lang.o \
-	go-typeprint.o \
-	go-valprint.o \
-	inf-child.o \
-	inf-loop.o \
-	infcall.o \
-	infcmd.o \
-	inferior.o \
-	infrun.o \
-	inline-frame.o \
-	interps.o \
-	jit.o \
-	language.o \
-	linespec.o \
-	location.o \
-	m2-lang.o \
-	m2-typeprint.o \
-	m2-valprint.o \
-	macrocmd.o \
-	macroexp.o \
-	macroscope.o \
-	macrotab.o \
-	main.o \
-	maint.o \
-	mdebugread.o \
-	mem-break.o \
-	memattr.o \
-	memory-map.o \
-	memrange.o \
 	mi/mi-common.o \
-	minidebug.o \
-	minsyms.o \
-	mipsread.o \
-	namespace.o \
 	new-op.o \
-	objc-lang.o \
-	objfiles.o \
-	observer.o \
-	opencl-lang.o \
-	osabi.o \
-	osdata.o \
-	p-lang.o \
-	p-typeprint.o \
-	p-valprint.o \
-	parse.o \
 	print-utils.o \
-	printcmd.o \
-	probe.o \
-	producer.o \
-	progspace.o \
-	progspace-and-thread.o \
-	prologue-value.o \
-	psymtab.o \
 	ptid.o \
-	record.o \
-	record-btrace.o \
-	record-full.o \
-	regcache.o \
-	reggroups.o \
 	registry.o \
-	reverse.o \
 	rsp-low.o \
 	run-time-clock.o \
-	rust-lang.o \
 	selftest.o \
-	selftest-arch.o \
-	sentinel-frame.o \
-	ser-event.o \
-	serial.o \
 	signals.o \
 	signals-state-save-restore.o \
-	skip.o \
-	solib.o \
-	solib-target.o \
-	source.o \
-	stabsread.o \
-	stack.o \
-	std-regs.o \
-	symfile.o \
-	symfile-debug.o \
-	symmisc.o \
-	symtab.o \
-	target.o \
-	target-dcache.o \
-	target-descriptions.o \
-	target-memory.o \
-	thread.o \
 	thread-fsm.o \
-	tid-parse.o \
-	top.o \
-	trad-frame.o \
-	tramp-frame.o \
-	target-float.o \
-	typeprint.o \
-	ui-file.o \
-	ui-out.o \
-	user-regs.o \
-	utils.o \
-	valarith.o \
-	valops.o \
-	valprint.o \
-	value.o \
-	varobj.o \
 	vec.o \
 	version.o \
 	waitstatus.o \
 	xml-builtin.o \
-	xml-support.o \
-	xml-syscall.o \
-	xml-tdesc.o \
 	xml-utils.o \
+	$(patsubst %.c,%.o,$(COMMON_SFILES)) \
 	$(SUBDIR_GCC_COMPILE_OBS)
 
 TSOBS = inflow.o
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 08/13] Move python object files to python subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (5 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:10 ` [RFA 06/13] Move unittests object files to unittests subdirectory Tom Tromey
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Move the object files corresponding to python/*.c to the python
subdirectory in the build tree.

Because special CFLAGS are passed just to Python compilations, this
patch also required the addition of a pattern rule to update
INTERNAL_CFLAGS for here.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
	(CONFIG_SRC_SUBDIR): Add python.
	(%.o): Remove python rule.
	(python/%.o): New rule.
	* configure: Rebuild.
	* configure.ac (CONFIG_OBS): Refer to python/python.o
---
 gdb/ChangeLog    |  9 +++++++++
 gdb/Makefile.in  | 55 ++++++-------------------------------------------------
 gdb/configure    |  2 +-
 gdb/configure.ac |  2 +-
 4 files changed, 17 insertions(+), 51 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index aab3a38588..93d819e11d 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -359,50 +359,6 @@ SUBDIR_GUILE_CFLAGS =
 #
 # python sub directory definitons
 #
-SUBDIR_PYTHON_OBS = \
-	py-arch.o \
-	py-auto-load.o \
-	py-block.o \
-	py-bpevent.o \
-	py-breakpoint.o \
-	py-cmd.o \
-	py-continueevent.o \
-	py-event.o \
-	py-evtregistry.o \
-	py-evts.o \
-	py-exitedevent.o \
-	py-finishbreakpoint.o \
-	py-frame.o \
-	py-framefilter.o \
-	py-function.o \
-	py-gdb-readline.o \
-	py-inferior.o \
-	py-infevents.o \
-	py-infthread.o \
-	py-instruction.o \
-	py-lazy-string.o \
-	py-linetable.o \
-	py-newobjfileevent.o \
-	py-objfile.o \
-	py-param.o \
-	py-prettyprint.o \
-	py-progspace.o \
-	py-record.o \
-	py-record-btrace.o \
-	py-record-full.o \
-	py-signalevent.o \
-	py-stopevent.o \
-	py-symbol.o \
-	py-symtab.o \
-	py-threadevent.o \
-	py-type.o \
-	py-unwind.o \
-	py-utils.o \
-	py-value.o \
-	py-varobj.o \
-	py-xmethods.o \
-	python.o
-
 SUBDIR_PYTHON_SRCS = \
 	python/py-arch.c \
 	python/py-auto-load.c \
@@ -447,6 +403,8 @@ SUBDIR_PYTHON_SRCS = \
 	python/py-xmethods.c \
 	python/python.c
 
+SUBDIR_PYTHON_OBS = $(patsubst %.c,%.o,$(SUBDIR_PYTHON_SRCS))
+
 SUBDIR_PYTHON_DEPS =
 SUBDIR_PYTHON_LDFLAGS =
 SUBDIR_PYTHON_CFLAGS =
@@ -556,7 +514,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
+CONFIG_SRC_SUBDIR = arch cli mi compile tui unittests guile python
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1844,6 +1802,9 @@ all: gdb$(EXEEXT) $(CONFIG_ALL)
 $(CONFIG_DEP_SUBDIR):
 	$(SHELL) $(srcdir)/../mkinstalldirs $@
 
+# Python files need special flags.
+python/%.o: INTERNAL_CFLAGS += $(PYTHON_CFLAGS)
+
 # Rules for compiling .c files in the various source subdirectories.
 %.o: ${srcdir}/common/%.c
 	$(COMPILE) $<
@@ -1857,10 +1818,6 @@ $(CONFIG_DEP_SUBDIR):
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-%.o: $(srcdir)/python/%.c
-	$(COMPILE) $(PYTHON_CFLAGS) $<
-	$(POSTCOMPILE)
-
 %.o: ${srcdir}/target/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
diff --git a/gdb/configure b/gdb/configure
index e5a5b7c34f..2c24ed4034 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10219,7 +10219,7 @@ $as_echo "${python_has_threads}" >&6; }
 else
   # Even if Python support is not compiled in, we need to have this file
   # included so that the "python" command, et.al., still exists.
-  CONFIG_OBS="$CONFIG_OBS python.o"
+  CONFIG_OBS="$CONFIG_OBS python/python.o"
   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
 fi
 
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b9d456bc7c..3799278cdf 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1005,7 +1005,7 @@ if test "${have_libpython}" != no; then
 else
   # Even if Python support is not compiled in, we need to have this file
   # included so that the "python" command, et.al., still exists.
-  CONFIG_OBS="$CONFIG_OBS python.o"
+  CONFIG_OBS="$CONFIG_OBS python/python.o"
   CONFIG_SRCS="$CONFIG_SRCS python/python.c"
 fi
 
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (4 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 09/13] Define YYOBJ in terms of YYFILES Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-22 11:12   ` Pedro Alves
  2017-11-21 22:10 ` [RFA 08/13] Move python object files to python subdirectory Tom Tromey
                   ` (7 subsequent siblings)
  13 siblings, 1 reply; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This introduces REMOTE_SRCS and redefines REMOTE_OBS in terms of it.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (REMOTE_SRCS): New variable.
	(REMOTE_OBS): Redefine.
	(SFILES): Remove remote sources.  Use REMOTE_SRCS.
	(ALLDEPFILES): Remove dcache.c.
---
 gdb/ChangeLog   |  7 +++++++
 gdb/Makefile.in | 36 ++++++++++++++----------------------
 2 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 6442b11103..b85201dc6d 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -616,19 +616,20 @@ XMLFILES = \
 # See configure.ac.
 SER_HARDWIRE = @SER_HARDWIRE@
 
-# The `remote' debugging target is supported for most architectures,
-# but not all (e.g. 960)
-REMOTE_OBS = \
-	ax-gdb.o \
-	ax-general.o \
-	ctf.o \
-	dcache.o \
-	remote.o \
-	remote-fileio.o \
-	remote-notif.o \
-	tracefile.o \
-	tracefile-tfile.o \
-	tracepoint.o
+# The `remote' debugging target support.
+REMOTE_SRCS = \
+	ax-gdb.c \
+	ax-general.c \
+	ctf.c \
+	dcache.c \
+	remote.c \
+	remote-fileio.c \
+	remote-notif.c \
+	tracefile.c \
+	tracefile-tfile.c \
+	tracepoint.c
+
+REMOTE_OBS = $(patsubst %.c,%.o,$(REMOTE_SRCS))
 
 # This is remote-sim.o if a simulator is to be linked in.
 SIM_OBS = @SIM_OBS@
@@ -1097,11 +1098,8 @@ COMMON_SFILES = \
 SFILES = \
 	ada-exp.y \
 	arch/i386.c \
-	ax-gdb.c \
-	ax-general.c \
 	c-exp.y \
 	cp-name-parser.y \
-	ctf.c \
 	d-exp.y \
 	dtrace-probe.c \
 	elfread.c \
@@ -1112,9 +1110,6 @@ SFILES = \
 	m2-exp.y \
 	p-exp.y \
 	proc-service.list \
-	remote.c \
-	remote-fileio.c \
-	remote-notif.c \
 	rust-exp.y \
 	ser-base.c \
 	ser-unix.c \
@@ -1122,7 +1117,6 @@ SFILES = \
 	stap-probe.c \
 	stub-termcap.c \
 	symfile-mem.c \
-	tracepoint.c \
 	ui-file.h \
 	common/agent.c \
 	common/btrace-common.c \
@@ -2235,8 +2229,6 @@ ALLDEPFILES = \
 	bsd-uthread.c \
 	core-regset.c \
 	darwin-nat.c \
-	dcache.c \
-	dcache.c \
 	dicos-tdep.c \
 	exec.c \
 	fbsd-nat.c \
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 05/13] Move tui object files to tui subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (2 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 11/13] Add missing files to COMMON_SFILES Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:10 ` [RFA 09/13] Define YYOBJ in terms of YYFILES Tom Tromey
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Move the object files corresponding to tui/*.c to the tui subdirectory
in the build tree.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (SUBDIR_TUI_OBS): Redefine.
	(CONFIG_SRC_SUBDIR): Add tui.
	(%.o): Remove tui rule.
---
 gdb/ChangeLog   |  6 ++++++
 gdb/Makefile.in | 27 +++------------------------
 2 files changed, 9 insertions(+), 24 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index f8b8cfdd39..77821d356e 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -279,25 +279,6 @@ SUBDIR_MI_CFLAGS =
 #
 # TUI sub directory definitions
 #
-SUBDIR_TUI_OBS = \
-	tui.o \
-	tui-command.o \
-	tui-data.o \
-	tui-disasm.o \
-	tui-file.o \
-	tui-hooks.o \
-	tui-interp.o \
-	tui-io.o \
-	tui-layout.o \
-	tui-out.o \
-	tui-regs.o \
-	tui-source.o \
-	tui-stack.o \
-	tui-win.o \
-	tui-windata.o \
-	tui-wingeneral.o \
-	tui-winsource.o
-
 SUBDIR_TUI_SRCS = \
 	tui/tui.c \
 	tui/tui-command.c \
@@ -317,6 +298,8 @@ SUBDIR_TUI_SRCS = \
 	tui/tui-wingeneral.c \
 	tui/tui-winsource.c
 
+SUBDIR_TUI_OBS = $(patsubst %.c,%.o,$(SUBDIR_TUI_SRCS))
+
 SUBDIR_TUI_DEPS =
 SUBDIR_TUI_LDFLAGS =
 SUBDIR_TUI_CFLAGS = -DTUI=1
@@ -610,7 +593,7 @@ CONFIG_INSTALL = @CONFIG_INSTALL@
 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
 
-CONFIG_SRC_SUBDIR = arch cli mi compile
+CONFIG_SRC_SUBDIR = arch cli mi compile tui
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1923,10 +1906,6 @@ $(CONFIG_DEP_SUBDIR):
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-%.o: $(srcdir)/tui/%.c
-	$(COMPILE) $<
-	$(POSTCOMPILE)
-
 %.o: ${srcdir}/unittests/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 11/13] Add missing files to COMMON_SFILES
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
  2017-11-21 22:10 ` [RFA 01/13] A simpler way to make the "arch" build directory Tom Tromey
  2017-11-21 22:10 ` [RFA 04/13] Move compile object files to compile subdirectory Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:10 ` [RFA 05/13] Move tui object files to tui subdirectory Tom Tromey
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

While working on the previous patch, I found a few .o files whose
corresponding .c file was not mentioned in Makefile.in.  This patch
fixes the problem.  I pulled this out separately to make it simpler to
review.

ChangeLog
2017-11-21  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,
	thread-fsm.c, debug.c.
---
 gdb/ChangeLog   | 7 +++++++
 gdb/Makefile.in | 8 ++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 4161361ce3..69369cca8a 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -953,6 +953,7 @@ COMMON_SFILES = \
 	d-namespace.c \
 	d-valprint.c \
 	dbxread.c \
+	debug.c \
 	demangle.c \
 	dictionary.c \
 	disasm.c \
@@ -972,6 +973,7 @@ COMMON_SFILES = \
 	f-lang.c \
 	f-typeprint.c \
 	f-valprint.c \
+	filename-seen-cache.c \
 	filesystem.c \
 	findcmd.c \
 	findvar.c \
@@ -1044,6 +1046,7 @@ COMMON_SFILES = \
 	record-full.c \
 	regcache.c \
 	reggroups.c \
+	registry.c \
 	reverse.c \
 	rust-lang.c \
 	selftest-arch.c \
@@ -1066,6 +1069,7 @@ COMMON_SFILES = \
 	target-descriptions.c \
 	target-memory.c \
 	thread.c \
+	thread-fsm.c \
 	tid-parse.c \
 	top.c \
 	trad-frame.c \
@@ -1538,12 +1542,10 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
 	job-control.o \
 	common-regcache.o \
 	common-utils.o \
-	debug.o \
 	environ.o \
 	errors.o \
 	exec.o \
 	fileio.o \
-	filename-seen-cache.o \
 	filestuff.o \
 	format.o \
 	gdb_tilde_expand.o \
@@ -1552,13 +1554,11 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
 	new-op.o \
 	print-utils.o \
 	ptid.o \
-	registry.o \
 	rsp-low.o \
 	run-time-clock.o \
 	selftest.o \
 	signals.o \
 	signals-state-save-restore.o \
-	thread-fsm.o \
 	vec.o \
 	version.o \
 	waitstatus.o \
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 01/13] A simpler way to make the "arch" build directory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
@ 2017-11-21 22:10 ` Tom Tromey
  2017-11-21 22:10 ` [RFA 04/13] Move compile object files to compile subdirectory Tom Tromey
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This implements a simpler way to make the "arch" build directory --
namely, now it is done as an order-only dependency in the Makefile,
rather than being created when config.status is run.  This simpler
because it means that the build directories can be changed without
re-running autoconf.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
	* configure: Rebuild.
	* Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
	(CONFIG_DEP_SUBDIR): New variable.
	(%.o): Add order-only dependency.
	($(CONFIG_DEP_SUBDIR)): New target.
---
 gdb/ChangeLog    |  9 +++++++++
 gdb/Makefile.in  | 10 ++++++++--
 gdb/configure    | 15 ---------------
 gdb/configure.ac | 11 -----------
 4 files changed, 17 insertions(+), 28 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a3bfbf93e1..31bf8db30f 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -640,9 +640,11 @@ CONFIG_ALL = @CONFIG_ALL@
 CONFIG_CLEAN = @CONFIG_CLEAN@
 CONFIG_INSTALL = @CONFIG_INSTALL@
 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
-CONFIG_SRC_SUBDIR = @CONFIG_SRC_SUBDIR@
 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
 
+CONFIG_SRC_SUBDIR = arch
+CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
+
 # -I. for config files.
 # -I$(srcdir) for gdb internal headers.
 # -I$(srcdir)/config for more generic config files.
@@ -1920,10 +1922,14 @@ all: gdb$(EXEEXT) $(CONFIG_ALL)
 	@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
 
 # Rule for compiling .c files in the top-level gdb directory.
-%.o: %.c
+# The order-only dependencies ensure that we create the build subdirectories.
+%.o: %.c | $(CONFIG_DEP_SUBDIR)
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
+$(CONFIG_DEP_SUBDIR):
+	$(SHELL) $(srcdir)/../mkinstalldirs $@
+
 # Rules for compiling .c files in the various source subdirectories.
 %.o: $(srcdir)/cli/%.c
 	$(COMPILE) $<
diff --git a/gdb/configure b/gdb/configure
index def194dcee..e30a68c243 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -733,7 +733,6 @@ LIBINTL_DEP
 LIBINTL
 USE_NLS
 CCDEPMODE
-CONFIG_SRC_SUBDIR
 DEPDIR
 am__leading_dot
 CXX_DIALECT
@@ -5950,13 +5949,6 @@ DEPDIR="${am__leading_dot}deps"
 ac_config_commands="$ac_config_commands depdir"
 
 
-# Create sub-directories for objects and dependencies.
-CONFIG_SRC_SUBDIR="arch"
-
-
-ac_config_commands="$ac_config_commands gdbdepdir"
-
-
 depcc="$CC"   am_compiler_list=
 
 am_depcomp=$ac_aux_dir/depcomp
@@ -18013,7 +18005,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # INIT-COMMANDS
 #
 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
-ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"
 
 _ACEOF
 
@@ -18025,7 +18016,6 @@ do
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
     "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
-    "gdbdepdir") CONFIG_COMMANDS="$CONFIG_COMMANDS gdbdepdir" ;;
     "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
     "$ac_config_links_1") CONFIG_LINKS="$CONFIG_LINKS $ac_config_links_1" ;;
     "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
@@ -18649,11 +18639,6 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
   case $ac_file$ac_mode in
     "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
-    "gdbdepdir":C)
-  for subdir in ${CONFIG_SRC_SUBDIR}
-  do
-      $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
-  done ;;
     "gcore":F) chmod +x gcore ;;
     "Makefile":F)
 case x$CONFIG_HEADERS in
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b909217c77..92f04316f9 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -44,17 +44,6 @@ AX_CXX_COMPILE_STDCXX(11, , mandatory)
 
 # Dependency checking.
 ZW_CREATE_DEPDIR
-# Create sub-directories for objects and dependencies.
-CONFIG_SRC_SUBDIR="arch"
-AC_SUBST(CONFIG_SRC_SUBDIR)
-
-AC_CONFIG_COMMANDS([gdbdepdir],[
-  for subdir in ${CONFIG_SRC_SUBDIR}
-  do
-      $SHELL $ac_aux_dir/mkinstalldirs $subdir/$DEPDIR
-  done],
-  [ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR CONFIG_SRC_SUBDIR="$CONFIG_SRC_SUBDIR"])
-
 ZW_PROG_COMPILER_DEPENDENCIES([CC])
 
 gnulib_extra_configure_args=
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 00/13] Makefile simplifications and subdirification
@ 2017-11-21 22:10 Tom Tromey
  2017-11-21 22:10 ` [RFA 01/13] A simpler way to make the "arch" build directory Tom Tromey
                   ` (13 more replies)
  0 siblings, 14 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:10 UTC (permalink / raw)
  To: gdb-patches

This is a follow-on to Yao's earlier patch to move some object files
to subdirectories.

This first changes the approach to making such subdirectories, to make
it simpler on subsequent patches.  Then it moves object files to
subdirs, removing hand-maintained lists of .o files in favor of
patsubst, following the "don't repeat yourself" principle.

The last patches apply similar cleanups more generically.  The net
result is the removal of many redundant lines of code.

I did not touch common/ in this series.  I started this, but due to
commmon/common.host, a change here would require touching gdbserver as
well, which I did not want to do.

I think there are more cleanups available to be done; I just did not
do them.  A good end goal, I think, would be to make it so that only
source files are explicitly named in the Makefile, with the
intermediate names being generated from the source lists.  This would
make adding new source files much simpler.

Tested by rebuilding.  I also did a build with
--disable-{python,guile,tui,gdbmi} (did you know you can disable MI?).
You may need to do a clean build if this lands; though I am not
completely certain.

Tom

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 03/13] Move mi objects to mi subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (10 preceding siblings ...)
  2017-11-21 22:12 ` [RFA 12/13] Move target object files to target subdirectory Tom Tromey
@ 2017-11-21 22:12 ` Tom Tromey
  2017-11-21 22:12 ` [RFA 07/13] Move guile object files to guile subdirectory Tom Tromey
  2017-11-22 11:14 ` [RFA 00/13] Makefile simplifications and subdirification Pedro Alves
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Move object files corresponding to mi/*.c to a subdirectory in the
build tree.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* Makefile.in (SUBDIR_MI_OBS): Redefine.
	(%.o): Remove mi rule.
	(CONFIG_SRC_SUBDIR): Add mi.
	(COMMON_OBS): Use mi/mi-common.o
---
 gdb/ChangeLog   |  7 +++++++
 gdb/Makefile.in | 29 ++++-------------------------
 2 files changed, 11 insertions(+), 25 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index c65816be26..aade0bd995 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -251,25 +251,6 @@ SUBDIR_CLI_CFLAGS =
 #
 # MI sub directory definitons
 #
-SUBDIR_MI_OBS = \
-	mi-cmd-break.o \
-	mi-cmd-catch.o \
-	mi-cmd-disas.o \
-	mi-cmd-env.o \
-	mi-cmd-file.o \
-	mi-cmd-info.o \
-	mi-cmd-stack.o \
-	mi-cmd-target.o \
-	mi-cmd-var.o \
-	mi-cmds.o \
-	mi-console.o \
-	mi-getopt.o \
-	mi-interp.o \
-	mi-main.o \
-	mi-out.o \
-	mi-parse.o \
-	mi-symbol-cmds.o
-
 SUBDIR_MI_SRCS = \
 	mi/mi-cmd-break.c \
 	mi/mi-cmd-catch.c \
@@ -289,6 +270,8 @@ SUBDIR_MI_SRCS = \
 	mi/mi-parse.c \
 	mi/mi-symbol-cmds.c
 
+SUBDIR_MI_OBS = $(patsubst %.c,%.o,$(SUBDIR_MI_SRCS))
+
 SUBDIR_MI_DEPS =
 SUBDIR_MI_LDFLAGS =
 SUBDIR_MI_CFLAGS =
@@ -634,7 +617,7 @@ CONFIG_INSTALL = @CONFIG_INSTALL@
 CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
 HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
 
-CONFIG_SRC_SUBDIR = arch cli
+CONFIG_SRC_SUBDIR = arch cli mi
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1772,7 +1755,7 @@ COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
 	memattr.o \
 	memory-map.o \
 	memrange.o \
-	mi-common.o \
+	mi/mi-common.o \
 	minidebug.o \
 	minsyms.o \
 	mipsread.o \
@@ -1939,10 +1922,6 @@ $(CONFIG_DEP_SUBDIR):
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-%.o: $(srcdir)/mi/%.c
-	$(COMPILE) $<
-	$(POSTCOMPILE)
-
 %.o: ${srcdir}/nat/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 12/13] Move target object files to target subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (9 preceding siblings ...)
  2017-11-21 22:10 ` [RFA 02/13] Move cli object files to cli subdirectory Tom Tromey
@ 2017-11-21 22:12 ` Tom Tromey
  2017-11-21 22:12 ` [RFA 03/13] Move mi objects to mi subdirectory Tom Tromey
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Move the object files corresponding to target/*.c to the target
subdirectory in the build tree.

ChangeLog
2017-11-21  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.
---
 gdb/ChangeLog   |  9 +++++++++
 gdb/Makefile.in | 14 +++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 69369cca8a..6442b11103 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -425,6 +425,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.
@@ -514,7 +518,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.
@@ -1147,7 +1151,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)
 
@@ -1561,10 +1565,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
@@ -1642,10 +1646,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
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [RFA 07/13] Move guile object files to guile subdirectory
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (11 preceding siblings ...)
  2017-11-21 22:12 ` [RFA 03/13] Move mi objects to mi subdirectory Tom Tromey
@ 2017-11-21 22:12 ` Tom Tromey
  2017-11-22 11:14 ` [RFA 00/13] Makefile simplifications and subdirification Pedro Alves
  13 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-21 22:12 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

Move the object files corresponding to guile/*.c to the guile
subdirectory in the build tree.

ChangeLog
2017-11-21  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac (CONFIG_OBS): Refer to guile/guile.o.
	* Makefile.in (SUBDIR_GUILE_OBS): Redefine.
	(CONFIG_SRC_SUBDIR): Add guile.
	(%.o): Remove guile rule.
---
 gdb/ChangeLog    |  8 ++++++++
 gdb/Makefile.in  | 35 +++--------------------------------
 gdb/configure    |  2 +-
 gdb/configure.ac |  2 +-
 4 files changed, 13 insertions(+), 34 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index aef015d9cf..aab3a38588 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -323,33 +323,6 @@ SUBDIR_GCC_COMPILE_OBS = $(patsubst %.c,%.o,$(filter %.c,$(SUBDIR_GCC_COMPILE_SR
 #
 # Guile sub directory definitons for guile support.
 #
-SUBDIR_GUILE_OBS = \
-	guile.o \
-	scm-arch.o \
-	scm-auto-load.o \
-	scm-block.o \
-	scm-breakpoint.o \
-	scm-cmd.o \
-	scm-disasm.o \
-	scm-exception.o \
-	scm-frame.o \
-	scm-gsmob.o \
-	scm-iterator.o \
-	scm-lazy-string.o \
-	scm-math.o \
-	scm-objfile.o \
-	scm-param.o \
-	scm-ports.o \
-	scm-pretty-print.o \
-	scm-progspace.o \
-	scm-safe-call.o \
-	scm-string.o \
-	scm-symbol.o \
-	scm-symtab.o \
-	scm-type.o \
-	scm-utils.o \
-	scm-value.o
-
 SUBDIR_GUILE_SRCS = \
 	guile/guile.c \
 	guile/scm-arch.c \
@@ -377,6 +350,8 @@ SUBDIR_GUILE_SRCS = \
 	guile/scm-utils.c \
 	guile/scm-value.c
 
+SUBDIR_GUILE_OBS = $(patsubst %.c,%.o,$(SUBDIR_GUILE_SRCS))
+
 SUBDIR_GUILE_DEPS =
 SUBDIR_GUILE_LDFLAGS =
 SUBDIR_GUILE_CFLAGS =
@@ -581,7 +556,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
+CONFIG_SRC_SUBDIR = arch cli mi compile tui unittests guile
 CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
 
 # -I. for config files.
@@ -1878,10 +1853,6 @@ $(CONFIG_DEP_SUBDIR):
 	$(COMPILE) $(all_gdbtk_cflags) $<
 	$(POSTCOMPILE)
 
-%.o: $(srcdir)/guile/%.c
-	$(COMPILE) $<
-	$(POSTCOMPILE)
-
 %.o: ${srcdir}/nat/%.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
diff --git a/gdb/configure b/gdb/configure
index e30a68c243..e5a5b7c34f 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -10780,7 +10780,7 @@ done
 else
   # Even if Guile support is not compiled in, we need to have these files
   # included.
-  CONFIG_OBS="$CONFIG_OBS guile.o"
+  CONFIG_OBS="$CONFIG_OBS guile/guile.o"
   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
 fi
 
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 92f04316f9..b9d456bc7c 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1205,7 +1205,7 @@ if test "${have_libguile}" != no; then
 else
   # Even if Guile support is not compiled in, we need to have these files
   # included.
-  CONFIG_OBS="$CONFIG_OBS guile.o"
+  CONFIG_OBS="$CONFIG_OBS guile/guile.o"
   CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
 fi
 AC_SUBST(GUILE_CPPFLAGS)
-- 
2.13.6

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [RFA 10/13] Simplify COMMON_OBS by using list of sources
  2017-11-21 22:10 ` [RFA 10/13] Simplify COMMON_OBS by using list of sources Tom Tromey
@ 2017-11-22 11:06   ` Pedro Alves
  2017-11-23  3:44     ` Tom Tromey
  0 siblings, 1 reply; 21+ messages in thread
From: Pedro Alves @ 2017-11-22 11:06 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 11/21/2017 10:10 PM, Tom Tromey wrote:
>  # All source files that go into linking GDB.
>  # Links made at configuration time should not be specified here, since
> -# SFILES is used in building the distribution archive.
>  

The "(...) specified here, since" sentence looks cut in half after
this.

Otherwise looks good.

(I find COMMON_ vs gdb/common/ confusing, BTW, but that's
not your doing.)

> -SFILES = \
> -	ada-exp.y \
> +# Files that should wind up in SFILES and whose corresponding .o
> +# should be in COMMON_OBS.
> +COMMON_SFILES = \
>  	ada-lang.c \

...

>  	xml-syscall.c \
> -	xml-tdesc.c \
> +	xml-tdesc.c
> +
> +# SFILES is used in building the distribution archive.
> +SFILES = \
> +	ada-exp.y \
> +	arch/i386.c \
> +	ax-gdb.c \
>  
>  TSOBS = inflow.o

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources
  2017-11-21 22:10 ` [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources Tom Tromey
@ 2017-11-22 11:12   ` Pedro Alves
  2017-11-23  4:01     ` Tom Tromey
  0 siblings, 1 reply; 21+ messages in thread
From: Pedro Alves @ 2017-11-22 11:12 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 11/21/2017 10:10 PM, Tom Tromey wrote:
> This introduces REMOTE_SRCS and redefines REMOTE_OBS in terms of it.
> 
> ChangeLog
> 2017-11-21  Tom Tromey  <tom@tromey.com>
> 
> 	* Makefile.in (REMOTE_SRCS): New variable.
> 	(REMOTE_OBS): Redefine.
> 	(SFILES): Remove remote sources.  Use REMOTE_SRCS.
> 	(ALLDEPFILES): Remove dcache.c.

This looks fine.

I think it'd be even better to get rid of REMOTE_SRCS and fold it into
the common sources.  The remote target is always included in the build,
no matter the target, nowadays.  There's no point in having these
in DEPFILES.  (And we used to have a ton of other/different remote
targets, using other protocols, and they're now all gone).  Also several
of those objects have code that is called directly from common code.

See "git grep REMOTE_OBS":

Mon Feb 25 16:02:35 1991  Cygnus John Gilmore  (cygnus at oldman)
...
        * Makefile.dist:  Distribute REMOTE_OBS into tconfig files.
        Separate INCLUDE_CFLAGS for use with lint.  Add LINTFILES.
        Add ieee-float.o to OBS.
        * tconfig/{nindy960,vxworks68,vxworks960}:  Include the desired
        REMOTE_OBS remote-interface files in the TDEPFILES and TM_FILE.
        * tconfig/i960:  FIXME.  Half-merge, produce warning if config'd.
...

If you want to go ahead and that, then it's pre-approved.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [RFA 00/13] Makefile simplifications and subdirification
  2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
                   ` (12 preceding siblings ...)
  2017-11-21 22:12 ` [RFA 07/13] Move guile object files to guile subdirectory Tom Tromey
@ 2017-11-22 11:14 ` Pedro Alves
  2017-11-27 23:57   ` Tom Tromey
  13 siblings, 1 reply; 21+ messages in thread
From: Pedro Alves @ 2017-11-22 11:14 UTC (permalink / raw)
  To: Tom Tromey, gdb-patches

On 11/21/2017 10:10 PM, Tom Tromey wrote:
> This is a follow-on to Yao's earlier patch to move some object files
> to subdirectories.
> 
> This first changes the approach to making such subdirectories, to make
> it simpler on subsequent patches.  Then it moves object files to
> subdirs, removing hand-maintained lists of .o files in favor of
> patsubst, following the "don't repeat yourself" principle.
> 
> The last patches apply similar cleanups more generically.  The net
> result is the removal of many redundant lines of code.
> 
> I did not touch common/ in this series.  I started this, but due to
> commmon/common.host, a change here would require touching gdbserver as
> well, which I did not want to do.
> 
> I think there are more cleanups available to be done; I just did not
> do them.  A good end goal, I think, would be to make it so that only
> source files are explicitly named in the Makefile, with the
> intermediate names being generated from the source lists.  This would
> make adding new source files much simpler.
> 
> Tested by rebuilding.  I also did a build with
> --disable-{python,guile,tui,gdbmi} (did you know you can disable MI?).
> You may need to do a clean build if this lands; though I am not
> completely certain.

This is super.  Thanks so much for doing this.  I read the whole
series,  and patches I didn't comment on looks good to me as is.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [RFA 10/13] Simplify COMMON_OBS by using list of sources
  2017-11-22 11:06   ` Pedro Alves
@ 2017-11-23  3:44     ` Tom Tromey
  0 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-23  3:44 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tom Tromey, gdb-patches

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> The "(...) specified here, since" sentence looks cut in half after
Pedro> this.

Thanks, I've fixed this.

Pedro> (I find COMMON_ vs gdb/common/ confusing, BTW, but that's
Pedro> not your doing.)

Yes, the naming could definitely be improved; as well as the
organization of the Makefile.

Tom

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources
  2017-11-22 11:12   ` Pedro Alves
@ 2017-11-23  4:01     ` Tom Tromey
  2017-11-23 13:25       ` Pedro Alves
  0 siblings, 1 reply; 21+ messages in thread
From: Tom Tromey @ 2017-11-23  4:01 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tom Tromey, gdb-patches

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> I think it'd be even better to get rid of REMOTE_SRCS and fold it into
Pedro> the common sources.

Pedro> If you want to go ahead and that, then it's pre-approved.

Seems like a good idea.  I've appended what I came up with.

I probably won't check these patches in until next week, in case they
break the build somehow.  Like much of the US I'm not really around
right now.

Tom

commit 3f85218462fd335be2884f545663671cc9eabbf0
Author: Tom Tromey <tom@tromey.com>
Date:   Wed Nov 22 20:57:04 2017 -0700

    Remove REMOTE_OBS
    
    This removes REMOTE_OBS from the Makefile.  It is no longer needed, as
    remote support is always built into gdb.  The relevant sources are now
    added to COMMON_SFILES, where they are treated like other ordinary
    sources.
    
    ChangeLog
    2017-11-22  Tom Tromey  <tom@tromey.com>
    
            * Makefile.in (REMOTE_OBS): Remove.
            (SFILES): Remove remote sources.
            (COMMON_SFILES): Add remote sources.
            (ALLDEPFILES): Remove dcache.c.

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3545e86e29..42bfa23220 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2017-11-22  Tom Tromey  <tom@tromey.com>
+
+	* Makefile.in (REMOTE_OBS): Remove.
+	(SFILES): Remove remote sources.
+	(COMMON_SFILES): Add remote sources.
+	(ALLDEPFILES): Remove dcache.c.
+
 2017-11-21  Tom Tromey  <tom@tromey.com>
 
 	* Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index bc34ca3bef..53d2889a5b 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -619,20 +619,6 @@ XMLFILES = \
 # See configure.ac.
 SER_HARDWIRE = @SER_HARDWIRE@
 
-# The `remote' debugging target is supported for most architectures,
-# but not all (e.g. 960)
-REMOTE_OBS = \
-	ax-gdb.o \
-	ax-general.o \
-	ctf.o \
-	dcache.o \
-	remote.o \
-	remote-fileio.o \
-	remote-notif.o \
-	tracefile.o \
-	tracefile-tfile.o \
-	tracepoint.o
-
 # This is remote-sim.o if a simulator is to be linked in.
 SIM_OBS = @SIM_OBS@
 
@@ -926,6 +912,8 @@ COMMON_SFILES = \
 	arch-utils.c \
 	auto-load.c \
 	auxv.c \
+	ax-gdb.c \
+	ax-general.c \
 	bcache.c \
 	bfd-target.c \
 	block.c \
@@ -955,10 +943,12 @@ COMMON_SFILES = \
 	cp-namespace.c \
 	cp-support.c \
 	cp-valprint.c \
+	ctf.c \
 	d-lang.c \
 	d-namespace.c \
 	d-valprint.c \
 	dbxread.c \
+	dcache.c \
 	debug.c \
 	demangle.c \
 	dictionary.c \
@@ -1053,6 +1043,9 @@ COMMON_SFILES = \
 	regcache.c \
 	reggroups.c \
 	registry.c \
+	remote.c \
+	remote-fileio.c \
+	remote-notif.c \
 	reverse.c \
 	rust-lang.c \
 	selftest-arch.c \
@@ -1078,6 +1071,9 @@ COMMON_SFILES = \
 	thread-fsm.c \
 	tid-parse.c \
 	top.c \
+	tracefile.c \
+	tracefile-tfile.c \
+	tracepoint.c \
 	trad-frame.c \
 	tramp-frame.c \
 	target-float.c \
@@ -1100,11 +1096,8 @@ COMMON_SFILES = \
 SFILES = \
 	ada-exp.y \
 	arch/i386.c \
-	ax-gdb.c \
-	ax-general.c \
 	c-exp.y \
 	cp-name-parser.y \
-	ctf.c \
 	d-exp.y \
 	dtrace-probe.c \
 	elfread.c \
@@ -1115,9 +1108,6 @@ SFILES = \
 	m2-exp.y \
 	p-exp.y \
 	proc-service.list \
-	remote.c \
-	remote-fileio.c \
-	remote-notif.c \
 	rust-exp.y \
 	ser-base.c \
 	ser-unix.c \
@@ -1125,7 +1115,6 @@ SFILES = \
 	stap-probe.c \
 	stub-termcap.c \
 	symfile-mem.c \
-	tracepoint.c \
 	ui-file.h \
 	common/agent.c \
 	common/btrace-common.c \
@@ -2237,8 +2226,6 @@ ALLDEPFILES = \
 	bsd-kvm.c \
 	bsd-uthread.c \
 	darwin-nat.c \
-	dcache.c \
-	dcache.c \
 	dicos-tdep.c \
 	exec.c \
 	fbsd-nat.c \

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources
  2017-11-23  4:01     ` Tom Tromey
@ 2017-11-23 13:25       ` Pedro Alves
  0 siblings, 0 replies; 21+ messages in thread
From: Pedro Alves @ 2017-11-23 13:25 UTC (permalink / raw)
  To: Tom Tromey; +Cc: gdb-patches


On 11/23/2017 04:01 AM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> I think it'd be even better to get rid of REMOTE_SRCS and fold it into
> Pedro> the common sources.
> 
> Pedro> If you want to go ahead and that, then it's pre-approved.
> 
> Seems like a good idea.  I've appended what I came up with.

Thank you.

> 
> I probably won't check these patches in until next week, in case they
> break the build somehow.  Like much of the US I'm not really around
> right now.
> 

Have fun! :-)

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [RFA 00/13] Makefile simplifications and subdirification
  2017-11-22 11:14 ` [RFA 00/13] Makefile simplifications and subdirification Pedro Alves
@ 2017-11-27 23:57   ` Tom Tromey
  0 siblings, 0 replies; 21+ messages in thread
From: Tom Tromey @ 2017-11-27 23:57 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Tom Tromey, gdb-patches

>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

>> This is a follow-on to Yao's earlier patch to move some object files
>> to subdirectories.

Pedro> This is super.  Thanks so much for doing this.  I read the whole
Pedro> series,  and patches I didn't comment on looks good to me as is.

I'm pushing this now.  Let me know if there are problems and I will fix
them as soon as I can.

You may want to do a clean rebuild.  I'm not sure whether one is
required.

Tom

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2017-11-27 23:57 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 22:10 [RFA 00/13] Makefile simplifications and subdirification Tom Tromey
2017-11-21 22:10 ` [RFA 01/13] A simpler way to make the "arch" build directory Tom Tromey
2017-11-21 22:10 ` [RFA 04/13] Move compile object files to compile subdirectory Tom Tromey
2017-11-21 22:10 ` [RFA 11/13] Add missing files to COMMON_SFILES Tom Tromey
2017-11-21 22:10 ` [RFA 05/13] Move tui object files to tui subdirectory Tom Tromey
2017-11-21 22:10 ` [RFA 09/13] Define YYOBJ in terms of YYFILES Tom Tromey
2017-11-21 22:10 ` [RFA 13/13] Redefine REMOTE_OBS in terms of a list of sources Tom Tromey
2017-11-22 11:12   ` Pedro Alves
2017-11-23  4:01     ` Tom Tromey
2017-11-23 13:25       ` Pedro Alves
2017-11-21 22:10 ` [RFA 08/13] Move python object files to python subdirectory Tom Tromey
2017-11-21 22:10 ` [RFA 06/13] Move unittests object files to unittests subdirectory Tom Tromey
2017-11-21 22:10 ` [RFA 10/13] Simplify COMMON_OBS by using list of sources Tom Tromey
2017-11-22 11:06   ` Pedro Alves
2017-11-23  3:44     ` Tom Tromey
2017-11-21 22:10 ` [RFA 02/13] Move cli object files to cli subdirectory Tom Tromey
2017-11-21 22:12 ` [RFA 12/13] Move target object files to target subdirectory Tom Tromey
2017-11-21 22:12 ` [RFA 03/13] Move mi objects to mi subdirectory Tom Tromey
2017-11-21 22:12 ` [RFA 07/13] Move guile object files to guile subdirectory Tom Tromey
2017-11-22 11:14 ` [RFA 00/13] Makefile simplifications and subdirification Pedro Alves
2017-11-27 23:57   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).