public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Makefile improvements and cleanups
@ 2016-11-13  3:46 Simon Marchi
  2016-11-13  3:46 ` [PATCH 3/4] Makefile: Flatten and sort file lists Simon Marchi
                   ` (5 more replies)
  0 siblings, 6 replies; 22+ messages in thread
From: Simon Marchi @ 2016-11-13  3:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

The following patches contain a few improvements and cleanups to the gdb
Makefile.  The starting point is when I wondered why we had to write individual
rules for each source file that is located in a subdirectory.  I think it's
unnecessary verbose, and those rules could be replaced with pattern rules.
That's patch 2.  Patch 1 is just a small change to use pattern rules instead
of suffix rules.

Patches 3 and 4 are cleanups of things that have slightly annoyed me for some
time, and I thought now would be a good time to make those changes.

Simon Marchi (4):
  Makefile: Replace old suffix rules with pattern rules
  Makefile: Replace explicit subdir rules with pattern rules
  Makefile: Flatten and sort file lists
  Normalize names of some source files

 gdb/Makefile.in                                 | 2224 ++++++++++++-----------
 gdb/{alphabsd-nat.c => alpha-bsd-nat.c}         |    2 +-
 gdb/{alphabsd-tdep.c => alpha-bsd-tdep.c}       |    2 +-
 gdb/{alphabsd-tdep.h => alpha-bsd-tdep.h}       |    6 +-
 gdb/{alphafbsd-tdep.c => alpha-fbsd-tdep.c}     |    0
 gdb/{alphanbsd-tdep.c => alpha-nbsd-tdep.c}     |    2 +-
 gdb/{alphaobsd-tdep.c => alpha-obsd-tdep.c}     |    2 +-
 gdb/{amd64bsd-nat.c => amd64-bsd-nat.c}         |    2 +-
 gdb/{amd64fbsd-nat.c => amd64-fbsd-nat.c}       |    2 +-
 gdb/{amd64fbsd-tdep.c => amd64-fbsd-tdep.c}     |    2 +-
 gdb/{amd64nbsd-nat.c => amd64-nbsd-nat.c}       |    0
 gdb/{amd64nbsd-tdep.c => amd64-nbsd-tdep.c}     |    0
 gdb/{amd64obsd-nat.c => amd64-obsd-nat.c}       |    0
 gdb/{amd64obsd-tdep.c => amd64-obsd-tdep.c}     |    0
 gdb/{armbsd-tdep.c => arm-bsd-tdep.c}           |    0
 gdb/{armnbsd-nat.c => arm-nbsd-nat.c}           |    0
 gdb/{armnbsd-tdep.c => arm-nbsd-tdep.c}         |    0
 gdb/{armobsd-tdep.c => arm-obsd-tdep.c}         |    0
 gdb/config/alpha/fbsd.mh                        |    2 +-
 gdb/config/alpha/nbsd.mh                        |    2 +-
 gdb/config/arm/nbsdelf.mh                       |    2 +-
 gdb/config/djgpp/fnchange.lst                   |   96 +-
 gdb/config/i386/fbsd.mh                         |    4 +-
 gdb/config/i386/fbsd64.mh                       |    4 +-
 gdb/config/i386/i386gnu.mh                      |    2 +-
 gdb/config/i386/i386sol2.mh                     |    2 +-
 gdb/config/i386/nbsd64.mh                       |    2 +-
 gdb/config/i386/nbsdelf.mh                      |    2 +-
 gdb/config/i386/obsd.mh                         |    2 +-
 gdb/config/i386/obsd64.mh                       |    2 +-
 gdb/config/i386/sol2-64.mh                      |    2 +-
 gdb/config/m68k/linux.mh                        |    2 +-
 gdb/config/m68k/nbsdelf.mh                      |    2 +-
 gdb/config/m68k/obsd.mh                         |    2 +-
 gdb/config/m88k/obsd.mh                         |    2 +-
 gdb/config/mips/nbsd.mh                         |    2 +-
 gdb/config/mips/obsd64.mh                       |    2 +-
 gdb/config/pa/nbsd.mh                           |    2 +-
 gdb/config/pa/obsd.mh                           |    2 +-
 gdb/config/powerpc/fbsd.mh                      |    2 +-
 gdb/config/powerpc/nbsd.mh                      |    2 +-
 gdb/config/powerpc/obsd.mh                      |    2 +-
 gdb/config/sh/nbsd.mh                           |    2 +-
 gdb/config/sparc/fbsd.mh                        |    2 +-
 gdb/config/sparc/nbsd64.mh                      |    2 +-
 gdb/config/sparc/nbsdelf.mh                     |    2 +-
 gdb/config/sparc/obsd64.mh                      |    2 +-
 gdb/config/vax/nbsdelf.mh                       |    2 +-
 gdb/config/vax/obsd.mh                          |    2 +-
 gdb/{hppabsd-tdep.c => hppa-bsd-tdep.c}         |    2 +-
 gdb/{hppabsd-tdep.h => hppa-bsd-tdep.h}         |    6 +-
 gdb/{hppanbsd-nat.c => hppa-nbsd-nat.c}         |    0
 gdb/{hppanbsd-tdep.c => hppa-nbsd-tdep.c}       |    2 +-
 gdb/{hppaobsd-nat.c => hppa-obsd-nat.c}         |    0
 gdb/{hppaobsd-tdep.c => hppa-obsd-tdep.c}       |    2 +-
 gdb/{i386bsd-nat.c => i386-bsd-nat.c}           |    4 +-
 gdb/{i386bsd-nat.h => i386-bsd-nat.h}           |    6 +-
 gdb/{i386bsd-tdep.c => i386-bsd-tdep.c}         |    0
 gdb/{i386fbsd-nat.c => i386-fbsd-nat.c}         |    4 +-
 gdb/{i386fbsd-tdep.c => i386-fbsd-tdep.c}       |    2 +-
 gdb/{i386fbsd-tdep.h => i386-fbsd-tdep.h}       |    6 +-
 gdb/{i386gnu-nat.c => i386-gnu-nat.c}           |    0
 gdb/{i386gnu-tdep.c => i386-gnu-tdep.c}         |    0
 gdb/{i386nbsd-nat.c => i386-nbsd-nat.c}         |    2 +-
 gdb/{i386nbsd-tdep.c => i386-nbsd-tdep.c}       |    0
 gdb/{i386obsd-nat.c => i386-obsd-nat.c}         |    2 +-
 gdb/{i386obsd-tdep.c => i386-obsd-tdep.c}       |    0
 gdb/{i386v4-nat.c => i386-v4-nat.c}             |    0
 gdb/{m68kbsd-nat.c => m68k-bsd-nat.c}           |    0
 gdb/{m68kbsd-tdep.c => m68k-bsd-tdep.c}         |    0
 gdb/{m68klinux-nat.c => m68k-linux-nat.c}       |    0
 gdb/{m68klinux-tdep.c => m68k-linux-tdep.c}     |    0
 gdb/{m88kbsd-nat.c => m88k-bsd-nat.c}           |    0
 gdb/{mipsnbsd-nat.c => mips-nbsd-nat.c}         |    2 +-
 gdb/{mipsnbsd-tdep.c => mips-nbsd-tdep.c}       |    2 +-
 gdb/{mipsnbsd-tdep.h => mips-nbsd-tdep.h}       |    6 +-
 gdb/{mips64obsd-nat.c => mips64-obsd-nat.c}     |    0
 gdb/{mips64obsd-tdep.c => mips64-obsd-tdep.c}   |    0
 gdb/{ppcfbsd-nat.c => ppc-fbsd-nat.c}           |    2 +-
 gdb/{ppcfbsd-tdep.c => ppc-fbsd-tdep.c}         |    2 +-
 gdb/{ppcfbsd-tdep.h => ppc-fbsd-tdep.h}         |    6 +-
 gdb/{ppcnbsd-nat.c => ppc-nbsd-nat.c}           |    2 +-
 gdb/{ppcnbsd-tdep.c => ppc-nbsd-tdep.c}         |    2 +-
 gdb/{ppcnbsd-tdep.h => ppc-nbsd-tdep.h}         |    6 +-
 gdb/{ppcobsd-nat.c => ppc-obsd-nat.c}           |    2 +-
 gdb/{ppcobsd-tdep.c => ppc-obsd-tdep.c}         |    2 +-
 gdb/{ppcobsd-tdep.h => ppc-obsd-tdep.h}         |    6 +-
 gdb/{shnbsd-nat.c => sh-nbsd-nat.c}             |    0
 gdb/{shnbsd-tdep.c => sh-nbsd-tdep.c}           |    0
 gdb/{sparcnbsd-nat.c => sparc-nbsd-nat.c}       |    0
 gdb/{sparcnbsd-tdep.c => sparc-nbsd-tdep.c}     |    0
 gdb/{sparcobsd-tdep.c => sparc-obsd-tdep.c}     |    0
 gdb/{sparc64fbsd-nat.c => sparc64-fbsd-nat.c}   |    0
 gdb/{sparc64fbsd-tdep.c => sparc64-fbsd-tdep.c} |    0
 gdb/{sparc64nbsd-nat.c => sparc64-nbsd-nat.c}   |    0
 gdb/{sparc64nbsd-tdep.c => sparc64-nbsd-tdep.c} |    0
 gdb/{sparc64obsd-nat.c => sparc64-obsd-nat.c}   |    0
 gdb/{sparc64obsd-tdep.c => sparc64-obsd-tdep.c} |    0
 gdb/{vaxbsd-nat.c => vax-bsd-nat.c}             |    0
 gdb/{vaxnbsd-tdep.c => vax-nbsd-tdep.c}         |    0
 gdb/{vaxobsd-tdep.c => vax-obsd-tdep.c}         |    0
 gdb/{x86bsd-nat.c => x86-bsd-nat.c}             |    2 +-
 gdb/{x86bsd-nat.h => x86-bsd-nat.h}             |    6 +-
 103 files changed, 1330 insertions(+), 1160 deletions(-)
 rename gdb/{alphabsd-nat.c => alpha-bsd-nat.c} (99%)
 rename gdb/{alphabsd-tdep.c => alpha-bsd-tdep.c} (98%)
 rename gdb/{alphabsd-tdep.h => alpha-bsd-tdep.h} (94%)
 rename gdb/{alphafbsd-tdep.c => alpha-fbsd-tdep.c} (100%)
 rename gdb/{alphanbsd-tdep.c => alpha-nbsd-tdep.c} (99%)
 rename gdb/{alphaobsd-tdep.c => alpha-obsd-tdep.c} (99%)
 rename gdb/{amd64bsd-nat.c => amd64-bsd-nat.c} (99%)
 rename gdb/{amd64fbsd-nat.c => amd64-fbsd-nat.c} (99%)
 rename gdb/{amd64fbsd-tdep.c => amd64-fbsd-tdep.c} (99%)
 rename gdb/{amd64nbsd-nat.c => amd64-nbsd-nat.c} (100%)
 rename gdb/{amd64nbsd-tdep.c => amd64-nbsd-tdep.c} (100%)
 rename gdb/{amd64obsd-nat.c => amd64-obsd-nat.c} (100%)
 rename gdb/{amd64obsd-tdep.c => amd64-obsd-tdep.c} (100%)
 rename gdb/{armbsd-tdep.c => arm-bsd-tdep.c} (100%)
 rename gdb/{armnbsd-nat.c => arm-nbsd-nat.c} (100%)
 rename gdb/{armnbsd-tdep.c => arm-nbsd-tdep.c} (100%)
 rename gdb/{armobsd-tdep.c => arm-obsd-tdep.c} (100%)
 rename gdb/{hppabsd-tdep.c => hppa-bsd-tdep.c} (99%)
 rename gdb/{hppabsd-tdep.h => hppa-bsd-tdep.h} (91%)
 rename gdb/{hppanbsd-nat.c => hppa-nbsd-nat.c} (100%)
 rename gdb/{hppanbsd-tdep.c => hppa-nbsd-tdep.c} (99%)
 rename gdb/{hppaobsd-nat.c => hppa-obsd-nat.c} (100%)
 rename gdb/{hppaobsd-tdep.c => hppa-obsd-tdep.c} (99%)
 rename gdb/{i386bsd-nat.c => i386-bsd-nat.c} (99%)
 rename gdb/{i386bsd-nat.h => i386-bsd-nat.h} (92%)
 rename gdb/{i386bsd-tdep.c => i386-bsd-tdep.c} (100%)
 rename gdb/{i386fbsd-nat.c => i386-fbsd-nat.c} (99%)
 rename gdb/{i386fbsd-tdep.c => i386-fbsd-tdep.c} (99%)
 rename gdb/{i386fbsd-tdep.h => i386-fbsd-tdep.h} (93%)
 rename gdb/{i386gnu-nat.c => i386-gnu-nat.c} (100%)
 rename gdb/{i386gnu-tdep.c => i386-gnu-tdep.c} (100%)
 rename gdb/{i386nbsd-nat.c => i386-nbsd-nat.c} (99%)
 rename gdb/{i386nbsd-tdep.c => i386-nbsd-tdep.c} (100%)
 rename gdb/{i386obsd-nat.c => i386-obsd-nat.c} (99%)
 rename gdb/{i386obsd-tdep.c => i386-obsd-tdep.c} (100%)
 rename gdb/{i386v4-nat.c => i386-v4-nat.c} (100%)
 rename gdb/{m68kbsd-nat.c => m68k-bsd-nat.c} (100%)
 rename gdb/{m68kbsd-tdep.c => m68k-bsd-tdep.c} (100%)
 rename gdb/{m68klinux-nat.c => m68k-linux-nat.c} (100%)
 rename gdb/{m68klinux-tdep.c => m68k-linux-tdep.c} (100%)
 rename gdb/{m88kbsd-nat.c => m88k-bsd-nat.c} (100%)
 rename gdb/{mipsnbsd-nat.c => mips-nbsd-nat.c} (99%)
 rename gdb/{mipsnbsd-tdep.c => mips-nbsd-tdep.c} (99%)
 rename gdb/{mipsnbsd-tdep.h => mips-nbsd-tdep.h} (93%)
 rename gdb/{mips64obsd-nat.c => mips64-obsd-nat.c} (100%)
 rename gdb/{mips64obsd-tdep.c => mips64-obsd-tdep.c} (100%)
 rename gdb/{ppcfbsd-nat.c => ppc-fbsd-nat.c} (99%)
 rename gdb/{ppcfbsd-tdep.c => ppc-fbsd-tdep.c} (99%)
 rename gdb/{ppcfbsd-tdep.h => ppc-fbsd-tdep.h} (92%)
 rename gdb/{ppcnbsd-nat.c => ppc-nbsd-nat.c} (99%)
 rename gdb/{ppcnbsd-tdep.c => ppc-nbsd-tdep.c} (99%)
 rename gdb/{ppcnbsd-tdep.h => ppc-nbsd-tdep.h} (93%)
 rename gdb/{ppcobsd-nat.c => ppc-obsd-nat.c} (99%)
 rename gdb/{ppcobsd-tdep.c => ppc-obsd-tdep.c} (99%)
 rename gdb/{ppcobsd-tdep.h => ppc-obsd-tdep.h} (95%)
 rename gdb/{shnbsd-nat.c => sh-nbsd-nat.c} (100%)
 rename gdb/{shnbsd-tdep.c => sh-nbsd-tdep.c} (100%)
 rename gdb/{sparcnbsd-nat.c => sparc-nbsd-nat.c} (100%)
 rename gdb/{sparcnbsd-tdep.c => sparc-nbsd-tdep.c} (100%)
 rename gdb/{sparcobsd-tdep.c => sparc-obsd-tdep.c} (100%)
 rename gdb/{sparc64fbsd-nat.c => sparc64-fbsd-nat.c} (100%)
 rename gdb/{sparc64fbsd-tdep.c => sparc64-fbsd-tdep.c} (100%)
 rename gdb/{sparc64nbsd-nat.c => sparc64-nbsd-nat.c} (100%)
 rename gdb/{sparc64nbsd-tdep.c => sparc64-nbsd-tdep.c} (100%)
 rename gdb/{sparc64obsd-nat.c => sparc64-obsd-nat.c} (100%)
 rename gdb/{sparc64obsd-tdep.c => sparc64-obsd-tdep.c} (100%)
 rename gdb/{vaxbsd-nat.c => vax-bsd-nat.c} (100%)
 rename gdb/{vaxnbsd-tdep.c => vax-nbsd-tdep.c} (100%)
 rename gdb/{vaxobsd-tdep.c => vax-obsd-tdep.c} (100%)
 rename gdb/{x86bsd-nat.c => x86-bsd-nat.c} (99%)
 rename gdb/{x86bsd-nat.h => x86-bsd-nat.h} (93%)

-- 
2.10.0

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

* [PATCH 2/4] Makefile: Replace explicit subdir rules with pattern rules
  2016-11-13  3:46 [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
  2016-11-13  3:46 ` [PATCH 3/4] Makefile: Flatten and sort file lists Simon Marchi
  2016-11-13  3:46 ` [PATCH 1/4] Makefile: Replace old suffix rules with pattern rules Simon Marchi
@ 2016-11-13  3:46 ` Simon Marchi
  2016-11-15 17:54   ` Pedro Alves
  2016-11-13  3:56 ` [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Simon Marchi @ 2016-11-13  3:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

When adding a file to be compiled to a subdirectory (e.g. mi/), the
current practice is to add an explicit rule, such as:

  mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c
          $(COMPILE) $(srcdir)/mi/mi-cmd-break.c
          $(POSTCOMPILE)

I find it a bit verbose and cumbersome.  I tried replacing those rules
with pattern rules, and found no good reason why we shouldn't do it.
For example, the following rule works for all files under mi:

  %.o: $(srcdir)/mi/%.c
          $(COMPILE) $<
          $(POSTCOMPILE)

These pattern rules assume that the source and target files have the
same stem (foo.c and foo.o).  In one case, common-agent.o is generated
from common/agent.c, to avoid a conflict with the agent.o in gdb/.  In
this case, I kept the explicit rule, which takes precedence over the
pattern rule.  We could also rename common/agent.c to
common/common-agent.c to get rid of the special case and still avoid the
clash, as it is done with common/common-regcache.c, for example.

This strategy was the least intrusive I found, as it only requires
changing the rules.  I also though of replicating the source directory
structure in the build directory, which would generate common/agent.o
from common/agent.c.  However, something was not right with the
dependency tracking (the .deps directory).  I did not investigate much
further.

I also though of naming the object files after the directory they are
in, such as:

  common_%.o: $(srcdir)/common/%.c
          $(COMPILE) $<
          $(POSTCOMPILE)

which would make common/agent.c compile to common_agent.o, avoiding the
conflict.  However, these two strategies would require changing the
target filenames everywhere, in many files.  Not cool.

Built-tested with --enable-targets=all.

gdb/ChangeLog:

	(%.o: $(srcdir)/cli/%.c): New rule.
	(%.o: $(srcdir)/compile/%.c): New rule.
	(%.o: $(srcdir)/gdbtk/generic/%.c): New rule.
	(%.o: $(srcdir)/mi/%.c): New rule.
	(%.o: $(srcdir)/common/%.c): New rule.
	(%.o: $(srcdir)/target/%.c): New rule.
	(%.o: $(srcdir)/arch/%.c): New rule.
	(%.o: $(srcdir)/nat/%.c): New rule.
	(%.o: $(srcdir)/tui/%.c): New rule.
	(%.o: $(srcdir)/guile/%.c): New rule.
	(%.o: $(srcdir)/python/%.c): New rule.
	(cli-cmds.o): Remove.
	(cli-decode.o): Likewise.
	(cli-dump.o): Likewise.
	(cli-interp.o): Likewise.
	(cli-logging.o): Likewise.
	(cli-script.o): Likewise.
	(cli-setshow.o): Likewise.
	(cli-utils.o): Likewise.
	(compile.o): Likewise.
	(compile-c-types.o): Likewise.
	(compile-c-symbols.o): Likewise.
	(compile-object-load.o): Likewise.
	(compile-object-run.o): Likewise.
	(compile-loc2c.o): Likewise.
	(compile-c-support.o): Likewise.
	(gdbtk.o): Likewise.
	(gdbtk-bp.o): Likewise.
	(gdbtk-cmds.o): Likewise.
	(gdbtk-hooks.o): Likewise.
	(gdbtk-interp.o): Likewise.
	(gdbtk-main.o): Likewise.
	(gdbtk-register.o): Likewise.
	(gdbtk-stack.o): Likewise.
	(gdbtk-varobj.o): Likewise.
	(gdbtk-wrapper.o): Likewise.
	(mi-cmd-break.o): Likewise.
	(mi-cmd-catch.o): Likewise.
	(mi-cmd-disas.o): Likewise.
	(mi-cmd-env.o): Likewise.
	(mi-cmd-file.o): Likewise.
	(mi-cmd-info.o): Likewise.
	(mi-cmds.o): Likewise.
	(mi-cmd-stack.o): Likewise.
	(mi-cmd-target.o): Likewise.
	(mi-cmd-var.o): Likewise.
	(mi-console.o): Likewise.
	(mi-getopt.o): Likewise.
	(mi-interp.o): Likewise.
	(mi-main.o): Likewise.
	(mi-out.o): Likewise.
	(mi-parse.o): Likewise.
	(mi-symbol-cmds.o): Likewise.
	(mi-common.o): Likewise.
	(signals.o): Likewise.
	(common-utils.o): Likewise.
	(gdb_vecs.o): Likewise.
	(xml-utils.o): Likewise.
	(ptid.o): Likewise.
	(buffer.o): Likewise.
	(filestuff.o): Likewise.
	(format.o): Likewise.
	(vec.o): Likewise.
	(print-utils.o): Likewise.
	(rsp-low.o): Likewise.
	(errors.o): Likewise.
	(common-debug.o): Likewise.
	(cleanups.o): Likewise.
	(common-exceptions.o
	(posix-strerror.o): Likewise.
	(mingw-strerror.o): Likewise.
	(btrace-common.o): Likewise.
	(fileio.o): Likewise.
	(common-regcache.o): Likewise.
	(signals-state-save-restore.o): Likewise.
	(new-op.o): Likewise.
	(waitstatus.o): Likewise.
	(arm.o): Likewise.
	(arm-linux.o): Likewise.
	(arm-get-next-pcs.o): Likewise.
	(x86-dregs.o): Likewise.
	(linux-btrace.o): Likewise.
	(linux-osdata.o): Likewise.
	(linux-procfs.o): Likewise.
	(linux-ptrace.o): Likewise.
	(linux-waitpid.o): Likewise.
	(mips-linux-watch.o): Likewise.
	(ppc-linux.o): Likewise.
	(linux-personality.o): Likewise.
	(x86-linux.o): Likewise.
	(x86-linux-dregs.o): Likewise.
	(amd64-linux-siginfo.o): Likewise.
	(linux-namespaces.o): Likewise.
	(aarch64-linux-hw-point.o): Likewise.
	(aarch64-linux.o): Likewise.
	(aarch64-insn.o): Likewise.
	(tui.o): Likewise.
	(tui-command.o): Likewise.
	(tui-data.o): Likewise.
	(tui-disasm.o): Likewise.
	(tui-file.o): Likewise.
	(tui-hooks.o): Likewise.
	(tui-interp.o): Likewise.
	(tui-io.o): Likewise.
	(tui-layout.o): Likewise.
	(tui-out.o): Likewise.
	(tui-regs.o): Likewise.
	(tui-source.o): Likewise.
	(tui-stack.o): Likewise.
	(tui-win.o): Likewise.
	(tui-windata.o): Likewise.
	(tui-wingeneral.o): Likewise.
	(tui-winsource.o): Likewise.
	(guile.o): Likewise.
	(scm-arch.o): Likewise.
	(scm-auto-load.o): Likewise.
	(scm-block.o): Likewise.
	(scm-breakpoint.o): Likewise.
	(scm-cmd.o): Likewise.
	(scm-disasm.o): Likewise.
	(scm-exception.o): Likewise.
	(scm-frame.o): Likewise.
	(scm-gsmob.o): Likewise.
	(scm-iterator.o): Likewise.
	(scm-lazy-string.o): Likewise.
	(scm-math.o): Likewise.
	(scm-objfile.o): Likewise.
	(scm-param.o): Likewise.
	(scm-ports.o): Likewise.
	(scm-pretty-print.o): Likewise.
	(scm-progspace.o): Likewise.
	(scm-safe-call.o): Likewise.
	(scm-string.o): Likewise.
	(scm-symbol.o): Likewise.
	(scm-symtab.o): Likewise.
	(scm-type.o): Likewise.
	(scm-utils.o): Likewise.
	(scm-value.o): Likewise.
	(python.o): Likewise.
	(py-arch.o): Likewise.
	(py-auto-load.o): Likewise.
	(py-block.o): Likewise.
	(py-bpevent.o): Likewise.
	(py-breakpoint.o): Likewise.
	(py-cmd.o): Likewise.
	(py-continueevent.o): Likewise.
	(py-xmethods.o): Likewise.
	(py-event.o): Likewise.
	(py-evtregistry.o): Likewise.
	(py-evts.o): Likewise.
	(py-exitedevent.o): Likewise.
	(py-finishbreakpoint.o): Likewise.
	(py-frame.o): Likewise.
	(py-framefilter.o): Likewise.
	(py-function.o): Likewise.
	(py-gdb-readline.o): Likewise.
	(py-inferior.o): Likewise.
	(py-infevents.o): Likewise.
	(py-infthread.o): Likewise.
	(py-lazy-string.o): Likewise.
	(py-linetable.o): Likewise.
	(py-newobjfileevent.o): Likewise.
	(py-objfile.o): Likewise.
	(py-param.o): Likewise.
	(py-prettyprint.o): Likewise.
	(py-progspace.o): Likewise.
	(py-signalevent.o): Likewise.
	(py-stopevent.o): Likewise.
	(py-symbol.o): Likewise.
	(py-symtab.o): Likewise.
	(py-threadevent.o): Likewise.
	(py-type.o): Likewise.
	(py-unwind.o): Likewise.
	(py-utils.o): Likewise.
	(py-value.o): Likewise.
	(py-varobj.o): Likewise.
---
 gdb/Makefile.in | 668 ++------------------------------------------------------
 1 file changed, 22 insertions(+), 646 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 27727d0..a0fea7c 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1939,36 +1939,8 @@ stamp-xml: $(srcdir)/features/feature_to_c.sh Makefile $(XMLFILES)
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-cli-cmds.o: $(srcdir)/cli/cli-cmds.c
-	$(COMPILE) $(srcdir)/cli/cli-cmds.c
-	$(POSTCOMPILE)
-
-cli-decode.o: $(srcdir)/cli/cli-decode.c
-	$(COMPILE) $(srcdir)/cli/cli-decode.c
-	$(POSTCOMPILE)
-
-cli-dump.o: $(srcdir)/cli/cli-dump.c
-	$(COMPILE) $(srcdir)/cli/cli-dump.c
-	$(POSTCOMPILE)
-
-cli-interp.o: $(srcdir)/cli/cli-interp.c
-	$(COMPILE) $(srcdir)/cli/cli-interp.c
-	$(POSTCOMPILE)
-
-cli-logging.o: $(srcdir)/cli/cli-logging.c
-	$(COMPILE) $(srcdir)/cli/cli-logging.c
-	$(POSTCOMPILE)
-
-cli-script.o: $(srcdir)/cli/cli-script.c
-	$(COMPILE) $(srcdir)/cli/cli-script.c
-	$(POSTCOMPILE)
-
-cli-setshow.o: $(srcdir)/cli/cli-setshow.c
-	$(COMPILE) $(srcdir)/cli/cli-setshow.c
-	$(POSTCOMPILE)
-
-cli-utils.o: $(srcdir)/cli/cli-utils.c
-	$(COMPILE) $(srcdir)/cli/cli-utils.c
+%.o: $(srcdir)/cli/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
 # GCC Compile support dependencies
@@ -1976,35 +1948,10 @@ cli-utils.o: $(srcdir)/cli/cli-utils.c
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-compile.o: $(srcdir)/compile/compile.c
-	$(COMPILE) $(srcdir)/compile/compile.c
-	$(POSTCOMPILE)
-
-compile-c-types.o: $(srcdir)/compile/compile-c-types.c
-	$(COMPILE) $(srcdir)/compile/compile-c-types.c
-	$(POSTCOMPILE)
-
-compile-c-symbols.o: $(srcdir)/compile/compile-c-symbols.c
-	$(COMPILE) $(srcdir)/compile/compile-c-symbols.c
-	$(POSTCOMPILE)
-
-compile-object-load.o: $(srcdir)/compile/compile-object-load.c
-	$(COMPILE) $(srcdir)/compile/compile-object-load.c
-	$(POSTCOMPILE)
-
-compile-object-run.o: $(srcdir)/compile/compile-object-run.c
-	$(COMPILE) $(srcdir)/compile/compile-object-run.c
-	$(POSTCOMPILE)
-
-compile-loc2c.o: $(srcdir)/compile/compile-loc2c.c
-	$(COMPILE) $(srcdir)/compile/compile-loc2c.c
-	$(POSTCOMPILE)
-
-compile-c-support.o: $(srcdir)/compile/compile-c-support.c
-	$(COMPILE) $(srcdir)/compile/compile-c-support.c
+%.o: $(srcdir)/compile/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
-
 #
 # GDBTK sub-directory
 #
@@ -2074,230 +2021,40 @@ all_gdbtk_cflags = $(IDE_CFLAGS) $(ITCL_CFLAGS) \
 		-DGDBTK_LIBRARY=\"$(GDBTK_LIBRARY)\" \
 		-DSRC_DIR=\"$(GDBTK_SRC_DIR)\"
 
-gdbtk.o: $(srcdir)/gdbtk/generic/gdbtk.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk.c
-	$(POSTCOMPILE)
-
-gdbtk-bp.o: $(srcdir)/gdbtk/generic/gdbtk-bp.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-bp.c
-	$(POSTCOMPILE)
-
-gdbtk-cmds.o: $(srcdir)/gdbtk/generic/gdbtk-cmds.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-cmds.c
-	$(POSTCOMPILE)
-
-gdbtk-hooks.o: $(srcdir)/gdbtk/generic/gdbtk-hooks.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-hooks.c
-	$(POSTCOMPILE)
-
-gdbtk-interp.o: $(srcdir)/gdbtk/generic/gdbtk-interp.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-interp.c
-	$(POSTCOMPILE)
-
-gdbtk-main.o: $(srcdir)/gdbtk/generic/gdbtk-main.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-main.c
-	$(POSTCOMPILE)
-
-gdbtk-register.o: $(srcdir)/gdbtk/generic/gdbtk-register.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-register.c
+%.o: $(srcdir)/gdbtk/generic/%.c
+	$(COMPILE) $(all_gdbtk_cflags) %<
 	$(POSTCOMPILE)
 
-gdbtk-stack.o: $(srcdir)/gdbtk/generic/gdbtk-stack.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-stack.c
-	$(POSTCOMPILE)
-
-gdbtk-varobj.o: $(srcdir)/gdbtk/generic/gdbtk-varobj.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-varobj.c
-	$(POSTCOMPILE)
-
-gdbtk-wrapper.o: $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
-	$(COMPILE) $(all_gdbtk_cflags) $(srcdir)/gdbtk/generic/gdbtk-wrapper.c
-	$(POSTCOMPILE)
-
-
 #
 # gdb/mi/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-mi-cmd-break.o: $(srcdir)/mi/mi-cmd-break.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-break.c
-	$(POSTCOMPILE)
-
-mi-cmd-catch.o: $(srcdir)/mi/mi-cmd-catch.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-catch.c
-	$(POSTCOMPILE)
-
-mi-cmd-disas.o: $(srcdir)/mi/mi-cmd-disas.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-disas.c
-	$(POSTCOMPILE)
-
-mi-cmd-env.o: $(srcdir)/mi/mi-cmd-env.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-env.c
-	$(POSTCOMPILE)
-
-mi-cmd-file.o: $(srcdir)/mi/mi-cmd-file.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-file.c
-	$(POSTCOMPILE)
-
-mi-cmd-info.o: $(srcdir)/mi/mi-cmd-info.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-info.c
-	$(POSTCOMPILE)
-
-mi-cmds.o: $(srcdir)/mi/mi-cmds.c
-	$(COMPILE) $(srcdir)/mi/mi-cmds.c
-	$(POSTCOMPILE)
-
-mi-cmd-stack.o: $(srcdir)/mi/mi-cmd-stack.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-stack.c
-	$(POSTCOMPILE)
-
-mi-cmd-target.o: $(srcdir)/mi/mi-cmd-target.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-target.c
-	$(POSTCOMPILE)
-
-mi-cmd-var.o: $(srcdir)/mi/mi-cmd-var.c
-	$(COMPILE) $(srcdir)/mi/mi-cmd-var.c
-	$(POSTCOMPILE)
-
-mi-console.o: $(srcdir)/mi/mi-console.c
-	$(COMPILE) $(srcdir)/mi/mi-console.c
-	$(POSTCOMPILE)
-
-mi-getopt.o: $(srcdir)/mi/mi-getopt.c
-	$(COMPILE) $(srcdir)/mi/mi-getopt.c
-	$(POSTCOMPILE)
-
-mi-interp.o: $(srcdir)/mi/mi-interp.c
-	$(COMPILE) $(srcdir)/mi/mi-interp.c
-	$(POSTCOMPILE)
-
-mi-main.o: $(srcdir)/mi/mi-main.c
-	$(COMPILE) $(srcdir)/mi/mi-main.c
-	$(POSTCOMPILE)
-
-mi-out.o: $(srcdir)/mi/mi-out.c
-	$(COMPILE) $(srcdir)/mi/mi-out.c
-	$(POSTCOMPILE)
-
-mi-parse.o: $(srcdir)/mi/mi-parse.c
-	$(COMPILE) $(srcdir)/mi/mi-parse.c
-	$(POSTCOMPILE)
-
-mi-symbol-cmds.o: $(srcdir)/mi/mi-symbol-cmds.c
-	$(COMPILE) $(srcdir)/mi/mi-symbol-cmds.c
-	$(POSTCOMPILE)
-
-mi-common.o: $(srcdir)/mi/mi-common.c
-	$(COMPILE) $(srcdir)/mi/mi-common.c
-	$(POSTCOMPILE)
+%.o: $(srcdir)/mi/%.c
+	$(COMPILE) $<
 
 # gdb/common/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-signals.o: $(srcdir)/common/signals.c
-	$(COMPILE) $(srcdir)/common/signals.c
-	$(POSTCOMPILE)
-
-common-utils.o: ${srcdir}/common/common-utils.c
-	$(COMPILE) $(srcdir)/common/common-utils.c
-	$(POSTCOMPILE)
-
-gdb_vecs.o: ${srcdir}/common/gdb_vecs.c
-	$(COMPILE) $(srcdir)/common/gdb_vecs.c
-	$(POSTCOMPILE)
-
-xml-utils.o: ${srcdir}/common/xml-utils.c
-	$(COMPILE) $(srcdir)/common/xml-utils.c
-	$(POSTCOMPILE)
-
-ptid.o: ${srcdir}/common/ptid.c
-	$(COMPILE) $(srcdir)/common/ptid.c
-	$(POSTCOMPILE)
-
-buffer.o: ${srcdir}/common/buffer.c
-	$(COMPILE) $(srcdir)/common/buffer.c
-	$(POSTCOMPILE)
-
-filestuff.o: $(srcdir)/common/filestuff.c
-	$(COMPILE) $(srcdir)/common/filestuff.c
-	$(POSTCOMPILE)
-
-format.o: ${srcdir}/common/format.c
-	$(COMPILE) $(srcdir)/common/format.c
+%.o: ${srcdir}/common/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
 common-agent.o: $(srcdir)/common/agent.c
 	$(COMPILE) $(srcdir)/common/agent.c
 	$(POSTCOMPILE)
 
-vec.o: ${srcdir}/common/vec.c
-	$(COMPILE) $(srcdir)/common/vec.c
-	$(POSTCOMPILE)
-
-print-utils.o: ${srcdir}/common/print-utils.c
-	$(COMPILE) $(srcdir)/common/print-utils.c
-	$(POSTCOMPILE)
-
-rsp-low.o: ${srcdir}/common/rsp-low.c
-	$(COMPILE) $(srcdir)/common/rsp-low.c
-	$(POSTCOMPILE)
-
-errors.o: ${srcdir}/common/errors.c
-	$(COMPILE) $(srcdir)/common/errors.c
-	$(POSTCOMPILE)
-
-common-debug.o: ${srcdir}/common/common-debug.c
-	$(COMPILE) $(srcdir)/common/common-debug.c
-	$(POSTCOMPILE)
-
-cleanups.o: ${srcdir}/common/cleanups.c
-	$(COMPILE) $(srcdir)/common/cleanups.c
-	$(POSTCOMPILE)
-
-common-exceptions.o: ${srcdir}/common/common-exceptions.c
-	$(COMPILE) $(srcdir)/common/common-exceptions.c
-	$(POSTCOMPILE)
-
-posix-strerror.o: ${srcdir}/common/posix-strerror.c
-	$(COMPILE) $(srcdir)/common/posix-strerror.c
-	$(POSTCOMPILE)
-
-mingw-strerror.o: ${srcdir}/common/mingw-strerror.c
-	$(COMPILE) $(srcdir)/common/mingw-strerror.c
-	$(POSTCOMPILE)
-
-btrace-common.o: ${srcdir}/common/btrace-common.c
-	$(COMPILE) $(srcdir)/common/btrace-common.c
-	$(POSTCOMPILE)
-
-fileio.o: ${srcdir}/common/fileio.c
-	$(COMPILE) $(srcdir)/common/fileio.c
-	$(POSTCOMPILE)
-
-common-regcache.o: ${srcdir}/common/common-regcache.c
-	$(COMPILE) $(srcdir)/common/common-regcache.c
-	$(POSTCOMPILE)
-
-signals-state-save-restore.o: $(srcdir)/common/signals-state-save-restore.c
-	$(COMPILE) $(srcdir)/common/signals-state-save-restore.c
-	$(POSTCOMPILE)
-
-new-op.o: ${srcdir}/common/new-op.c
-	$(COMPILE) $(srcdir)/common/new-op.c
-	$(POSTCOMPILE)
-
 #
 # gdb/target/ dependencies
 #
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-waitstatus.o: ${srcdir}/target/waitstatus.c
-	$(COMPILE) $(srcdir)/target/waitstatus.c
+%.o: ${srcdir}/target/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
 #
@@ -2306,16 +2063,8 @@ waitstatus.o: ${srcdir}/target/waitstatus.c
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-arm.o: ${srcdir}/arch/arm.c
-	$(COMPILE) $(srcdir)/arch/arm.c
-	$(POSTCOMPILE)
-
-arm-linux.o: ${srcdir}/arch/arm-linux.c
-	$(COMPILE) $(srcdir)/arch/arm-linux.c
-	$(POSTCOMPILE)
-
-arm-get-next-pcs.o: ${srcdir}/arch/arm-get-next-pcs.c
-	$(COMPILE) $(srcdir)/arch/arm-get-next-pcs.c
+%.o: ${srcdir}/arch/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
 # gdb/nat/ dependencies
@@ -2323,73 +2072,8 @@ arm-get-next-pcs.o: ${srcdir}/arch/arm-get-next-pcs.c
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-x86-dregs.o: ${srcdir}/nat/x86-dregs.c
-	$(COMPILE) $(srcdir)/nat/x86-dregs.c
-	$(POSTCOMPILE)
-
-linux-btrace.o: ${srcdir}/nat/linux-btrace.c
-	$(COMPILE) $(srcdir)/nat/linux-btrace.c
-	$(POSTCOMPILE)
-
-linux-osdata.o: ${srcdir}/nat/linux-osdata.c
-	$(COMPILE) $(srcdir)/nat/linux-osdata.c
-	$(POSTCOMPILE)
-
-linux-procfs.o: $(srcdir)/nat/linux-procfs.c
-	$(COMPILE) $(srcdir)/nat/linux-procfs.c
-	$(POSTCOMPILE)
-
-linux-ptrace.o: $(srcdir)/nat/linux-ptrace.c
-	$(COMPILE) $(srcdir)/nat/linux-ptrace.c
-	$(POSTCOMPILE)
-
-linux-waitpid.o: ${srcdir}/nat/linux-waitpid.c
-	$(COMPILE) $(srcdir)/nat/linux-waitpid.c
-	$(POSTCOMPILE)
-
-mips-linux-watch.o: ${srcdir}/nat/mips-linux-watch.c
-	$(COMPILE) $(srcdir)/nat/mips-linux-watch.c
-	$(POSTCOMPILE)
-
-ppc-linux.o: ${srcdir}/nat/ppc-linux.c
-	$(COMPILE) $(srcdir)/nat/ppc-linux.c
-	$(POSTCOMPILE)
-
-linux-personality.o: ${srcdir}/nat/linux-personality.c
-	$(COMPILE) $(srcdir)/nat/linux-personality.c
-	$(POSTCOMPILE)
-
-x86-linux.o: ${srcdir}/nat/x86-linux.c
-	$(COMPILE) $(srcdir)/nat/x86-linux.c
-	$(POSTCOMPILE)
-
-x86-linux-dregs.o: ${srcdir}/nat/x86-linux-dregs.c
-	$(COMPILE) $(srcdir)/nat/x86-linux-dregs.c
-	$(POSTCOMPILE)
-
-amd64-linux-siginfo.o: ${srcdir}/nat/amd64-linux-siginfo.c
-	$(COMPILE) $(srcdir)/nat/amd64-linux-siginfo.c
-	$(POSTCOMPILE)
-
-linux-namespaces.o: ${srcdir}/nat/linux-namespaces.c
-	$(COMPILE) $(srcdir)/nat/linux-namespaces.c
-	$(POSTCOMPILE)
-
-aarch64-linux-hw-point.o: ${srcdir}/nat/aarch64-linux-hw-point.c
-	$(COMPILE) $(srcdir)/nat/aarch64-linux-hw-point.c
-	$(POSTCOMPILE)
-
-aarch64-linux.o: ${srcdir}/nat/aarch64-linux.c
-	$(COMPILE) $(srcdir)/nat/aarch64-linux.c
-	$(POSTCOMPILE)
-
-# gdb/arch/ dependencies
-#
-# Need to explicitly specify the compile rule as make will do nothing
-# or try to compile the object file into the sub-directory.
-
-aarch64-insn.o: ${srcdir}/arch/aarch64-insn.c
-	$(COMPILE) $(srcdir)/arch/aarch64-insn.c
+%.o: ${srcdir}/nat/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
 #
@@ -2398,72 +2082,8 @@ aarch64-insn.o: ${srcdir}/arch/aarch64-insn.c
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-tui.o: $(srcdir)/tui/tui.c
-	$(COMPILE) $(srcdir)/tui/tui.c
-	$(POSTCOMPILE)
-
-tui-command.o: $(srcdir)/tui/tui-command.c
-	$(COMPILE) $(srcdir)/tui/tui-command.c
-	$(POSTCOMPILE)
-
-tui-data.o: $(srcdir)/tui/tui-data.c
-	$(COMPILE) $(srcdir)/tui/tui-data.c
-	$(POSTCOMPILE)
-
-tui-disasm.o: $(srcdir)/tui/tui-disasm.c
-	$(COMPILE) $(srcdir)/tui/tui-disasm.c
-	$(POSTCOMPILE)
-
-tui-file.o: $(srcdir)/tui/tui-file.c
-	$(COMPILE) $(srcdir)/tui/tui-file.c
-	$(POSTCOMPILE)
-
-tui-hooks.o: $(srcdir)/tui/tui-hooks.c
-	$(COMPILE) $(srcdir)/tui/tui-hooks.c
-	$(POSTCOMPILE)
-
-tui-interp.o: $(srcdir)/tui/tui-interp.c
-	$(COMPILE) $(srcdir)/tui/tui-interp.c
-	$(POSTCOMPILE)
-
-tui-io.o: $(srcdir)/tui/tui-io.c
-	$(COMPILE) $(srcdir)/tui/tui-io.c
-	$(POSTCOMPILE)
-
-tui-layout.o: $(srcdir)/tui/tui-layout.c
-	$(COMPILE) $(srcdir)/tui/tui-layout.c
-	$(POSTCOMPILE)
-
-tui-out.o: $(srcdir)/tui/tui-out.c
-	$(COMPILE) $(srcdir)/tui/tui-out.c
-	$(POSTCOMPILE)
-
-tui-regs.o: $(srcdir)/tui/tui-regs.c
-	$(COMPILE) $(srcdir)/tui/tui-regs.c
-	$(POSTCOMPILE)
-
-tui-source.o: $(srcdir)/tui/tui-source.c
-	$(COMPILE) $(srcdir)/tui/tui-source.c
-	$(POSTCOMPILE)
-
-tui-stack.o: $(srcdir)/tui/tui-stack.c
-	$(COMPILE) $(srcdir)/tui/tui-stack.c
-	$(POSTCOMPILE)
-
-tui-win.o: $(srcdir)/tui/tui-win.c
-	$(COMPILE) $(srcdir)/tui/tui-win.c
-	$(POSTCOMPILE)
-
-tui-windata.o: $(srcdir)/tui/tui-windata.c
-	$(COMPILE) $(srcdir)/tui/tui-windata.c
-	$(POSTCOMPILE)
-
-tui-wingeneral.o: $(srcdir)/tui/tui-wingeneral.c
-	$(COMPILE) $(srcdir)/tui/tui-wingeneral.c
-	$(POSTCOMPILE)
-
-tui-winsource.o: $(srcdir)/tui/tui-winsource.c
-	$(COMPILE) $(srcdir)/tui/tui-winsource.c
+%.o: $(srcdir)/tui/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
 # gdb/guile dependencies
@@ -2471,104 +2091,8 @@ tui-winsource.o: $(srcdir)/tui/tui-winsource.c
 # Need to explicitly specify the compile rule as make will do nothing
 # or try to compile the object file into the sub-directory.
 
-guile.o: $(srcdir)/guile/guile.c
-	$(COMPILE) $(srcdir)/guile/guile.c
-	$(POSTCOMPILE)
-
-scm-arch.o: $(srcdir)/guile/scm-arch.c
-	$(COMPILE) $(srcdir)/guile/scm-arch.c
-	$(POSTCOMPILE)
-
-scm-auto-load.o: $(srcdir)/guile/scm-auto-load.c
-	$(COMPILE) $(srcdir)/guile/scm-auto-load.c
-	$(POSTCOMPILE)
-
-scm-block.o: $(srcdir)/guile/scm-block.c
-	$(COMPILE) $(srcdir)/guile/scm-block.c
-	$(POSTCOMPILE)
-
-scm-breakpoint.o: $(srcdir)/guile/scm-breakpoint.c
-	$(COMPILE) $(srcdir)/guile/scm-breakpoint.c
-	$(POSTCOMPILE)
-
-scm-cmd.o: $(srcdir)/guile/scm-cmd.c
-	$(COMPILE) $(srcdir)/guile/scm-cmd.c
-	$(POSTCOMPILE)
-
-scm-disasm.o: $(srcdir)/guile/scm-disasm.c
-	$(COMPILE) $(srcdir)/guile/scm-disasm.c
-	$(POSTCOMPILE)
-
-scm-exception.o: $(srcdir)/guile/scm-exception.c
-	$(COMPILE) $(srcdir)/guile/scm-exception.c
-	$(POSTCOMPILE)
-
-scm-frame.o: $(srcdir)/guile/scm-frame.c
-	$(COMPILE) $(srcdir)/guile/scm-frame.c
-	$(POSTCOMPILE)
-
-scm-gsmob.o: $(srcdir)/guile/scm-gsmob.c
-	$(COMPILE) $(srcdir)/guile/scm-gsmob.c
-	$(POSTCOMPILE)
-
-scm-iterator.o: $(srcdir)/guile/scm-iterator.c
-	$(COMPILE) $(srcdir)/guile/scm-iterator.c
-	$(POSTCOMPILE)
-
-scm-lazy-string.o: $(srcdir)/guile/scm-lazy-string.c
-	$(COMPILE) $(srcdir)/guile/scm-lazy-string.c
-	$(POSTCOMPILE)
-
-scm-math.o: $(srcdir)/guile/scm-math.c
-	$(COMPILE) $(srcdir)/guile/scm-math.c
-	$(POSTCOMPILE)
-
-scm-objfile.o: $(srcdir)/guile/scm-objfile.c
-	$(COMPILE) $(srcdir)/guile/scm-objfile.c
-	$(POSTCOMPILE)
-
-scm-param.o: $(srcdir)/guile/scm-param.c
-	$(COMPILE) $(srcdir)/guile/scm-param.c
-	$(POSTCOMPILE)
-
-scm-ports.o: $(srcdir)/guile/scm-ports.c
-	$(COMPILE) $(srcdir)/guile/scm-ports.c
-	$(POSTCOMPILE)
-
-scm-pretty-print.o: $(srcdir)/guile/scm-pretty-print.c
-	$(COMPILE) $(srcdir)/guile/scm-pretty-print.c
-	$(POSTCOMPILE)
-
-scm-progspace.o: $(srcdir)/guile/scm-progspace.c
-	$(COMPILE) $(srcdir)/guile/scm-progspace.c
-	$(POSTCOMPILE)
-
-scm-safe-call.o: $(srcdir)/guile/scm-safe-call.c
-	$(COMPILE) $(srcdir)/guile/scm-safe-call.c
-	$(POSTCOMPILE)
-
-scm-string.o: $(srcdir)/guile/scm-string.c
-	$(COMPILE) $(srcdir)/guile/scm-string.c
-	$(POSTCOMPILE)
-
-scm-symbol.o: $(srcdir)/guile/scm-symbol.c
-	$(COMPILE) $(srcdir)/guile/scm-symbol.c
-	$(POSTCOMPILE)
-
-scm-symtab.o: $(srcdir)/guile/scm-symtab.c
-	$(COMPILE) $(srcdir)/guile/scm-symtab.c
-	$(POSTCOMPILE)
-
-scm-type.o: $(srcdir)/guile/scm-type.c
-	$(COMPILE) $(srcdir)/guile/scm-type.c
-	$(POSTCOMPILE)
-
-scm-utils.o: $(srcdir)/guile/scm-utils.c
-	$(COMPILE) $(srcdir)/guile/scm-utils.c
-	$(POSTCOMPILE)
-
-scm-value.o: $(srcdir)/guile/scm-value.c
-	$(COMPILE) $(srcdir)/guile/scm-value.c
+%.o: $(srcdir)/guile/%.c
+	$(COMPILE) $<
 	$(POSTCOMPILE)
 
 # gdb/python/ dependencies
@@ -2579,156 +2103,8 @@ scm-value.o: $(srcdir)/guile/scm-value.c
 # Flags needed to compile Python code
 PYTHON_CFLAGS=@PYTHON_CFLAGS@
 
-python.o: $(srcdir)/python/python.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/python.c
-	$(POSTCOMPILE)
-
-py-arch.o: $(srcdir)/python/py-arch.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-arch.c
-	$(POSTCOMPILE)
-
-py-auto-load.o: $(srcdir)/python/py-auto-load.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-auto-load.c
-	$(POSTCOMPILE)
-
-py-block.o: $(srcdir)/python/py-block.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-block.c
-	$(POSTCOMPILE)
-
-py-bpevent.o: $(srcdir)/python/py-bpevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-bpevent.c
-	$(POSTCOMPILE)
-
-py-breakpoint.o: $(srcdir)/python/py-breakpoint.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-breakpoint.c
-	$(POSTCOMPILE)
-
-py-cmd.o: $(srcdir)/python/py-cmd.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-cmd.c
-	$(POSTCOMPILE)
-
-py-continueevent.o: $(srcdir)/python/py-continueevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-continueevent.c
-	$(POSTCOMPILE)
-
-py-xmethods.o: $(srcdir)/python/py-xmethods.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-xmethods.c
-	$(POSTCOMPILE)
-
-py-event.o: $(srcdir)/python/py-event.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-event.c
-	$(POSTCOMPILE)
-
-py-evtregistry.o: $(srcdir)/python/py-evtregistry.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-evtregistry.c
-	$(POSTCOMPILE)
-
-py-evts.o: $(srcdir)/python/py-evts.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-evts.c
-	$(POSTCOMPILE)
-
-py-exitedevent.o: $(srcdir)/python/py-exitedevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-exitedevent.c
-	$(POSTCOMPILE)
-
-py-finishbreakpoint.o: $(srcdir)/python/py-finishbreakpoint.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-finishbreakpoint.c
-	$(POSTCOMPILE)
-
-py-frame.o: $(srcdir)/python/py-frame.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-frame.c
-	$(POSTCOMPILE)
-
-py-framefilter.o: $(srcdir)/python/py-framefilter.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-framefilter.c
-	$(POSTCOMPILE)
-
-py-function.o: $(srcdir)/python/py-function.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-function.c
-	$(POSTCOMPILE)
-
-py-gdb-readline.o: $(srcdir)/python/py-gdb-readline.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-gdb-readline.c
-	$(POSTCOMPILE)
-
-py-inferior.o: $(srcdir)/python/py-inferior.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-inferior.c
-	$(POSTCOMPILE)
-
-py-infevents.o: $(srcdir)/python/py-infevents.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-infevents.c
-	$(POSTCOMPILE)
-
-py-infthread.o: $(srcdir)/python/py-infthread.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-infthread.c
-	$(POSTCOMPILE)
-
-py-lazy-string.o: $(srcdir)/python/py-lazy-string.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-lazy-string.c
-	$(POSTCOMPILE)
-
-py-linetable.o: $(srcdir)/python/py-linetable.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-linetable.c
-	$(POSTCOMPILE)
-
-py-newobjfileevent.o: $(srcdir)/python/py-newobjfileevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-newobjfileevent.c
-	$(POSTCOMPILE)
-
-py-objfile.o: $(srcdir)/python/py-objfile.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-objfile.c
-	$(POSTCOMPILE)
-
-py-param.o: $(srcdir)/python/py-param.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-param.c
-	$(POSTCOMPILE)
-
-py-prettyprint.o: $(srcdir)/python/py-prettyprint.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-prettyprint.c
-	$(POSTCOMPILE)
-
-py-progspace.o: $(srcdir)/python/py-progspace.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-progspace.c
-	$(POSTCOMPILE)
-
-py-signalevent.o: $(srcdir)/python/py-signalevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-signalevent.c
-	$(POSTCOMPILE)
-
-py-stopevent.o: $(srcdir)/python/py-stopevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-stopevent.c
-	$(POSTCOMPILE)
-
-py-symbol.o: $(srcdir)/python/py-symbol.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-symbol.c
-	$(POSTCOMPILE)
-
-py-symtab.o: $(srcdir)/python/py-symtab.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-symtab.c
-	$(POSTCOMPILE)
-
-py-threadevent.o: $(srcdir)/python/py-threadevent.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-threadevent.c
-	$(POSTCOMPILE)
-
-py-type.o: $(srcdir)/python/py-type.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-type.c
-	$(POSTCOMPILE)
-
-py-unwind.o: $(srcdir)/python/py-unwind.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-unwind.c
-	$(POSTCOMPILE)
-
-py-utils.o: $(srcdir)/python/py-utils.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-utils.c
-	$(POSTCOMPILE)
-
-py-value.o: $(srcdir)/python/py-value.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-value.c
-	$(POSTCOMPILE)
-
-py-varobj.o: $(srcdir)/python/py-varobj.c
-	$(COMPILE) $(PYTHON_CFLAGS) $(srcdir)/python/py-varobj.c
+%.o: $(srcdir)/python/%.c
+	$(COMPILE) $(PYTHON_CFLAGS) $<
 	$(POSTCOMPILE)
 
 #
-- 
2.10.0

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

* [PATCH 1/4] Makefile: Replace old suffix rules with pattern rules
  2016-11-13  3:46 [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
  2016-11-13  3:46 ` [PATCH 3/4] Makefile: Flatten and sort file lists Simon Marchi
@ 2016-11-13  3:46 ` Simon Marchi
  2016-11-13  3:46 ` [PATCH 2/4] Makefile: Replace explicit subdir " Simon Marchi
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 22+ messages in thread
From: Simon Marchi @ 2016-11-13  3:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

As mentioned here [1], suffix rules are obsolete and have been
superseeded with pattern rules.  People (myself included, before writing
this patch) are more likely to know what pattern rules are than suffix
rules.

AFAIK, .SUFFIXES targets are only used for those rules, and can be
removed as well.

gdb/ChangeLog:

	* Makefile.in (.c.o): Replace rule with ...
	(%.o: %.c): ... this one.
	(.po.gmo): Replace rule with ...
	(%.gmo: %.po): ... this one.
	(.po.pox): Replace rule with ...
	(%.pox: %.po): ... this one.
	(.y.c): Replace rule with ...
	(%.c: %.y): ... this one.
	(.l.c): Replace rule with ...
	(%.c: %.l): ... this one.
	(.SUFFIXES): Remove all instances.

[1] https://www.gnu.org/software/make/manual/html_node/Suffix-Rules.html
---
 gdb/Makefile.in | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index 3876cd9..27727d0 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1122,7 +1122,7 @@ DISTSTUFF = $(YYFILES)
 generated_files = config.h observer.h observer.inc ada-lex.c jit-reader.h \
 	$(GNULIB_H) $(NAT_GENERATED_FILES) gcore
 
-.c.o:
+%.o: %.c
 	$(COMPILE) $<
 	$(POSTCOMPILE)
 
@@ -1801,7 +1801,6 @@ ada-exp.o: ada-exp.c
 # Rules for generating translated message descriptions.  Disabled by
 # autoconf if the tools are not available.
 
-.SUFFIXES: .po .gmo .pox .pot
 .PHONY: all-po install-po uninstall-po clean-po update-po $(PACKAGE).pot
 
 all-po: $(CATALOGS)
@@ -1812,14 +1811,14 @@ update-po: $(CATALOGS:.gmo=.pox)
 
 # N.B. We do not attempt to copy these into $(srcdir).  The snapshot
 # script does that.
-.po.gmo:
+%.gmo: %.po
 	-test -d po || mkdir po
 	$(GMSGFMT) --statistics -o $@ $<
 
 # The new .po has to be gone over by hand, so we deposit it into
 # build/po with a different extension.  If build/po/$(PACKAGE).pot
 # exists, use it (it was just created), else use the one in srcdir.
-.po.pox:
+%.pox: %.po
 	-test -d po || mkdir po
 	$(MSGMERGE) $< `if test -f po/$(PACKAGE).pot; \
 			then echo po/$(PACKAGE).pot; \
@@ -1880,8 +1879,7 @@ po/$(PACKAGE).pot: force
 # Strictly speaking c-exp.c should therefore depend on
 # Makefile.in, but that was a pretty big annoyance.
 
-.SUFFIXES: .y .l
-.y.c:
+%.c: %.y
 	rm -f $@ $@.tmp
 	$(SHELL) $(YLWRAP) $< y.tab.c $@ -- $(YACC) $(YFLAGS) && mv $@ $@.tmp \
 		|| (rm -f $@; false)
@@ -1897,7 +1895,7 @@ po/$(PACKAGE).pot: force
 	     -e 's/YY_NULL/YY_NULLPTR/g' \
 	  < $@.tmp > $@
 	rm -f $@.tmp
-.l.c:
+%.c: %.l
 	if [ "$(FLEX)" ] && $(FLEX) --version >/dev/null 2>&1; then \
 	    $(FLEX) -o$@ $< && \
 	    rm -f $@.new && \
-- 
2.10.0

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

* [PATCH 3/4] Makefile: Flatten and sort file lists
  2016-11-13  3:46 [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
@ 2016-11-13  3:46 ` Simon Marchi
  2016-11-15 16:46   ` Pedro Alves
  2016-11-13  3:46 ` [PATCH 1/4] Makefile: Replace old suffix rules with pattern rules Simon Marchi
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 22+ messages in thread
From: Simon Marchi @ 2016-11-13  3:46 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

I find the big file lists in the Makefile a bit ugly and not very
practical.  Since there are multiple filenames on each line (as much as
fits in 80 columns), it's not easy to add, remove or change a name in
the middle.  As a result, we have a mix of long and short lines in no
particular order (ALL_TARGET_OBS is a good example).

I therefore suggest flattening the list (one name per line) and keeping
it in alphabetical order.  The diffs will be much clearer and merge
conflicts will be easier to resolve.

For the ordering, I aimed at respecting this order:

 * foo.c
 * foo-bar.c
 * foobar.c

Which, in non-formal words, could be expressed like so:

 * The extension is not taken into account when comparing two filenames
   (except if the filenames are otherwise equal).
 * A filename that is a prefix of another one comes before this other
   one.
 * Underscores and dashes are treated equally (I think we use them both
   for the same purpose).
 * Underscores and dashes come before alphanumeric characters.

Short of any other rule, this could be used as a guideline to determine
where to add a new filename in the list.

gdb/ChangeLog:

	* Makefile.in (SUBDIR_CLI_OBS, SUBDIR_CLI_SRCS, SUBDIR_MI_OBS,
	SUBDIR_MI_SRCS, SUBDIR_TUI_OBS, SUBDIR_TUI_SRCS,
	SUBDIR_GCC_COMPILE_OBS, SUBDIR_GCC_COMPILE_SRCS,
	SUBDIR_GUILE_OBS, SUBDIR_GUILE_SRCS, SUBDIR_PYTHON_OBS,
	SUBDIR_PYTHON_SRCS, SUBDIR_GDBTK_OBS, SUBDIR_GDBTK_SRCS,
	XMLFILES, REMOTE_OBS, ALL_64_TARGET_OBS, ALL_TARGET_OBS, SFILES,
	HFILES_NO_SRCDIR, HFILES_WITH_SRCDIR, COMMON_OBS, YYFILES,
	YYOBJ, generated_files, ALLDEPFILES): Flatten list and order
	alphabetically.
---
 gdb/Makefile.in | 1537 ++++++++++++++++++++++++++++++++++++++++++-------------
 1 file changed, 1167 insertions(+), 370 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index a0fea7c..5952ab9 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -214,15 +214,25 @@ 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-decode.o cli-script.o cli-cmds.o cli-setshow.o \
+	cli-interp.o \
 	cli-logging.o \
-	cli-interp.o cli-utils.o
+	cli-script.o \
+	cli-setshow.o \
+	cli-utils.o
+
 SUBDIR_CLI_SRCS = \
+	cli/cli-cmds.c \
+	cli/cli-decode.c \
 	cli/cli-dump.c \
-	cli/cli-decode.c cli/cli-script.c cli/cli-cmds.c cli/cli-setshow.c \
+	cli/cli-interp.c \
 	cli/cli-logging.c \
-	cli/cli-interp.c cli/cli-utils.c
+	cli/cli-script.c \
+	cli/cli-setshow.c \
+	cli/cli-utils.c
+
 SUBDIR_CLI_DEPS =
 SUBDIR_CLI_LDFLAGS=
 SUBDIR_CLI_CFLAGS=
@@ -231,19 +241,43 @@ SUBDIR_CLI_CFLAGS=
 # MI sub directory definitons
 #
 SUBDIR_MI_OBS = \
-	mi-out.o mi-console.o \
-	mi-cmds.o mi-cmd-catch.o mi-cmd-env.o \
-	mi-cmd-var.o mi-cmd-break.o mi-cmd-stack.o \
-	mi-cmd-file.o mi-cmd-disas.o mi-symbol-cmds.o mi-cmd-target.o \
-	mi-cmd-info.o mi-interp.o \
-	mi-main.o mi-parse.o mi-getopt.o
+	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-out.c mi/mi-console.c \
-	mi/mi-cmds.c mi/mi-cmd-catch.c mi/mi-cmd-env.c \
-	mi/mi-cmd-var.c mi/mi-cmd-break.c mi/mi-cmd-stack.c \
-	mi/mi-cmd-file.c mi/mi-cmd-disas.c mi/mi-symbol-cmds.c \
-	mi/mi-cmd-target.c mi/mi-cmd-info.c mi/mi-interp.c \
-	mi/mi-main.c mi/mi-parse.c mi/mi-getopt.c
+	mi/mi-cmd-break.c \
+	mi/mi-cmd-catch.c \
+	mi/mi-cmd-disas.c \
+	mi/mi-cmd-env.c \
+	mi/mi-cmd-file.c \
+	mi/mi-cmd-info.c \
+	mi/mi-cmd-stack.c \
+	mi/mi-cmd-target.c \
+	mi/mi-cmd-var.c \
+	mi/mi-cmds.c \
+	mi/mi-console.c \
+	mi/mi-getopt.c \
+	mi/mi-interp.c \
+	mi/mi-main.c \
+	mi/mi-out.c \
+	mi/mi-parse.c \
+	mi/mi-symbol-cmds.c
+
 SUBDIR_MI_DEPS =
 SUBDIR_MI_LDFLAGS=
 SUBDIR_MI_CFLAGS=
@@ -253,6 +287,7 @@ SUBDIR_MI_CFLAGS=
 #
 
 SUBDIR_TUI_OBS = \
+	tui.o \
 	tui-command.o \
 	tui-data.o \
 	tui-disasm.o \
@@ -269,9 +304,9 @@ SUBDIR_TUI_OBS = \
 	tui-windata.o \
 	tui-wingeneral.o \
 	tui-winsource.o \
-	tui.o
 
 SUBDIR_TUI_SRCS = \
+	tui/tui.c \
 	tui/tui-command.c \
 	tui/tui-data.c \
 	tui/tui-disasm.c \
@@ -287,8 +322,7 @@ SUBDIR_TUI_SRCS = \
 	tui/tui-win.c \
 	tui/tui-windata.c \
 	tui/tui-wingeneral.c \
-	tui/tui-winsource.c \
-	tui/tui.c
+	tui/tui-winsource.c
 
 SUBDIR_TUI_DEPS =
 SUBDIR_TUI_LDFLAGS=
@@ -299,19 +333,24 @@ SUBDIR_TUI_CFLAGS= \
 # GCC Compile support sub-directory definitions
 #
 SUBDIR_GCC_COMPILE_OBS = \
-	compile.o compile-c-symbols.o compile-c-types.o \
-	compile-object-load.o compile-object-run.o \
-	compile-loc2c.o compile-c-support.o
+	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 \
 	compile/compile-c-symbols.c \
 	compile/compile-c-types.c \
+	compile/compile-loc2c.c \
 	compile/compile-object-load.c \
 	compile/compile-object-load.h \
 	compile/compile-object-run.c \
-	compile/compile-object-run.h \
-	compile/compile-loc2c.c \
-	compile/compile-c-support.c
+	compile/compile-object-run.h
 
 # Guile sub directory definitons for guile support.
 
@@ -328,8 +367,8 @@ SUBDIR_GUILE_OBS = \
 	scm-gsmob.o \
 	scm-iterator.o \
 	scm-lazy-string.o \
-	scm-objfile.o \
 	scm-math.o \
+	scm-objfile.o \
 	scm-param.o \
 	scm-ports.o \
 	scm-pretty-print.o \
@@ -341,6 +380,7 @@ SUBDIR_GUILE_OBS = \
 	scm-type.o \
 	scm-utils.o \
 	scm-value.o
+
 SUBDIR_GUILE_SRCS = \
 	guile/guile.c \
 	guile/scm-arch.c \
@@ -354,8 +394,8 @@ SUBDIR_GUILE_SRCS = \
 	guile/scm-gsmob.c \
 	guile/scm-iterator.c \
 	guile/scm-lazy-string.c \
-	guile/scm-objfile.c \
 	guile/scm-math.c \
+	guile/scm-objfile.c \
 	guile/scm-param.c \
 	guile/scm-ports.c \
 	guile/scm-pretty-print.c \
@@ -367,6 +407,7 @@ SUBDIR_GUILE_SRCS = \
 	guile/scm-type.c \
 	guile/scm-utils.c \
 	guile/scm-value.c
+
 SUBDIR_GUILE_DEPS =
 SUBDIR_GUILE_LDFLAGS=
 SUBDIR_GUILE_CFLAGS=
@@ -383,14 +424,13 @@ SUBDIR_PYTHON_OBS = \
 	py-breakpoint.o \
 	py-cmd.o \
 	py-continueevent.o \
-	py-xmethods.o \
 	py-event.o \
 	py-evtregistry.o \
 	py-evts.o \
 	py-exitedevent.o \
 	py-finishbreakpoint.o \
-	py-frame.o \
 	py-framefilter.o \
+	py-frame.o \
 	py-function.o \
 	py-gdb-readline.o \
 	py-inferior.o \
@@ -412,7 +452,8 @@ SUBDIR_PYTHON_OBS = \
 	py-unwind.o \
 	py-utils.o \
 	py-value.o \
-	py-varobj.o
+	py-varobj.o \
+	py-xmethods.o
 
 SUBDIR_PYTHON_SRCS = \
 	python/python.c \
@@ -423,7 +464,6 @@ SUBDIR_PYTHON_SRCS = \
 	python/py-breakpoint.c \
 	python/py-cmd.c \
 	python/py-continueevent.c \
-	python/py-xmethods.c \
 	python/py-event.c \
 	python/py-evtregistry.c \
 	python/py-evts.c \
@@ -452,7 +492,9 @@ SUBDIR_PYTHON_SRCS = \
 	python/py-unwind.c \
 	python/py-utils.c \
 	python/py-value.c \
-	python/py-varobj.c
+	python/py-varobj.c \
+	python/py-xmethods.c
+
 SUBDIR_PYTHON_DEPS =
 SUBDIR_PYTHON_LDFLAGS=
 SUBDIR_PYTHON_CFLAGS=
@@ -509,15 +551,28 @@ GDBTK_LIBRARY = $(datadir)/insight$(GDBTK_VERSION)
 GDBTK_SRC_DIR = @GDBTK_SRC_DIR@
 
 SUBDIR_GDBTK_OBS = \
-	gdbtk.o gdbtk-bp.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-interp.o \
-	gdbtk-register.o gdbtk-stack.o gdbtk-varobj.o gdbtk-wrapper.o
+	gdbtk.o \
+	gdbtk-bp.o \
+	gdbtk-cmds.o \
+	gdbtk-hooks.o \
+	gdbtk-interp.o \
+	gdbtk-register.o \
+	gdbtk-stack.o \
+	gdbtk-varobj.o \
+	gdbtk-wrapper.o
+
 SUBDIR_GDBTK_SRCS = \
-	gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-bp.c \
-	gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c \
+	gdbtk/generic/gdbtk.c \
+	gdbtk/generic/gdbtk-bp.c \
+	gdbtk/generic/gdbtk-cmds.c \
+	gdbtk/generic/gdbtk-hooks.c \
 	gdbtk/generic/gdbtk-interp.c \
-	gdbtk/generic/gdbtk-register.c gdbtk/generic/gdbtk-stack.c \
-	gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c \
-	gdbtk/generic/gdbtk-main.c
+	gdbtk/generic/gdbtk-main.c \
+	gdbtk/generic/gdbtk-register.c \
+	gdbtk/generic/gdbtk-stack.c \
+	gdbtk/generic/gdbtk-varobj.c \
+	gdbtk/generic/gdbtk-wrapper.c \
+
 SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
 SUBDIR_GDBTK_LDFLAGS=
 SUBDIR_GDBTK_CFLAGS= -DGDBTK
@@ -611,12 +666,17 @@ RUNTEST = runtest
 RUNTESTFLAGS=
 
 # XML files to build in to GDB.
-XMLFILES = $(srcdir)/features/gdb-target.dtd $(srcdir)/features/xinclude.dtd \
+XMLFILES = \
+	$(srcdir)/features/btrace.dtd \
+	$(srcdir)/features/btrace-conf.dtd \
+	$(srcdir)/features/gdb-target.dtd \
 	$(srcdir)/features/library-list.dtd \
 	$(srcdir)/features/library-list-aix.dtd \
-	$(srcdir)/features/library-list-svr4.dtd $(srcdir)/features/osdata.dtd \
-	$(srcdir)/features/threads.dtd $(srcdir)/features/traceframe-info.dtd \
-	$(srcdir)/features/btrace.dtd $(srcdir)/features/btrace-conf.dtd
+	$(srcdir)/features/library-list-svr4.dtd \
+	$(srcdir)/features/osdata.dtd \
+	$(srcdir)/features/threads.dtd \
+	$(srcdir)/features/traceframe-info.dtd \
+	$(srcdir)/features/xinclude.dtd \
 
 # This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX
 # interface to the serial port.  Hopefully if get ported to OS/2, VMS,
@@ -628,8 +688,17 @@ SER_HARDWIRE = @SER_HARDWIRE@
 
 # The `remote' debugging target is supported for most architectures,
 # but not all (e.g. 960)
-REMOTE_OBS = remote.o dcache.o tracepoint.o ax-general.o ax-gdb.o remote-fileio.o \
-	remote-notif.o ctf.o tracefile.o tracefile-tfile.o
+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@
@@ -640,85 +709,160 @@ TARGET_OBS = @TARGET_OBS@
 # All target-dependent objects files that require 64-bit CORE_ADDR
 # (used with --enable-targets=all --enable-64-bit-bfd).
 ALL_64_TARGET_OBS = \
-	aarch64-tdep.o aarch64-linux-tdep.o aarch64-newlib-tdep.o aarch64-insn.o \
-	alphabsd-tdep.o alphafbsd-tdep.o alpha-linux-tdep.o alpha-mdebug-tdep.o \
-	alphanbsd-tdep.o alphaobsd-tdep.o alpha-tdep.o \
-	amd64fbsd-tdep.o amd64-darwin-tdep.o amd64-dicos-tdep.o \
-	amd64-linux-tdep.o amd64nbsd-tdep.o \
-	amd64obsd-tdep.o amd64-sol2-tdep.o amd64-tdep.o amd64-windows-tdep.o \
-	ia64-linux-tdep.o ia64-vms-tdep.o ia64-tdep.o \
+	aarch64-insn.o \
+	aarch64-linux-tdep.o \
+	aarch64-newlib-tdep.o \
+	aarch64-tdep.o \
+	alpha-linux-tdep.o \
+	alpha-mdebug-tdep.o \
+	alpha-tdep.o \
+	alphabsd-tdep.o \
+	alphafbsd-tdep.o \
+	alphanbsd-tdep.o \
+	alphaobsd-tdep.o \
+	amd64-darwin-tdep.o \
+	amd64-dicos-tdep.o \
+	amd64-linux-tdep.o \
+	amd64-sol2-tdep.o \
+	amd64-tdep.o \
+	amd64-windows-tdep.o \
+	amd64fbsd-tdep.o \
+	amd64nbsd-tdep.o \
+	amd64obsd-tdep.o \
+	ia64-linux-tdep.o \
+	ia64-tdep.o \
+	ia64-vms-tdep.o \
 	mips64obsd-tdep.o \
-	sparc64fbsd-tdep.o sparc64-linux-tdep.o sparc64nbsd-tdep.o \
-	sparc64obsd-tdep.o sparc64-sol2-tdep.o sparc64-tdep.o
+	sparc64-linux-tdep.o \
+	sparc64-sol2-tdep.o \
+	sparc64-tdep.o \
+	sparc64fbsd-tdep.o \
+	sparc64nbsd-tdep.o \
+	sparc64obsd-tdep.o
 
 # All other target-dependent objects files (used with --enable-targets=all).
 ALL_TARGET_OBS = \
 	arc-tdep.o \
-	armbsd-tdep.o arm.o arm-linux.o arm-linux-tdep.o \
-	arm-get-next-pcs.o arm-symbian-tdep.o \
-	armnbsd-tdep.o armobsd-tdep.o \
-	arm-tdep.o arm-wince-tdep.o \
+	arm.o \
+	arm-get-next-pcs.o \
+	arm-linux.o \
+	arm-linux-tdep.o \
+	arm-symbian-tdep.o \
+	arm-tdep.o \
+	arm-wince-tdep.o \
+	armbsd-tdep.o \
+	armnbsd-tdep.o \
+	armobsd-tdep.o \
 	avr-tdep.o \
-	bfin-linux-tdep.o bfin-tdep.o \
-	cris-linux-tdep.o cris-tdep.o \
+	bfin-linux-tdep.o \
+	bfin-tdep.o \
+	bsd-uthread.o \
+	cris-linux-tdep.o \
+	cris-tdep.o \
 	dicos-tdep.o \
 	fbsd-tdep.o \
-	frv-linux-tdep.o frv-tdep.o \
+	frv-linux-tdep.o \
+	frv-tdep.o \
 	ft32-tdep.o \
+	glibc-tdep.o \
 	h8300-tdep.o \
-	hppabsd-tdep.o hppanbsd-tdep.o hppaobsd-tdep.o \
-	hppa-linux-tdep.o hppa-tdep.o \
-	i386bsd-tdep.o i386-cygwin-tdep.o i386fbsd-tdep.o i386gnu-tdep.o \
-	i386-linux-tdep.o i386nbsd-tdep.o i386-nto-tdep.o i386obsd-tdep.o \
-	i386-sol2-tdep.o i386-tdep.o i387-tdep.o \
-	i386-dicos-tdep.o i386-darwin-tdep.o \
+	hppa-linux-tdep.o \
+	hppa-tdep.o \
+	hppabsd-tdep.o \
+	hppanbsd-tdep.o \
+	hppaobsd-tdep.o \
+	i386-cygwin-tdep.o \
+	i386-darwin-tdep.o \
+	i386-dicos-tdep.o \
+	i386-linux-tdep.o \
+	i386-nto-tdep.o \
+	i386-sol2-tdep.o \
+	i386-tdep.o \
+	i386bsd-tdep.o \
+	i386fbsd-tdep.o \
+	i386gnu-tdep.o \
+	i386nbsd-tdep.o \
+	i386obsd-tdep.o \
+	i387-tdep.o \
 	iq2000-tdep.o \
+	linux-record.o \
 	linux-tdep.o \
 	lm32-tdep.o \
 	m32c-tdep.o \
-	m32r-linux-tdep.o m32r-tdep.o \
+	m32r-linux-tdep.o \
+	m32r-tdep.o \
 	m68hc11-tdep.o \
-	m68kbsd-tdep.o m68klinux-tdep.o m68k-tdep.o \
+	m68k-tdep.o \
+	m68kbsd-tdep.o \
+	m68klinux-tdep.o \
 	m88k-tdep.o \
 	mep-tdep.o \
-	microblaze-tdep.o microblaze-linux-tdep.o \
-	mips-linux-tdep.o mips-sde-tdep.o \
-	mipsnbsd-tdep.o mips-tdep.o \
-	mn10300-linux-tdep.o mn10300-tdep.o \
+	microblaze-linux-tdep.o \
+	microblaze-tdep.o \
+	mips-linux-tdep.o \
+	mips-sde-tdep.o \
+	mips-tdep.o \
+	mipsnbsd-tdep.o \
+	mn10300-linux-tdep.o \
+	mn10300-tdep.o \
 	moxie-tdep.o \
 	msp430-tdep.o \
 	mt-tdep.o \
+	nbsd-tdep.o \
 	nds32-tdep.o \
-	nios2-tdep.o nios2-linux-tdep.o \
+	nios2-linux-tdep.o \
+	nios2-tdep.o \
 	nto-tdep.o \
-	ppc-linux-tdep.o ppcfbsd-tdep.o ppcnbsd-tdep.o ppcobsd-tdep.o  \
-	ppc-sysv-tdep.o ppc64-tdep.o rl78-tdep.o \
-	rs6000-aix-tdep.o rs6000-tdep.o solib-aix.o ppc-ravenscar-thread.o \
+	obsd-tdep.o \
+	ppc-linux-tdep.o \
+	ppc-ravenscar-thread.o \
+	ppc-sysv-tdep.o \
+	ppc64-tdep.o \
+	ppcfbsd-tdep.o \
+	ppcnbsd-tdep.o \
+	ppcobsd-tdep.o \
+	ravenscar-thread.o \
+	rl78-tdep.o \
+	rs6000-aix-tdep.o \
 	rs6000-lynx178-tdep.o \
+	rs6000-tdep.o \
 	rx-tdep.o \
 	s390-linux-tdep.o \
 	score-tdep.o \
-	sh64-tdep.o sh-linux-tdep.o shnbsd-tdep.o sh-tdep.o \
-	sparc-linux-tdep.o sparcnbsd-tdep.o sparcobsd-tdep.o \
-	sparc-sol2-tdep.o sparc-tdep.o sparc-ravenscar-thread.o \
-	spu-tdep.o spu-multiarch.o solib-spu.o \
-	tic6x-tdep.o tic6x-linux-tdep.o \
-	tilegx-tdep.o tilegx-linux-tdep.o \
-	v850-tdep.o \
-	vaxnbsd-tdep.o vaxobsd-tdep.o vax-tdep.o \
-	xstormy16-tdep.o \
-	xtensa-config.o xtensa-tdep.o xtensa-linux-tdep.o \
-	glibc-tdep.o \
-	bsd-uthread.o \
-	nbsd-tdep.o obsd-tdep.o \
+	sh-linux-tdep.o \
+	sh-tdep.o \
+	sh64-tdep.o \
+	shnbsd-tdep.o \
 	sol2-tdep.o \
-	solib-frv.o solib-svr4.o \
-	solib-darwin.o solib-dsbt.o \
-	xcoffread.o \
+	solib-aix.o \
+	solib-darwin.o \
+	solib-dsbt.o \
+	solib-frv.o \
+	solib-spu.o \
+	solib-svr4.o \
+	sparc-linux-tdep.o \
+	sparc-ravenscar-thread.o \
+	sparc-sol2-tdep.o \
+	sparc-tdep.o \
+	sparcnbsd-tdep.o \
+	sparcobsd-tdep.o \
+	spu-multiarch.o \
+	spu-tdep.o \
 	symfile-mem.o \
+	tic6x-linux-tdep.o \
+	tic6x-tdep.o \
+	tilegx-linux-tdep.o \
+	tilegx-tdep.o \
+	v850-tdep.o \
+	vax-tdep.o \
+	vaxnbsd-tdep.o \
+	vaxobsd-tdep.o \
 	windows-tdep.o \
-	linux-record.o \
-	ravenscar-thread.o
+	xcoffread.o \
+	xstormy16-tdep.o \
+	xtensa-config.o \
+	xtensa-linux-tdep.o \
+	xtensa-tdep.o
 
 # Host-dependent makefile fragment comes in here.
 @host_makefile_frag@
@@ -821,80 +965,230 @@ TARGET_FLAGS_TO_PASS = \
 # Links made at configuration time should not be specified here, since
 # SFILES is used in building the distribution archive.
 
-SFILES = ada-exp.y ada-lang.c ada-typeprint.c ada-valprint.c ada-tasks.c \
+SFILES = \
+	ada-exp.y \
+	ada-lang.c \
+	ada-tasks.c \
+	ada-typeprint.c \
+	ada-valprint.c \
 	ada-varobj.c \
-	addrmap.c auto-load.c \
-	auxv.c ax-general.c ax-gdb.c \
+	addrmap.c \
 	agent.c \
+	annotate.c \
+	arch-utils.c \
+	auto-load.c \
+	auxv.c \
+	ax-gdb.c \
+	ax-general.c \
 	bcache.c \
 	bfd-target.c \
-	block.c blockframe.c \
-	breakpoint.c break-catch-sig.c break-catch-throw.c \
+	block.c \
+	blockframe.c \
+	break-catch-sig.c \
 	break-catch-syscall.c \
-	build-id.c buildsym.c \
-	c-exp.y c-lang.c c-typeprint.c c-valprint.c c-varobj.c \
-	charset.c common/cleanups.c cli-out.c coffread.c coff-pe-read.c \
-	complaints.c completer.c continuations.c corefile.c corelow.c \
-	cp-abi.c cp-support.c cp-namespace.c cp-valprint.c \
-	d-exp.y d-lang.c d-namespace.c d-valprint.c \
+	break-catch-throw.c \
+	breakpoint.c \
+	btrace.c \
+	build-id.c \
+	buildsym.c \
+	c-exp.y \
+	c-lang.c \
+	c-typeprint.c \
+	c-valprint.c \
+	c-varobj.c \
+	charset.c \
+	cli-out.c \
+	coff-pe-read.c \
+	coffread.c \
+	common/agent.c \
+	common/btrace-common.c \
+	common/buffer.c \
+	common/cleanups.c \
+	common/common-debug.c \
+	common/common-exceptions.c \
+	common/common-regcache.c \
+	common/common-utils.c \
+	common/errors.c \
+	common/fileio.c \
+	common/filestuff.c \
+	common/format.c \
+	common/gdb_vecs.c \
+	common/new-op.c \
+	common/print-utils.c \
+	common/ptid.c \
+	common/rsp-low.c \
+	common/signals.c \
+	common/signals-state-save-restore.c \
+	common/vec.c \
+	common/xml-utils.c \
+	complaints.c \
+	completer.c \
+	continuations.c \
+	copying.c \
+	corefile.c \
+	corelow.c \
+	cp-abi.c \
 	cp-name-parser.y \
-	dbxread.c demangle.c dictionary.c disasm.c doublest.c \
-	dtrace-probe.c dummy-frame.c \
-	dwarf2expr.c dwarf2loc.c dwarf2read.c dwarf2-frame.c \
+	cp-namespace.c \
+	cp-support.c \
+	cp-valprint.c \
+	ctf.c \
+	d-exp.y \
+	d-lang.c \
+	d-namespace.c \
+	d-valprint.c \
+	dbxread.c \
+	demangle.c \
+	dfp.c \
+	dictionary.c \
+	disasm.c \
+	doublest.c \
+	dtrace-probe.c \
+	dummy-frame.c \
+	dwarf2-frame.c \
 	dwarf2-frame-tailcall.c \
-	elfread.c environ.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 filesystem.c \
-	findcmd.c findvar.c frame.c frame-base.c frame-unwind.c \
-	gdbarch.c arch-utils.c gdb_bfd.c gdb_obstack.c \
-	gdbtypes.c gnu-v2-abi.c gnu-v3-abi.c \
-	go-exp.y go-lang.c go-typeprint.c go-valprint.c \
+	dwarf2expr.c \
+	dwarf2loc.c \
+	dwarf2read.c \
+	elfread.c \
+	environ.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 \
+	filesystem.c \
+	findcmd.c \
+	findvar.c \
+	frame.c \
+	frame-base.c \
+	frame-unwind.c \
+	gcore.c \
+	gdb.c \
+	gdb_bfd.c \
+	gdb-dlfcn.c \
+	gdb_obstack.c \
+	gdb_usleep.c \
+	gdbarch.c \
+	gdbtypes.c \
+	gnu-v2-abi.c \
+	gnu-v3-abi.c \
+	go-exp.y \
+	go-lang.c \
+	go-typeprint.c \
+	go-valprint.c \
+	inf-child.c \
 	inf-loop.c \
 	infcall.c \
-	infcmd.c inflow.c infrun.c \
+	infcmd.c \
+	inferior.c \
+	inflow.c \
+	infrun.c \
 	inline-frame.c \
 	interps.c \
-	language.c linespec.c location.c minidebug.c \
-	m2-exp.y m2-lang.c m2-typeprint.c m2-valprint.c \
-	macrotab.c macroexp.c macrocmd.c macroscope.c main.c maint.c \
-	mdebugread.c memattr.c mem-break.c minsyms.c mipsread.c memory-map.c \
-	memrange.c mi/mi-common.c \
+	jit.c \
+	language.c \
+	linespec.c \
+	location.c \
+	m2-exp.y \
+	m2-lang.c \
+	m2-typeprint.c \
+	m2-valprint.c \
+	macrocmd.c \
+	macroexp.c \
+	macroscope.c \
+	macrotab.c \
+	main.c \
+	maint.c \
+	mdebugread.c \
+	mem-break.c \
+	memattr.c \
+	memory-map.c \
+	memrange.c \
+	mi/mi-common.c \
+	minidebug.c \
+	minsyms.c \
+	mipsread.c \
 	namespace.c \
 	objc-lang.c \
-	objfiles.c osabi.c observer.c osdata.c \
+	objfiles.c \
+	observer.c \
 	opencl-lang.c \
-	p-exp.y p-lang.c p-typeprint.c p-valprint.c parse.c printcmd.c \
-	proc-service.list progspace.c \
-	prologue-value.c psymtab.c \
-	regcache.c reggroups.c remote.c remote-fileio.c remote-notif.c reverse.c \
-	rust-exp.y rust-lang.c \
-	selftest.c sentinel-frame.c \
-	serial.c ser-base.c ser-unix.c ser-event.c skip.c \
-	solib.c solib-target.c source.c \
-	stabsread.c stack.c probe.c stap-probe.c std-regs.c \
-	symfile.c symfile-debug.c symfile-mem.c symmisc.c symtab.c \
-	target.c target-dcache.c target-descriptions.c target-memory.c \
-	tid-parse.c thread.c top.c tracepoint.c \
+	osabi.c \
+	osdata.c \
+	p-exp.y \
+	p-lang.c \
+	p-typeprint.c \
+	p-valprint.c \
+	parse.c \
+	printcmd.c \
+	probe.c \
+	proc-service.list \
+	progspace.c \
+	prologue-value.c \
+	psymtab.c \
+	record.c \
+	record-btrace.c \
+	record-full.c \
+	regcache.c \
+	reggroups.c \
+	remote.c \
+	remote-fileio.c \
+	remote-notif.c \
+	reverse.c \
+	rust-exp.y \
+	rust-lang.c \
+	selftest.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 \
+	target-dcache.c \
+	target-descriptions.c \
+	target-memory.c \
+	target/waitstatus.c \
+	thread.c \
+	tid-parse.c \
+	top.c \
+	tracepoint.c \
 	trad-frame.c \
 	tramp-frame.c \
 	typeprint.c \
-	ui-out.c utils.c ui-file.h ui-file.c \
+	ui-file.h \
+	ui-file.c \
+	ui-out.c \
 	user-regs.c \
-	valarith.c valops.c valprint.c value.c varobj.c common/vec.c \
-	xml-tdesc.c xml-support.c \
-	inferior.c gdb_usleep.c \
-	record.c record-full.c gcore.c \
-	jit.c \
+	utils.c \
+	valarith.c \
+	valops.c \
+	valprint.c \
+	value.c \
+	varobj.c \
+	xml-support.c \
 	xml-syscall.c \
-	annotate.c common/signals.c copying.c dfp.c gdb.c inf-child.c \
-	sol-thread.c stub-termcap.c \
-	common/gdb_vecs.c common/common-utils.c common/xml-utils.c \
-	common/ptid.c common/buffer.c gdb-dlfcn.c common/agent.c \
-	common/format.c common/filestuff.c btrace.c record-btrace.c ctf.c \
-	target/waitstatus.c common/print-utils.c common/rsp-low.c \
-	common/errors.c common/common-debug.c common/common-exceptions.c \
-	common/btrace-common.c common/fileio.c common/common-regcache.c \
-	common/signals-state-save-restore.c common/new-op.c \
+	xml-tdesc.c \
 	$(SUBDIR_GCC_COMPILE_SRCS)
 
 LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
@@ -906,93 +1200,351 @@ LINTFILES = $(SFILES) $(YYFILES) $(CONFIG_SRCS) init.c
 # right, it is probably easiest just to list .h files here directly.
 
 HFILES_NO_SRCDIR = \
-common/gdb_signals.h nat/gdb_thread_db.h common/gdb_vecs.h \
-common/x86-xstate.h nat/linux-ptrace.h nat/mips-linux-watch.h \
-proc-utils.h aarch64-tdep.h arc-tdep.h arm-tdep.h ax-gdb.h ppcfbsd-tdep.h \
-ppcnbsd-tdep.h cli-out.h gdb_expat.h breakpoint.h infcall.h obsd-tdep.h \
-exec.h m32r-tdep.h osabi.h gdbcore.h x86bsd-nat.h \
-i386bsd-nat.h xml-support.h xml-tdesc.h alphabsd-tdep.h gdb_obstack.h \
-ia64-tdep.h ada-lang.h varobj.h varobj-iter.h frv-tdep.h \
-nto-tdep.h serial.h \
-c-lang.h d-lang.h go-lang.h frame.h event-loop.h block.h cli/cli-setshow.h \
-cli/cli-decode.h cli/cli-cmds.h cli/cli-utils.h \
-cli/cli-script.h macrotab.h symtab.h common/version.h \
-compile/compile.h gnulib/import/string.in.h gnulib/import/str-two-way.h \
-gnulib/import/stdint.in.h remote.h remote-notif.h gdb.h sparc-nat.h \
-gdbthread.h dwarf2-frame.h dwarf2-frame-tailcall.h nbsd-nat.h dcache.h \
-amd64-nat.h s390-linux-tdep.h arm-linux-tdep.h exceptions.h macroscope.h \
-gdbarch.h bsd-uthread.h memory-map.h memrange.h obsd-nat.h \
-mdebugread.h m88k-tdep.h stabsread.h hppa-linux-offsets.h linux-fork.h \
-ser-unix.h inf-ptrace.h terminal.h ui-out.h frame-base.h \
-f-lang.h dwarf2loc.h value.h sparc-tdep.h defs.h target-descriptions.h \
-objfiles.h common/vec.h disasm.h mips-tdep.h ser-base.h \
-gdb_curses.h bfd-target.h memattr.h inferior.h ax.h dummy-frame.h \
-inflow.h fbsd-nat.h ia64-libunwind-tdep.h completer.h \
-solib-target.h gdb_vfork.h alpha-tdep.h dwarf2expr.h \
-m2-lang.h stack.h charset.h addrmap.h command.h solist.h source.h \
-target.h target-dcache.h prologue-value.h cp-abi.h tui/tui-hooks.h tui/tui.h \
-tui/tui-file.h tui/tui-command.h tui/tui-disasm.h tui/tui-wingeneral.h \
-tui/tui-windata.h tui/tui-data.h tui/tui-win.h tui/tui-stack.h \
-tui/tui-winsource.h tui/tui-regs.h tui/tui-io.h tui/tui-layout.h \
-tui/tui-source.h sol2-tdep.h gregset.h sh-tdep.h sh64-tdep.h \
-expression.h score-tdep.h gdb_select.h ser-tcp.h \
-extension.h extension-priv.h nat/aarch64-linux-hw-point.h \
-build-id.h buildsym.h valprint.h nat/aarch64-linux.h \
-typeprint.h mi/mi-getopt.h mi/mi-parse.h mi/mi-console.h \
-mi/mi-out.h mi/mi-main.h mi/mi-common.h mi/mi-cmds.h linux-nat.h \
-complaints.h gdb_proc_service.h gdb_regex.h xtensa-tdep.h inf-loop.h \
-common/gdb_wait.h common/gdb_assert.h solib.h ppc-tdep.h cp-support.h glibc-tdep.h \
-interps.h auxv.h gdbcmd.h tramp-frame.h mipsnbsd-tdep.h	\
-amd64-linux-tdep.h linespec.h location.h i387-tdep.h mn10300-tdep.h \
-sparc64-tdep.h ppcobsd-tdep.h \
-coff-pe-read.h parser-defs.h gdb_ptrace.h mips-linux-tdep.h \
-m68k-tdep.h spu-tdep.h environ.h amd64-tdep.h \
-doublest.h regset.h hppa-tdep.h ppc-linux-tdep.h ppc64-tdep.h \
-rs6000-tdep.h rs6000-aix-tdep.h \
-common/gdb_locale.h arch-utils.h trad-frame.h gnu-nat.h \
-language.h nbsd-tdep.h solib-svr4.h \
-macroexp.h ui-file.h regcache.h tracepoint.h tracefile.h i386-tdep.h \
-inf-child.h p-lang.h event-top.h gdbtypes.h user-regs.h \
-regformats/regdef.h config/i386/nm-i386gnu.h \
-config/i386/nm-fbsd.h \
-config/nm-nto.h config/sparc/nm-sol2.h config/nm-linux.h \
-top.h bsd-kvm.h gdb-stabs.h reggroups.h \
-annotate.h sim-regno.h dictionary.h dfp.h main.h frame-unwind.h	\
-remote-fileio.h i386-linux-tdep.h vax-tdep.h objc-lang.h \
-sentinel-frame.h bcache.h symfile.h windows-tdep.h linux-tdep.h \
-gdb_usleep.h jit.h xml-syscall.h microblaze-tdep.h \
-psymtab.h psympriv.h progspace.h bfin-tdep.h \
-amd64-darwin-tdep.h charset-list.h \
-config/djgpp/langinfo.h config/djgpp/nl_types.h darwin-nat.h \
-dicos-tdep.h filesystem.h gcore.h gdb_wchar.h hppabsd-tdep.h \
-i386-darwin-tdep.h x86-nat.h linux-record.h moxie-tdep.h nios2-tdep.h \
-ft32-tdep.h nds32-tdep.h \
-osdata.h procfs.h python/py-event.h python/py-events.h python/py-stopevent.h \
-python/python-internal.h python/python.h ravenscar-thread.h record.h \
-record-full.h solib-aix.h \
-solib-darwin.h solib-spu.h windows-nat.h xcoffread.h \
-gnulib/import/extra/snippet/arg-nonnull.h gnulib/import/extra/snippet/c++defs.h \
-gnulib/import/extra/snippet/warn-on-use.h \
-gnulib/import/stddef.in.h gnulib/import/inttypes.in.h inline-frame.h skip.h \
-common/common-utils.h common/xml-utils.h common/buffer.h common/ptid.h \
-common/format.h common/host-defs.h utils.h common/queue.h \
-nat/linux-osdata.h gdb-dlfcn.h auto-load.h probe.h stap-probe.h \
-gdb_bfd.h sparc-ravenscar-thread.h ppc-ravenscar-thread.h nat/linux-btrace.h \
-nat/ppc-linux.h ctf.h nat/x86-cpuid.h nat/x86-gcc-cpuid.h target/resume.h \
-target/wait.h target/waitstatus.h nat/linux-nat.h nat/linux-waitpid.h \
-common/print-utils.h common/rsp-low.h nat/x86-dregs.h x86-linux-nat.h \
-i386-linux-nat.h common/common-defs.h common/errors.h common/common-types.h \
-common/common-debug.h common/cleanups.h common/gdb_setjmp.h \
-common/common-exceptions.h target/target.h common/symbol.h \
-common/common-regcache.h fbsd-tdep.h nat/linux-personality.h \
-common/fileio.h nat/x86-linux.h nat/x86-linux-dregs.h nat/amd64-linux-siginfo.h\
-nat/linux-namespaces.h arch/arm.h common/gdb_sys_time.h arch/aarch64-insn.h \
-tid-parse.h ser-event.h \
-common/signals-state-save-restore.h
+	aarch64-tdep.h \
+	ada-lang.h \
+	addrmap.h \
+	alpha-tdep.h \
+	alphabsd-tdep.h \
+	amd64-darwin-tdep.h \
+	amd64-linux-tdep.h \
+	amd64-nat.h \
+	amd64-tdep.h \
+	annotate.h \
+	arc-tdep.h \
+	arch-utils.h \
+	arch/aarch64-insn.h \
+	arch/arm.h \
+	arm-linux-tdep.h \
+	arm-tdep.h \
+	auto-load.h \
+	auxv.h \
+	ax.h \
+	ax-gdb.h \
+	bcache.h \
+	bfd-target.h \
+	bfin-tdep.h \
+	block.h \
+	breakpoint.h \
+	bsd-kvm.h \
+	bsd-uthread.h \
+	build-id.h \
+	buildsym.h \
+	c-lang.h \
+	charset.h \
+	charset-list.h \
+	cli-out.h \
+	cli/cli-cmds.h \
+	cli/cli-decode.h \
+	cli/cli-script.h \
+	cli/cli-setshow.h \
+	cli/cli-utils.h \
+	coff-pe-read.h \
+	command.h \
+	common/buffer.h \
+	common/cleanups.h \
+	common/common-debug.h \
+	common/common-defs.h \
+	common/common-exceptions.h \
+	common/common-regcache.h \
+	common/common-types.h \
+	common/common-utils.h \
+	common/errors.h \
+	common/fileio.h \
+	common/format.h \
+	common/gdb_assert.h \
+	common/gdb_locale.h \
+	common/gdb_setjmp.h \
+	common/gdb_signals.h \
+	common/gdb_sys_time.h \
+	common/gdb_vecs.h \
+	common/gdb_wait.h \
+	common/host-defs.h \
+	common/print-utils.h \
+	common/ptid.h \
+	common/queue.h \
+	common/rsp-low.h \
+	common/signals-state-save-restore.h \
+	common/symbol.h \
+	common/vec.h \
+	common/version.h \
+	common/x86-xstate.h \
+	common/xml-utils.h \
+	compile/compile.h \
+	complaints.h \
+	completer.h \
+	config/djgpp/langinfo.h \
+	config/djgpp/nl_types.h \
+	config/i386/nm-fbsd.h \
+	config/i386/nm-i386gnu.h \
+	config/nm-linux.h \
+	config/nm-nto.h \
+	config/sparc/nm-sol2.h \
+	cp-abi.h \
+	cp-support.h \
+	ctf.h \
+	d-lang.h \
+	darwin-nat.h \
+	dcache.h \
+	defs.h \
+	dfp.h \
+	dicos-tdep.h \
+	dictionary.h \
+	disasm.h \
+	doublest.h \
+	dummy-frame.h \
+	dwarf2-frame.h \
+	dwarf2-frame-tailcall.h \
+	dwarf2expr.h \
+	dwarf2loc.h \
+	environ.h \
+	event-loop.h \
+	event-top.h \
+	exceptions.h \
+	exec.h \
+	expression.h \
+	extension.h \
+	extension-priv.h \
+	f-lang.h \
+	fbsd-nat.h \
+	fbsd-tdep.h \
+	filesystem.h \
+	frame.h \
+	frame-base.h \
+	frame-unwind.h \
+	frv-tdep.h \
+	ft32-tdep.h \
+	gcore.h \
+	gdb.h \
+	gdb_bfd.h \
+	gdb_curses.h \
+	gdb-dlfcn.h \
+	gdb_expat.h \
+	gdb_obstack.h \
+	gdb_proc_service.h \
+	gdb_ptrace.h \
+	gdb_regex.h \
+	gdb_select.h \
+	gdb-stabs.h \
+	gdb_usleep.h \
+	gdb_vfork.h \
+	gdb_wchar.h \
+	gdbarch.h \
+	gdbcmd.h \
+	gdbcore.h \
+	gdbthread.h \
+	gdbtypes.h \
+	glibc-tdep.h \
+	gnu-nat.h \
+	gnulib/import/extra/snippet/arg-nonnull.h \
+	gnulib/import/extra/snippet/c++defs.h \
+	gnulib/import/extra/snippet/warn-on-use.h \
+	gnulib/import/inttypes.in.h \
+	gnulib/import/stddef.in.h \
+	gnulib/import/stdint.in.h \
+	gnulib/import/str-two-way.h \
+	gnulib/import/string.in.h \
+	go-lang.h \
+	gregset.h \
+	hppa-linux-offsets.h \
+	hppa-tdep.h \
+	hppabsd-tdep.h \
+	i386-darwin-tdep.h \
+	i386-linux-nat.h \
+	i386-linux-tdep.h \
+	i386-tdep.h \
+	i386bsd-nat.h \
+	i387-tdep.h \
+	ia64-libunwind-tdep.h \
+	ia64-tdep.h \
+	inf-child.h \
+	inf-loop.h \
+	inf-ptrace.h \
+	infcall.h \
+	inferior.h \
+	inflow.h \
+	inline-frame.h \
+	interps.h \
+	jit.h \
+	language.h \
+	linespec.h \
+	linux-fork.h \
+	linux-nat.h \
+	linux-record.h \
+	linux-tdep.h \
+	location.h \
+	m2-lang.h \
+	m32r-tdep.h \
+	m68k-tdep.h \
+	m88k-tdep.h \
+	macroexp.h \
+	macroscope.h \
+	macrotab.h \
+	main.h \
+	mdebugread.h \
+	memattr.h \
+	memory-map.h \
+	memrange.h \
+	mi/mi-cmds.h \
+	mi/mi-common.h \
+	mi/mi-console.h \
+	mi/mi-getopt.h \
+	mi/mi-main.h \
+	mi/mi-out.h \
+	mi/mi-parse.h \
+	microblaze-tdep.h \
+	mips-linux-tdep.h \
+	mips-tdep.h \
+	mipsnbsd-tdep.h \
+	mn10300-tdep.h \
+	moxie-tdep.h \
+	nat/aarch64-linux.h \
+	nat/aarch64-linux-hw-point.h \
+	nat/amd64-linux-siginfo.h\
+	nat/gdb_thread_db.h \
+	nat/linux-btrace.h \
+	nat/linux-namespaces.h \
+	nat/linux-nat.h \
+	nat/linux-osdata.h \
+	nat/linux-personality.h \
+	nat/linux-ptrace.h \
+	nat/linux-waitpid.h \
+	nat/mips-linux-watch.h \
+	nat/ppc-linux.h \
+	nat/x86-cpuid.h \
+	nat/x86-dregs.h \
+	nat/x86-gcc-cpuid.h \
+	nat/x86-linux.h \
+	nat/x86-linux-dregs.h \
+	nbsd-nat.h \
+	nbsd-tdep.h \
+	nds32-tdep.h \
+	nios2-tdep.h \
+	nto-tdep.h \
+	objc-lang.h \
+	objfiles.h \
+	obsd-nat.h \
+	obsd-tdep.h \
+	osabi.h \
+	osdata.h \
+	p-lang.h \
+	parser-defs.h \
+	ppc-linux-tdep.h \
+	ppc-ravenscar-thread.h \
+	ppc-tdep.h \
+	ppc64-tdep.h \
+	ppcfbsd-tdep.h \
+	ppcnbsd-tdep.h \
+	ppcobsd-tdep.h \
+	probe.h \
+	proc-utils.h \
+	procfs.h \
+	progspace.h \
+	prologue-value.h \
+	psympriv.h \
+	psymtab.h \
+	python/py-event.h \
+	python/py-events.h \
+	python/py-stopevent.h \
+	python/python.h \
+	python/python-internal.h \
+	ravenscar-thread.h \
+	record.h \
+	record-full.h \
+	regcache.h \
+	regformats/regdef.h \
+	reggroups.h \
+	regset.h \
+	remote.h \
+	remote-fileio.h \
+	remote-notif.h \
+	rs6000-aix-tdep.h \
+	rs6000-tdep.h \
+	s390-linux-tdep.h \
+	score-tdep.h \
+	sentinel-frame.h \
+	ser-base.h \
+	ser-event.h \
+	ser-tcp.h \
+	ser-unix.h \
+	serial.h \
+	sh-tdep.h \
+	sh64-tdep.h \
+	sim-regno.h \
+	skip.h \
+	sol2-tdep.h \
+	solib.h \
+	solib-aix.h \
+	solib-darwin.h \
+	solib-spu.h \
+	solib-svr4.h \
+	solib-target.h \
+	solist.h \
+	source.h \
+	sparc-nat.h \
+	sparc-ravenscar-thread.h \
+	sparc-tdep.h \
+	sparc64-tdep.h \
+	spu-tdep.h \
+	stabsread.h \
+	stack.h \
+	stap-probe.h \
+	symfile.h \
+	symtab.h \
+	target.h \
+	target-dcache.h \
+	target-descriptions.h \
+	target/resume.h \
+	target/target.h \
+	target/wait.h \
+	target/waitstatus.h \
+	terminal.h \
+	tid-parse.h \
+	top.h \
+	tracefile.h \
+	tracepoint.h \
+	trad-frame.h \
+	tramp-frame.h \
+	tui/tui.h \
+	tui/tui-command.h \
+	tui/tui-data.h \
+	tui/tui-disasm.h \
+	tui/tui-file.h \
+	tui/tui-hooks.h \
+	tui/tui-io.h \
+	tui/tui-layout.h \
+	tui/tui-regs.h \
+	tui/tui-source.h \
+	tui/tui-stack.h \
+	tui/tui-win.h \
+	tui/tui-windata.h \
+	tui/tui-wingeneral.h \
+	tui/tui-winsource.h \
+	typeprint.h \
+	ui-file.h \
+	ui-out.h \
+	user-regs.h \
+	utils.h \
+	valprint.h \
+	value.h \
+	varobj.h \
+	varobj-iter.h \
+	vax-tdep.h \
+	windows-nat.h \
+	windows-tdep.h \
+	x86-linux-nat.h \
+	x86-nat.h \
+	x86bsd-nat.h \
+	xcoffread.h \
+	xml-support.h \
+	xml-syscall.h \
+	xml-tdesc.h \
+	xtensa-tdep.h
 
 # Header files that already have srcdir in them, or which are in objdir.
 
-HFILES_WITH_SRCDIR = ../bfd/bfd.h jit-reader.h
+HFILES_WITH_SRCDIR = \
+	../bfd/bfd.h \
+	jit-reader.h
 
 
 # GDB "info" files, which should be included in their entirety
@@ -1015,80 +1567,208 @@ TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \
 TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR)
 
 COMMON_OBS = $(DEPFILES) $(CONFIG_OBS) $(YYOBJ) \
-	version.o \
-	annotate.o \
+	ada-lang.o \
+	ada-tasks.o \
+	ada-typeprint.o \
+	ada-valprint.o \
+	ada-varobj.o \
 	addrmap.o \
-	auto-load.o auxv.o \
 	agent.o \
+	annotate.o \
+	arch-utils.o \
+	auto-load.o \
+	auxv.o \
+	bcache.o \
 	bfd-target.o \
-	blockframe.o breakpoint.o break-catch-sig.o break-catch-throw.o \
+	block.o \
+	blockframe.o \
+	break-catch-sig.o \
 	break-catch-syscall.o \
-	findvar.o regcache.o cleanups.o \
-	charset.o continuations.o corelow.o disasm.o dummy-frame.o dfp.o \
-	source.o value.o eval.o valops.o valarith.o valprint.o printcmd.o \
-	block.o symtab.o psymtab.o symfile.o symfile-debug.o symmisc.o \
-	linespec.o dictionary.o namespace.o \
-	location.o infcall.o \
-	infcmd.o infrun.o \
-	expprint.o environ.o stack.o tid-parse.o thread.o thread-fsm.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 \
+	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 \
+	dfp.o \
+	dictionary.o \
+	disasm.o \
+	doublest.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 \
-	filesystem.o \
+	f-lang.o \
+	f-typeprint.o \
+	f-valprint.o \
+	fileio.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-dlfcn.o \
+	gdb_obstack.o \
+	gdb_usleep.o \
+	gdb_vecs.o \
+	gdbarch.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 \
-	minidebug.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 \
-	macrotab.o macrocmd.o macroexp.o macroscope.o \
+	maint.o \
+	mdebugread.o \
+	mem-break.o \
+	memattr.o \
+	memory-map.o \
+	memrange.o \
 	mi-common.o \
-	event-loop.o event-top.o inf-loop.o completer.o \
-	gdbarch.o arch-utils.o gdbtypes.o gdb_bfd.o gdb_obstack.o \
-	osabi.o copying.o \
-	memattr.o mem-break.o target.o target-dcache.o parse.o language.o \
-	build-id.o buildsym.o \
-	findcmd.o \
-	std-regs.o \
-	signals-state-save-restore.o \
-	signals.o \
-	exec.o reverse.o \
-	bcache.o objfiles.o observer.o minsyms.o maint.o demangle.o \
-	dbxread.o coffread.o coff-pe-read.o \
-	dwarf2read.o mipsread.o stabsread.o corefile.o \
-	dwarf2expr.o dwarf2loc.o dwarf2-frame.o dwarf2-frame-tailcall.o \
-	ada-lang.o c-lang.o d-lang.o f-lang.o objc-lang.o \
-	ada-tasks.o ada-varobj.o c-varobj.o \
-	ui-out.o cli-out.o \
-	varobj.o vec.o \
-	go-lang.o go-valprint.o go-typeprint.o \
-	m2-lang.o opencl-lang.o p-lang.o p-typeprint.o p-valprint.o \
-	selftest.o sentinel-frame.o \
-	complaints.o typeprint.o \
-	ada-typeprint.o c-typeprint.o f-typeprint.o m2-typeprint.o \
-	ada-valprint.o c-valprint.o cp-valprint.o d-valprint.o f-valprint.o \
-	m2-valprint.o \
-	ser-event.o serial.o mdebugread.o top.o utils.o utils-selftests.o \
-	ui-file.o \
-	user-regs.o \
-	frame.o frame-unwind.o doublest.o \
-	frame-base.o \
-	inline-frame.o \
-	gnu-v2-abi.o gnu-v3-abi.o cp-abi.o cp-support.o \
-	cp-namespace.o d-namespace.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 \
+	progspace.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 \
 	rust-lang.o \
+	selftest.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 \
-	solib.o solib-target.o \
-	prologue-value.o memory-map.o memrange.o \
-	xml-support.o xml-syscall.o xml-utils.o \
-	target-descriptions.o target-memory.o xml-tdesc.o xml-builtin.o \
-	inferior.o osdata.o gdb_usleep.o record.o record-full.o gcore.o \
-	gdb_vecs.o jit.o progspace.o skip.o probe.o \
-	common-utils.o buffer.o ptid.o gdb-dlfcn.o common-agent.o \
-	format.o registry.o btrace.o record-btrace.o waitstatus.o \
-	print-utils.o rsp-low.o errors.o common-debug.o debug.o \
-	common-exceptions.o btrace-common.o fileio.o \
-	common-regcache.o new-op.o \
+	typeprint.o \
+	ui-file.o \
+	ui-out.o \
+	user-regs.o \
+	utils.o \
+	utils-selftests.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 \
 	$(SUBDIR_GCC_COMPILE_OBS)
 
 TSOBS = inflow.o
@@ -1103,15 +1783,28 @@ CLEANDIRS = $(SUBDIRS)
 REQUIRED_SUBDIRS = doc | testsuite | $(GNULIB_BUILDDIR) | data-directory
 
 # For now, shortcut the "configure GDB for fewer languages" stuff.
-YYFILES = c-exp.c \
-	cp-name-parser.c \
-	ada-lex.c \
+YYFILES = \
 	ada-exp.c \
-	d-exp.c f-exp.c go-exp.c m2-exp.c p-exp.c rust-exp.c
-YYOBJ = c-exp.o \
-	cp-name-parser.o \
+	ada-lex.c \
+	c-exp.c \
+	cp-name-parser.c \
+	d-exp.c \
+	f-exp.c \
+	go-exp.c \
+	m2-exp.c \
+	p-exp.c \
+	rust-exp.c
+
+YYOBJ = \
 	ada-exp.o \
-	d-exp.o f-exp.o go-exp.o m2-exp.o p-exp.o rust-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
 
 # Things which need to be built when making a distribution.
 
@@ -1119,8 +1812,15 @@ DISTSTUFF = $(YYFILES)
 
 
 # All generated files which can be included by another file.
-generated_files = config.h observer.h observer.inc ada-lex.c jit-reader.h \
-	$(GNULIB_H) $(NAT_GENERATED_FILES) gcore
+generated_files = \
+	ada-lex.c \
+	config.h \
+	gcore \
+	jit-reader.h \
+	observer.h \
+	observer.inc \
+	$(GNULIB_H) \
+	$(NAT_GENERATED_FILES)
 
 %.o: %.c
 	$(COMPILE) $<
@@ -1655,114 +2355,211 @@ force_update:
 MAKEOVERRIDES=
 
 ALLDEPFILES = \
-	aarch64-tdep.c aarch64-linux-tdep.c aarch64-newlib-tdep.c \
 	aarch64-linux-nat.c \
+	aarch64-linux-tdep.c \
+	aarch64-newlib-tdep.c \
+	aarch64-tdep.c \
 	aix-thread.c \
-	alphabsd-nat.c alpha-linux-nat.c \
-	alpha-tdep.c alpha-mdebug-tdep.c \
+	alpha-linux-nat.c \
 	alpha-linux-tdep.c \
-	alphabsd-tdep.c alphafbsd-tdep.c alphanbsd-tdep.c alphaobsd-tdep.c \
-	arc-tdep.c \
-	amd64-nat.c amd64-tdep.c \
-	amd64bsd-nat.c amd64fbsd-nat.c amd64fbsd-tdep.c \
-	amd64nbsd-nat.c amd64nbsd-tdep.c \
-	amd64obsd-nat.c amd64obsd-tdep.c \
+	alpha-mdebug-tdep.c \
+	alpha-tdep.c \
+	alphabsd-nat.c \
+	alphabsd-tdep.c \
+	alphafbsd-tdep.c \
+	alphanbsd-tdep.c \
+	alphaobsd-tdep.c \
 	amd64-darwin-tdep.c \
 	amd64-dicos-tdep.c \
-	amd64-linux-nat.c amd64-linux-tdep.c \
+	amd64-linux-nat.c \
+	amd64-linux-tdep.c \
+	amd64-nat.c \
 	amd64-sol2-tdep.c \
-	arm.c arm-get-next-pcs.c \
-	arm-linux.c arm-linux-nat.c arm-linux-tdep.c \
-	arm-symbian-tdep.c arm-tdep.c \
-	armnbsd-nat.c armbsd-tdep.c armnbsd-tdep.c armobsd-tdep.c \
+	amd64-tdep.c \
+	amd64bsd-nat.c \
+	amd64fbsd-nat.c \
+	amd64fbsd-tdep.c \
+	amd64nbsd-nat.c \
+	amd64nbsd-tdep.c \
+	amd64obsd-nat.c \
+	amd64obsd-tdep.c \
+	arc-tdep.c \
+	arm.c \
+	arm-get-next-pcs.c \
+	arm-linux.c \
+	arm-linux-nat.c \
+	arm-linux-tdep.c \
+	arm-symbian-tdep.c \
+	arm-tdep.c \
+	armbsd-tdep.c \
+	armnbsd-nat.c \
+	armnbsd-tdep.c \
+	armobsd-tdep.c \
 	avr-tdep.c \
-	bfin-linux-tdep.c bfin-tdep.c \
-	bsd-uthread.c bsd-kvm.c \
+	bfin-linux-tdep.c \
+	bfin-tdep.c \
+	bsd-kvm.c \
+	bsd-uthread.c \
+	common/mingw-strerror.c \
+	common/posix-strerror.c \
 	core-regset.c \
-	dcache.c dicos-tdep.c darwin-nat.c \
+	darwin-nat.c \
+	dcache.c \
+	dcache.c \
+	dicos-tdep.c \
 	exec.c \
 	fbsd-nat.c \
 	fbsd-tdep.c \
 	fork-child.c \
 	ft32-tdep.c \
 	glibc-tdep.c \
-	go32-nat.c h8300-tdep.c \
+	go32-nat.c \
+	h8300-tdep.c \
+	hppa-linux-nat.c \
+	hppa-linux-tdep.c \
 	hppa-tdep.c \
-	hppa-linux-tdep.c hppa-linux-nat.c \
 	hppabsd-tdep.c \
-	hppanbsd-nat.c hppanbsd-tdep.c \
-	hppaobsd-nat.c hppaobsd-tdep.c \
-	i386-tdep.c i386-linux-nat.c \
-	i386v4-nat.c i386-cygwin-tdep.c \
-	i386bsd-nat.c i386bsd-tdep.c i386fbsd-nat.c i386fbsd-tdep.c \
-	i386nbsd-nat.c i386nbsd-tdep.c i386obsd-nat.c i386obsd-tdep.c \
-	i387-tdep.c \
-	i386-darwin-tdep.c i386-darwin-nat.c \
+	hppanbsd-nat.c \
+	hppanbsd-tdep.c \
+	hppaobsd-nat.c \
+	hppaobsd-tdep.c \
+	i386-cygwin-tdep.c \
+	i386-darwin-nat.c \
+	i386-darwin-tdep.c \
 	i386-dicos-tdep.c \
-	i386-linux-tdep.c x86-nat.c \
-	i386-sol2-nat.c i386-sol2-tdep.c \
-	i386gnu-nat.c i386gnu-tdep.c \
-	ia64-linux-nat.c ia64-linux-tdep.c ia64-tdep.c ia64-vms-tdep.c \
-	inf-ptrace.c \
+	i386-linux-nat.c \
+	i386-linux-tdep.c \
+	i386-sol2-nat.c \
+	i386-sol2-tdep.c \
+	i386-tdep.c \
+	i386bsd-nat.c \
+	i386bsd-tdep.c \
+	i386fbsd-nat.c \
+	i386fbsd-tdep.c \
+	i386gnu-nat.c \
+	i386gnu-tdep.c \
+	i386nbsd-nat.c \
+	i386nbsd-tdep.c \
+	i386obsd-nat.c \
+	i386obsd-tdep.c \
+	i386v4-nat.c \
+	i387-tdep.c \
 	ia64-libunwind-tdep.c \
+	ia64-linux-nat.c \
+	ia64-linux-tdep.c \
+	ia64-tdep.c \
+	ia64-vms-tdep.c \
+	inf-ptrace.c \
 	linux-fork.c \
-	linux-tdep.c \
 	linux-record.c \
+	linux-tdep.c \
 	lm32-tdep.c \
-	m68hc11-tdep.c \
+	m32r-linux-nat.c \
+	m32r-linux-tdep.c \
 	m32r-tdep.c \
-	m32r-linux-nat.c m32r-linux-tdep.c \
+	m68hc11-tdep.c \
 	m68k-tdep.c \
-	m68kbsd-nat.c m68kbsd-tdep.c \
-	m68klinux-nat.c m68klinux-tdep.c \
-	m88k-tdep.c m88kbsd-nat.c \
-	microblaze-tdep.c microblaze-linux-tdep.c \
-	mingw-hdep.c common/mingw-strerror.c \
-	mips-linux-nat.c mips-linux-tdep.c \
+	m68kbsd-nat.c \
+	m68kbsd-tdep.c \
+	m68klinux-nat.c \
+	m68klinux-tdep.c \
+	m88k-tdep.c \
+	m88kbsd-nat.c \
+	microblaze-linux-tdep.c \
+	microblaze-tdep.c \
+	mingw-hdep.c \
+	mips-linux-nat.c \
+	mips-linux-tdep.c \
 	mips-sde-tdep.c \
 	mips-tdep.c \
-	mipsnbsd-nat.c mipsnbsd-tdep.c \
-	mips64obsd-nat.c mips64obsd-tdep.c \
+	mips64obsd-nat.c \
+	mips64obsd-tdep.c \
+	mipsnbsd-nat.c \
+	mipsnbsd-tdep.c \
 	msp430-tdep.c \
+	nbsd-nat.c \
+	nbsd-tdep.c \
 	nds32-tdep.c \
-	nios2-tdep.c nios2-linux-tdep.c \
-	nbsd-nat.c nbsd-tdep.c obsd-nat.c obsd-tdep.c \
-	posix-hdep.c common/posix-strerror.c \
-	ppc-sysv-tdep.c ppc-linux-nat.c ppc-linux-tdep.c ppc64-tdep.c \
-	ppcfbsd-nat.c ppcfbsd-tdep.c \
-	ppcnbsd-nat.c ppcnbsd-tdep.c \
-	ppcobsd-nat.c ppcobsd-tdep.c \
+	nios2-linux-tdep.c \
+	nios2-tdep.c \
+	obsd-nat.c \
+	obsd-tdep.c \
+	posix-hdep.c \
+	ppc-linux-nat.c \
+	ppc-linux-tdep.c \
+	ppc-ravenscar-thread.c \
+	ppc-sysv-tdep.c \
+	ppc64-tdep.c \
+	ppcfbsd-nat.c \
+	ppcfbsd-tdep.c \
+	ppcnbsd-nat.c \
+	ppcnbsd-tdep.c \
+	ppcobsd-nat.c \
+	ppcobsd-tdep.c \
 	procfs.c \
 	ravenscar-thread.c \
 	remote-sim.c \
-	dcache.c \
 	rl78-tdep.c \
-	rs6000-nat.c rs6000-tdep.c solib-aix.c ppc-ravenscar-thread.c \
 	rs6000-lynx178-tdep.c \
+	rs6000-nat.c \
+	rs6000-tdep.c \
 	rx-tdep.c \
-	s390-linux-tdep.c s390-linux-nat.c \
+	s390-linux-nat.c \
+	s390-linux-tdep.c \
 	score-tdep.c \
-	ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \
-	sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \
+	ser-go32.c \
+	ser-mingw.c \
+	ser-pipe.c \
+	ser-tcp.c \
+	sh-tdep.c \
+	sh64-tdep.c \
+	shnbsd-nat.c \
+	shnbsd-tdep.c \
 	sol2-tdep.c \
+	solib-aix.c \
+	solib-spu.c \
 	solib-svr4.c \
-	sparc-linux-nat.c sparc-linux-tdep.c \
-	sparc-sol2-nat.c sparc-sol2-tdep.c sparc64-sol2-tdep.c \
-	sparc-nat.c sparc-tdep.c sparc64-linux-nat.c sparc64-linux-tdep.c \
-	sparc64-nat.c sparc64-tdep.c sparc64fbsd-nat.c sparc64fbsd-tdep.c \
-	sparc64nbsd-nat.c sparc64nbsd-tdep.c \
-	sparc64obsd-nat.c sparc64obsd-tdep.c \
-	sparcnbsd-nat.c sparcnbsd-tdep.c sparcobsd-tdep.c \
+	sparc-linux-nat.c \
+	sparc-linux-tdep.c \
+	sparc-nat.c \
 	sparc-ravenscar-thread.c \
-	spu-linux-nat.c spu-tdep.c spu-multiarch.c solib-spu.c \
-	tilegx-linux-nat.c tilegx-tdep.c tilegx-linux-tdep.c \
+	sparc-sol2-nat.c \
+	sparc-sol2-tdep.c \
+	sparc-tdep.c \
+	sparc64-linux-nat.c \
+	sparc64-linux-tdep.c \
+	sparc64-nat.c \
+	sparc64-sol2-tdep.c \
+	sparc64-tdep.c \
+	sparc64fbsd-nat.c \
+	sparc64fbsd-tdep.c \
+	sparc64nbsd-nat.c \
+	sparc64nbsd-tdep.c \
+	sparc64obsd-nat.c \
+	sparc64obsd-tdep.c \
+	sparcnbsd-nat.c \
+	sparcnbsd-tdep.c \
+	sparcobsd-tdep.c \
+	spu-linux-nat.c \
+	spu-multiarch.c \
+	spu-tdep.c \
+	tilegx-linux-nat.c \
+	tilegx-linux-tdep.c \
+	tilegx-tdep.c \
 	v850-tdep.c \
-	vax-tdep.c vaxbsd-nat.c vaxnbsd-tdep.c \
-	windows-nat.c windows-tdep.c \
+	vax-tdep.c \
+	vaxbsd-nat.c \
+	vaxnbsd-tdep.c \
+	windows-nat.c \
+	windows-tdep.c \
+	x86-nat.c \
 	xcoffread.c \
 	xstormy16-tdep.c \
-	xtensa-tdep.c xtensa-config.c \
-	xtensa-linux-tdep.c xtensa-linux-nat.c xtensa-xtregs.c
+	xtensa-config.c \
+	xtensa-linux-nat.c \
+	xtensa-linux-tdep.c \
+	xtensa-tdep.c \
+	xtensa-xtregs.c
 
 # Some files need explicit build rules (due to -Werror problems) or due
 # to sub-directory fun 'n' games.
-- 
2.10.0

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-13  3:46 [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
                   ` (2 preceding siblings ...)
  2016-11-13  3:46 ` [PATCH 2/4] Makefile: Replace explicit subdir " Simon Marchi
@ 2016-11-13  3:56 ` Simon Marchi
  2016-11-13  8:49 ` Andreas Schwab
  2016-11-17 18:54 ` John Baldwin
  5 siblings, 0 replies; 22+ messages in thread
From: Simon Marchi @ 2016-11-13  3:56 UTC (permalink / raw)
  To: gdb-patches

On 2016-11-12 22:46, Simon Marchi wrote:
> The following patches contain a few improvements and cleanups to the 
> gdb
> Makefile.  The starting point is when I wondered why we had to write 
> individual
> rules for each source file that is located in a subdirectory.  I think 
> it's
> unnecessary verbose, and those rules could be replaced with pattern 
> rules.
> That's patch 2.  Patch 1 is just a small change to use pattern rules 
> instead
> of suffix rules.
> 
> Patches 3 and 4 are cleanups of things that have slightly annoyed me 
> for some
> time, and I thought now would be a good time to make those changes.

Hmm, all the patches went through quickly except #4, and I didn't get 
any bounce message.  Until the mystery is resolved, here is the 
corresponding commit:

https://github.com/simark/binutils-gdb/commit/ebd35f56164f43d308f21590b87b0db4d90cfbfd

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-13  3:46 [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
                   ` (3 preceding siblings ...)
  2016-11-13  3:56 ` [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
@ 2016-11-13  8:49 ` Andreas Schwab
  2016-11-13 15:26   ` Simon Marchi
  2016-11-17 18:54 ` John Baldwin
  5 siblings, 1 reply; 22+ messages in thread
From: Andreas Schwab @ 2016-11-13  8:49 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On Nov 12 2016, Simon Marchi <simon.marchi@polymtl.ca> wrote:

> The following patches contain a few improvements and cleanups to the gdb
> Makefile.  The starting point is when I wondered why we had to write individual
> rules for each source file that is located in a subdirectory.

That's because the makefile was written to work non-GNU and/or non-POSIX
makes.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-13  8:49 ` Andreas Schwab
@ 2016-11-13 15:26   ` Simon Marchi
  2016-11-13 16:25     ` Eli Zaretskii
  2016-11-15 16:57     ` Pedro Alves
  0 siblings, 2 replies; 22+ messages in thread
From: Simon Marchi @ 2016-11-13 15:26 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: gdb-patches

On 2016-11-13 03:49, Andreas Schwab wrote:
> On Nov 12 2016, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> 
>> The following patches contain a few improvements and cleanups to the 
>> gdb
>> Makefile.  The starting point is when I wondered why we had to write 
>> individual
>> rules for each source file that is located in a subdirectory.
> 
> That's because the makefile was written to work non-GNU and/or 
> non-POSIX
> makes.

Ok I see, I didn't know that pattern rules were GNU-specific.

As an honest follow-up question: do we need to stay compatible with 
other makes than GNU make?  From what I can see, Open/Net/FreeBSD all 
use gmake to build their port of GDB already.  I don't know about other 
OSes on which people build GDB on (Windows, OS X, Solaris?).  If GNU 
make is readily available on these, perhaps we can consider making it a 
requirement?

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-13 15:26   ` Simon Marchi
@ 2016-11-13 16:25     ` Eli Zaretskii
  2016-11-15 16:57     ` Pedro Alves
  1 sibling, 0 replies; 22+ messages in thread
From: Eli Zaretskii @ 2016-11-13 16:25 UTC (permalink / raw)
  To: Simon Marchi; +Cc: schwab, gdb-patches

> Date: Sun, 13 Nov 2016 10:26:16 -0500
> From: Simon Marchi <simon.marchi@polymtl.ca>
> Cc: gdb-patches@sourceware.org
> 
> As an honest follow-up question: do we need to stay compatible with 
> other makes than GNU make?  From what I can see, Open/Net/FreeBSD all 
> use gmake to build their port of GDB already.  I don't know about other 
> OSes on which people build GDB on (Windows, OS X, Solaris?).  If GNU 
> make is readily available on these, perhaps we can consider making it a 
> requirement?

The MS-Windows builds of GDB use GNU Make.

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

* Re: [PATCH 3/4] Makefile: Flatten and sort file lists
  2016-11-13  3:46 ` [PATCH 3/4] Makefile: Flatten and sort file lists Simon Marchi
@ 2016-11-15 16:46   ` Pedro Alves
  0 siblings, 0 replies; 22+ messages in thread
From: Pedro Alves @ 2016-11-15 16:46 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 11/13/2016 03:46 AM, Simon Marchi wrote:
> I find the big file lists in the Makefile a bit ugly and not very
> practical.  Since there are multiple filenames on each line (as much as
> fits in 80 columns), it's not easy to add, remove or change a name in
> the middle.  As a result, we have a mix of long and short lines in no
> particular order (ALL_TARGET_OBS is a good example).
> 
> I therefore suggest flattening the list (one name per line) and keeping
> it in alphabetical order.  The diffs will be much clearer and merge
> conflicts will be easier to resolve.

I agree.  I've asked for similar things in other cases for the same
reason.

> 
> For the ordering, I aimed at respecting this order:
> 
>  * foo.c
>  * foo-bar.c
>  * foobar.c
> 
> Which, in non-formal words, could be expressed like so:
> 
>  * The extension is not taken into account when comparing two filenames
>    (except if the filenames are otherwise equal).
>  * A filename that is a prefix of another one comes before this other
>    one.
>  * Underscores and dashes are treated equally (I think we use them both
>    for the same purpose).
>  * Underscores and dashes come before alphanumeric characters.
> 
> Short of any other rule, this could be used as a guideline to determine
> where to add a new filename in the list.

Could/should this be converted into a comment?  At least a "keep these
lists sorted" comment, I think.  That'll be easier to find than this email
or commit log.

Wouldn't it make sense to sort by files and dirs separately?  I.e.,
files first, then dirs, e.g.?  You have this, for example:

> +	mdebugread.h \
> +	memattr.h \
> +	memory-map.h \
> +	memrange.h \
> +	mi/mi-cmds.h \
> +	mi/mi-common.h \
> +	mi/mi-console.h \
> +	mi/mi-getopt.h \
> +	mi/mi-main.h \
> +	mi/mi-out.h \
> +	mi/mi-parse.h \
> +	microblaze-tdep.h \
> +	mips-linux-tdep.h \
> +	mips-tdep.h \
> +	mipsnbsd-tdep.h \

I.e., MI files mixed with the other files.  I'd expected:

> +	mdebugread.h \
> +	memattr.h \
> +	memory-map.h \
> +	memrange.h \
> +	microblaze-tdep.h \
> +	mips-linux-tdep.h \
> +	mips-tdep.h \
> +	mipsnbsd-tdep.h \
...
> +	mi/mi-cmds.h \
> +	mi/mi-common.h \
> +	mi/mi-console.h \
> +	mi/mi-getopt.h \
> +	mi/mi-main.h \
> +	mi/mi-out.h \
> +	mi/mi-parse.h \


Maybe it's be clearer to move subdir headers to
variables, like we have SUBDIR_PYTHON_SRCS/SUBDIR_PYTHON_OBS,
etc. for sources.  But still, for the cases where we don't have
variables.


>  SUBDIR_TUI_OBS = \
> +	tui.o \
>  	tui-command.o \
>  	tui-data.o \
>  	tui-disasm.o \
> @@ -269,9 +304,9 @@ SUBDIR_TUI_OBS = \
>  	tui-windata.o \
>  	tui-wingeneral.o \
>  	tui-winsource.o \
> -	tui.o

Mind the trailing \ left in the last element.  Here
and other places.

Thanks,
Pedro Alves

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-13 15:26   ` Simon Marchi
  2016-11-13 16:25     ` Eli Zaretskii
@ 2016-11-15 16:57     ` Pedro Alves
  2016-11-15 17:15       ` Simon Marchi
  2016-11-15 21:46       ` John Baldwin
  1 sibling, 2 replies; 22+ messages in thread
From: Pedro Alves @ 2016-11-15 16:57 UTC (permalink / raw)
  To: Simon Marchi, Andreas Schwab; +Cc: gdb-patches, John Baldwin

On 11/13/2016 03:26 PM, Simon Marchi wrote:
> On 2016-11-13 03:49, Andreas Schwab wrote:
>> On Nov 12 2016, Simon Marchi <simon.marchi@polymtl.ca> wrote:
>>
>>> The following patches contain a few improvements and cleanups to the gdb
>>> Makefile.  The starting point is when I wondered why we had to write
>>> individual
>>> rules for each source file that is located in a subdirectory.
>>
>> That's because the makefile was written to work non-GNU and/or non-POSIX
>> makes.
> 
> Ok I see, I didn't know that pattern rules were GNU-specific.
> 
> As an honest follow-up question: do we need to stay compatible with
> other makes than GNU make?  From what I can see, Open/Net/FreeBSD all
> use gmake to build their port of GDB already. 

You mean their ports scripts?  Can you provide some url for reference?

John, could you comment from the FreeBSD side?

> I don't know about other
> OSes on which people build GDB on (Windows, OS X, Solaris?).  If GNU
> make is readily available on these, perhaps we can consider making it a
> requirement?

I (and others) have argued before about requiring GNU Make.  I think
last was here:

  https://sourceware.org/ml/binutils/2014-05/msg00263.html

I think it makes a lot of sense.  FWIW, whenever I build GDB on the compile
farm on some non-GNU machine, like FreeBSD, AIX, NetBSD, etc., I've always
used the preinstalled GNU make.

Time to just do it?  We'd need a NEWS entry, I suppose.

Thanks,
Pedro Alves

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-15 16:57     ` Pedro Alves
@ 2016-11-15 17:15       ` Simon Marchi
  2016-11-15 17:51         ` Pedro Alves
  2016-11-15 21:58         ` Pedro Alves
  2016-11-15 21:46       ` John Baldwin
  1 sibling, 2 replies; 22+ messages in thread
From: Simon Marchi @ 2016-11-15 17:15 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Andreas Schwab, gdb-patches, John Baldwin

On 2016-11-15 11:56, Pedro Alves wrote:
> On 11/13/2016 03:26 PM, Simon Marchi wrote:
>> As an honest follow-up question: do we need to stay compatible with
>> other makes than GNU make?  From what I can see, Open/Net/FreeBSD all
>> use gmake to build their port of GDB already.
> 
> You mean their ports scripts?  Can you provide some url for reference?

Sure:

FreeBSD has "USES = gmake"
   https://svnweb.freebsd.org/ports/head/devel/gdb/Makefile?view=co

OpenBSD has "USE_GMAKE = Yes"
   
http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/devel/gdb/Makefile?rev=1.45&content-type=text/plain

NetBSD has "USE_TOOLS += gmake"
   http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/gdb/Makefile

> John, could you comment from the FreeBSD side?
> 
>> I don't know about other
>> OSes on which people build GDB on (Windows, OS X, Solaris?).  If GNU
>> make is readily available on these, perhaps we can consider making it 
>> a
>> requirement?
> 
> I (and others) have argued before about requiring GNU Make.  I think
> last was here:
> 
>   https://sourceware.org/ml/binutils/2014-05/msg00263.html
> 
> I think it makes a lot of sense.  FWIW, whenever I build GDB on the 
> compile
> farm on some non-GNU machine, like FreeBSD, AIX, NetBSD, etc., I've 
> always
> used the preinstalled GNU make.
> 
> Time to just do it?  We'd need a NEWS entry, I suppose.

I'll wait a bit to collect some more feedback, and if the idea seems 
accepted I'll do another series for:

- Documenting the GNU make requirement
- Using pattern rules (patches 1 and 2 of this series)

In the mean time I'll prepare a v2 for patches 3 and 4, which don't 
depend on GNU make.

Thanks,

Simon

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-15 17:15       ` Simon Marchi
@ 2016-11-15 17:51         ` Pedro Alves
  2016-11-15 21:58         ` Pedro Alves
  1 sibling, 0 replies; 22+ messages in thread
From: Pedro Alves @ 2016-11-15 17:51 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Andreas Schwab, gdb-patches, John Baldwin

On 11/15/2016 05:14 PM, Simon Marchi wrote:
> On 2016-11-15 11:56, Pedro Alves wrote:
>> On 11/13/2016 03:26 PM, Simon Marchi wrote:
>>> As an honest follow-up question: do we need to stay compatible with
>>> other makes than GNU make?  From what I can see, Open/Net/FreeBSD all
>>> use gmake to build their port of GDB already.
>>
>> You mean their ports scripts?  Can you provide some url for reference?
> 
> Sure:
> 
> FreeBSD has "USES = gmake"
>   https://svnweb.freebsd.org/ports/head/devel/gdb/Makefile?view=co
> 
> OpenBSD has "USE_GMAKE = Yes"
>  
> http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/ports/devel/gdb/Makefile?rev=1.45&content-type=text/plain
> 
> 
> NetBSD has "USE_TOOLS += gmake"
>   http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/gdb/Makefile

Great, many thanks.  That really makes it a non-issue to
require GNU make then, IMO.

Thanks,
Pedro Alves

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

* Re: [PATCH 2/4] Makefile: Replace explicit subdir rules with pattern rules
  2016-11-13  3:46 ` [PATCH 2/4] Makefile: Replace explicit subdir " Simon Marchi
@ 2016-11-15 17:54   ` Pedro Alves
  2016-11-15 18:00     ` Simon Marchi
  0 siblings, 1 reply; 22+ messages in thread
From: Pedro Alves @ 2016-11-15 17:54 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 11/13/2016 03:46 AM, Simon Marchi wrote:
>  # Need to explicitly specify the compile rule as make will do nothing
>  # or try to compile the object file into the sub-directory.

Do these comments need adjustment?

Thanks,
Pedro Alves

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

* Re: [PATCH 2/4] Makefile: Replace explicit subdir rules with pattern  rules
  2016-11-15 17:54   ` Pedro Alves
@ 2016-11-15 18:00     ` Simon Marchi
  2016-11-15 18:36       ` Pedro Alves
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Marchi @ 2016-11-15 18:00 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On 2016-11-15 12:54, Pedro Alves wrote:
> On 11/13/2016 03:46 AM, Simon Marchi wrote:
>>  # Need to explicitly specify the compile rule as make will do nothing
>>  # or try to compile the object file into the sub-directory.
> 
> Do these comments need adjustment?

I thought they were still true and relevant after the change.  What do 
you think?

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

* Re: [PATCH 2/4] Makefile: Replace explicit subdir rules with pattern rules
  2016-11-15 18:00     ` Simon Marchi
@ 2016-11-15 18:36       ` Pedro Alves
  2016-11-15 18:41         ` Simon Marchi
  0 siblings, 1 reply; 22+ messages in thread
From: Pedro Alves @ 2016-11-15 18:36 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On 11/15/2016 06:00 PM, Simon Marchi wrote:
> On 2016-11-15 12:54, Pedro Alves wrote:
>> On 11/13/2016 03:46 AM, Simon Marchi wrote:
>>>  # Need to explicitly specify the compile rule as make will do nothing
>>>  # or try to compile the object file into the sub-directory.
>>
>> Do these comments need adjustment?
> 
> I thought they were still true and relevant after the change.  What do
> you think?

But should we at least merge them?  Looking at your branch on github,
we end up with:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#
# gdb/cli/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: $(srcdir)/cli/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

# GCC Compile support dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: $(srcdir)/compile/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

#
# GDBTK sub-directory
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the mi directory.

all-gdbtk: insight$(EXEEXT)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The last one is strange, for talking about MI.


And then a bit further below, we have the same comment several
times again:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#
# gdb/mi/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: $(srcdir)/mi/%.c
	$(COMPILE) $<

# gdb/common/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: ${srcdir}/common/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

common-agent.o: $(srcdir)/common/agent.c
	$(COMPILE) $(srcdir)/common/agent.c
	$(POSTCOMPILE)

#
# gdb/target/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: ${srcdir}/target/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

#
# gdb/arch/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: ${srcdir}/arch/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

# gdb/nat/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: ${srcdir}/nat/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

#
# gdb/tui/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: $(srcdir)/tui/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

# gdb/guile dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

%.o: $(srcdir)/guile/%.c
	$(COMPILE) $<
	$(POSTCOMPILE)

# gdb/python/ dependencies
#
# Need to explicitly specify the compile rule as make will do nothing
# or try to compile the object file into the sub-directory.

# Flags needed to compile Python code
PYTHON_CFLAGS=@PYTHON_CFLAGS@

%.o: $(srcdir)/python/%.c
	$(COMPILE) $(PYTHON_CFLAGS) $<
	$(POSTCOMPILE)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


I think a single comment talking about needing a compile rule for
each subdir, might be clearer/simpler.

Also, the cases that are exceptions I think would benefit
from a comment, like e.g., the common-agent.o rule.

Thanks,
Pedro Alves

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

* Re: [PATCH 2/4] Makefile: Replace explicit subdir rules with pattern  rules
  2016-11-15 18:36       ` Pedro Alves
@ 2016-11-15 18:41         ` Simon Marchi
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Marchi @ 2016-11-15 18:41 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

On 2016-11-15 13:36, Pedro Alves wrote:
> On 11/15/2016 06:00 PM, Simon Marchi wrote:
>> On 2016-11-15 12:54, Pedro Alves wrote:
>>> On 11/13/2016 03:46 AM, Simon Marchi wrote:
>>>>  # Need to explicitly specify the compile rule as make will do 
>>>> nothing
>>>>  # or try to compile the object file into the sub-directory.
>>> 
>>> Do these comments need adjustment?
>> 
>> I thought they were still true and relevant after the change.  What do
>> you think?
> 
> But should we at least merge them?  Looking at your branch on github,
> we end up with:
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> #
> # gdb/cli/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: $(srcdir)/cli/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> # GCC Compile support dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: $(srcdir)/compile/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> #
> # GDBTK sub-directory
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the mi directory.
> 
> all-gdbtk: insight$(EXEEXT)
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> The last one is strange, for talking about MI.
> 
> 
> And then a bit further below, we have the same comment several
> times again:
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> #
> # gdb/mi/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: $(srcdir)/mi/%.c
> 	$(COMPILE) $<
> 
> # gdb/common/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: ${srcdir}/common/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> common-agent.o: $(srcdir)/common/agent.c
> 	$(COMPILE) $(srcdir)/common/agent.c
> 	$(POSTCOMPILE)
> 
> #
> # gdb/target/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: ${srcdir}/target/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> #
> # gdb/arch/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: ${srcdir}/arch/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> # gdb/nat/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: ${srcdir}/nat/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> #
> # gdb/tui/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: $(srcdir)/tui/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> # gdb/guile dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> %.o: $(srcdir)/guile/%.c
> 	$(COMPILE) $<
> 	$(POSTCOMPILE)
> 
> # gdb/python/ dependencies
> #
> # Need to explicitly specify the compile rule as make will do nothing
> # or try to compile the object file into the sub-directory.
> 
> # Flags needed to compile Python code
> PYTHON_CFLAGS=@PYTHON_CFLAGS@
> 
> %.o: $(srcdir)/python/%.c
> 	$(COMPILE) $(PYTHON_CFLAGS) $<
> 	$(POSTCOMPILE)
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> I think a single comment talking about needing a compile rule for
> each subdir, might be clearer/simpler.
> 
> Also, the cases that are exceptions I think would benefit
> from a comment, like e.g., the common-agent.o rule.
> 
> Thanks,
> Pedro Alves

Agreed, I'll do the change in v2.

Thanks,

Simon

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-15 16:57     ` Pedro Alves
  2016-11-15 17:15       ` Simon Marchi
@ 2016-11-15 21:46       ` John Baldwin
  1 sibling, 0 replies; 22+ messages in thread
From: John Baldwin @ 2016-11-15 21:46 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Simon Marchi, Andreas Schwab, gdb-patches

On Tuesday, November 15, 2016 04:56:55 PM Pedro Alves wrote:
> On 11/13/2016 03:26 PM, Simon Marchi wrote:
> > On 2016-11-13 03:49, Andreas Schwab wrote:
> >> On Nov 12 2016, Simon Marchi <simon.marchi@polymtl.ca> wrote:
> >>
> >>> The following patches contain a few improvements and cleanups to the gdb
> >>> Makefile.  The starting point is when I wondered why we had to write
> >>> individual
> >>> rules for each source file that is located in a subdirectory.
> >>
> >> That's because the makefile was written to work non-GNU and/or non-POSIX
> >> makes.
> > 
> > Ok I see, I didn't know that pattern rules were GNU-specific.
> > 
> > As an honest follow-up question: do we need to stay compatible with
> > other makes than GNU make?  From what I can see, Open/Net/FreeBSD all
> > use gmake to build their port of GDB already. 
> 
> You mean their ports scripts?  Can you provide some url for reference?
> 
> John, could you comment from the FreeBSD side?

Yes.  The gdb port for FreeBSD has 'USES= gmake' in its Makefile (and has
for a long time).  I use gmake for all of my development builds out of git as
well.

https://svnweb.freebsd.org/ports/head/devel/gdb/Makefile?revision=418964&view=markup#l18

I checked NetBSD (pkgsrc) and OpenBSD (ports) and they both build with gmake
as well.  I had already assumed gmake was required FWIW.

-- 
John Baldwin

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-15 17:15       ` Simon Marchi
  2016-11-15 17:51         ` Pedro Alves
@ 2016-11-15 21:58         ` Pedro Alves
  2016-11-15 22:10           ` Simon Marchi
  1 sibling, 1 reply; 22+ messages in thread
From: Pedro Alves @ 2016-11-15 21:58 UTC (permalink / raw)
  To: Simon Marchi; +Cc: Andreas Schwab, gdb-patches, John Baldwin

On 11/15/2016 05:14 PM, Simon Marchi wrote:

> I'll wait a bit to collect some more feedback, and if the idea seems
> accepted I'll do another series for:
> 
> - Documenting the GNU make requirement
> - Using pattern rules (patches 1 and 2 of this series)

BTW, if we start requiring GNU make, then all the GMAKE_TRUE bits
in gdb/Makefile.in, gdb/gdbserver/Makefile.in and
gdb/testsuite/Makefile.in can be cleaned up.

Thanks,
Pedro Alves

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-15 21:58         ` Pedro Alves
@ 2016-11-15 22:10           ` Simon Marchi
  0 siblings, 0 replies; 22+ messages in thread
From: Simon Marchi @ 2016-11-15 22:10 UTC (permalink / raw)
  To: Pedro Alves; +Cc: Andreas Schwab, gdb-patches, John Baldwin

On 2016-11-15 16:58, Pedro Alves wrote:
> On 11/15/2016 05:14 PM, Simon Marchi wrote:
> 
>> I'll wait a bit to collect some more feedback, and if the idea seems
>> accepted I'll do another series for:
>> 
>> - Documenting the GNU make requirement
>> - Using pattern rules (patches 1 and 2 of this series)
> 
> BTW, if we start requiring GNU make, then all the GMAKE_TRUE bits
> in gdb/Makefile.in, gdb/gdbserver/Makefile.in and
> gdb/testsuite/Makefile.in can be cleaned up.

Nice, I love deleting code!

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-13  3:46 [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
                   ` (4 preceding siblings ...)
  2016-11-13  8:49 ` Andreas Schwab
@ 2016-11-17 18:54 ` John Baldwin
  2016-11-17 19:20   ` Simon Marchi
  5 siblings, 1 reply; 22+ messages in thread
From: John Baldwin @ 2016-11-17 18:54 UTC (permalink / raw)
  To: gdb-patches; +Cc: Simon Marchi

On Saturday, November 12, 2016 10:46:21 PM Simon Marchi wrote:
> The following patches contain a few improvements and cleanups to the gdb
> Makefile.  The starting point is when I wondered why we had to write individual
> rules for each source file that is located in a subdirectory.  I think it's
> unnecessary verbose, and those rules could be replaced with pattern rules.
> That's patch 2.  Patch 1 is just a small change to use pattern rules instead
> of suffix rules.
> 
> Patches 3 and 4 are cleanups of things that have slightly annoyed me for some
> time, and I thought now would be a good time to make those changes.
> 
> Simon Marchi (4):
>   Makefile: Replace old suffix rules with pattern rules
>   Makefile: Replace explicit subdir rules with pattern rules
>   Makefile: Flatten and sort file lists
>   Normalize names of some source files

Are you still planning to push patch 4?  I don't currently have any pending
patches to the files you have renamed though I do have pending MIPS patches
for FreeBSD which are new files (and if you are going to move forward with
this I might as well rename them to use the new style of names now).

-- 
John Baldwin

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-17 18:54 ` John Baldwin
@ 2016-11-17 19:20   ` Simon Marchi
  2016-11-17 22:36     ` John Baldwin
  0 siblings, 1 reply; 22+ messages in thread
From: Simon Marchi @ 2016-11-17 19:20 UTC (permalink / raw)
  To: John Baldwin; +Cc: gdb-patches

On 2016-11-17 13:54, John Baldwin wrote:
> Are you still planning to push patch 4?  I don't currently have any 
> pending
> patches to the files you have renamed though I do have pending MIPS 
> patches
> for FreeBSD which are new files (and if you are going to move forward 
> with
> this I might as well rename them to use the new style of names now).

Hi John,

I am planning to refresh patches 3 and 4 and send a v2 soon.

Just to get an idea, what is your opinion about this change?  Thumbs 
down, sideways or up?  It's a patch that makes things marginally better, 
but that has a big potential of conflicts for those who carry patches 
(i.e. you), so I'd like to know what you think.

Thanks,

Simon

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

* Re: [PATCH 0/4] Makefile improvements and cleanups
  2016-11-17 19:20   ` Simon Marchi
@ 2016-11-17 22:36     ` John Baldwin
  0 siblings, 0 replies; 22+ messages in thread
From: John Baldwin @ 2016-11-17 22:36 UTC (permalink / raw)
  To: Simon Marchi; +Cc: gdb-patches

On Thursday, November 17, 2016 02:20:41 PM Simon Marchi wrote:
> On 2016-11-17 13:54, John Baldwin wrote:
> > Are you still planning to push patch 4?  I don't currently have any 
> > pending
> > patches to the files you have renamed though I do have pending MIPS 
> > patches
> > for FreeBSD which are new files (and if you are going to move forward 
> > with
> > this I might as well rename them to use the new style of names now).
> 
> Hi John,
> 
> I am planning to refresh patches 3 and 4 and send a v2 soon.
> 
> Just to get an idea, what is your opinion about this change?  Thumbs 
> down, sideways or up?  It's a patch that makes things marginally better, 
> but that has a big potential of conflicts for those who carry patches 
> (i.e. you), so I'd like to know what you think.

I think it's fine to make things more uniform.  The only inconvenience
will be that if I fix bugs in existing files the patch I add to the existing
FreeBSD port will have to be against the old file names until the next
release of GDB, but that is a relatively minor one.  I don't currently have
any pending patches to any of the files you are renaming.

-- 
John Baldwin

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

end of thread, other threads:[~2016-11-17 22:36 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-13  3:46 [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
2016-11-13  3:46 ` [PATCH 3/4] Makefile: Flatten and sort file lists Simon Marchi
2016-11-15 16:46   ` Pedro Alves
2016-11-13  3:46 ` [PATCH 1/4] Makefile: Replace old suffix rules with pattern rules Simon Marchi
2016-11-13  3:46 ` [PATCH 2/4] Makefile: Replace explicit subdir " Simon Marchi
2016-11-15 17:54   ` Pedro Alves
2016-11-15 18:00     ` Simon Marchi
2016-11-15 18:36       ` Pedro Alves
2016-11-15 18:41         ` Simon Marchi
2016-11-13  3:56 ` [PATCH 0/4] Makefile improvements and cleanups Simon Marchi
2016-11-13  8:49 ` Andreas Schwab
2016-11-13 15:26   ` Simon Marchi
2016-11-13 16:25     ` Eli Zaretskii
2016-11-15 16:57     ` Pedro Alves
2016-11-15 17:15       ` Simon Marchi
2016-11-15 17:51         ` Pedro Alves
2016-11-15 21:58         ` Pedro Alves
2016-11-15 22:10           ` Simon Marchi
2016-11-15 21:46       ` John Baldwin
2016-11-17 18:54 ` John Baldwin
2016-11-17 19:20   ` Simon Marchi
2016-11-17 22:36     ` John Baldwin

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).