[00/83] sim: merge subdir makefiles into top-level

Message ID 20230103075605.13606-1-vapier@gentoo.org
Headers
Series sim: merge subdir makefiles into top-level |

Message

Mike Frysinger Jan. 3, 2023, 7:54 a.m. UTC
  A series of patches to move all the subdir compilation into the
top-level (other than ppc).  This allows us to leverage Automake
in more places and kill off many of our handwritten makefiles.

The practical result is we get a slightly faster build, and it
makes it a bit easier to share common/ objects between ports,
and maybe one day merge them into a single run program.

Some of these changes have been split up into smaller patches
for the sake of review & bisection.  If a regression is added
somewhere along the line, hopefully it'll be easier to track
down, especially with the patches being reduced to a minimum.

Along those lines, this series should be fully bisectable.

Mike Frysinger (83):
  sim: mips: add multi source to built sources
  sim: modules: trigger generation from top-level
  sim: build: drop support for subdir extra deps
  sim: aarch64: move libsim.a creation to top-level
  sim: arm: move libsim.a creation to top-level
  sim: avr: move libsim.a creation to top-level
  sim: bfin: move libsim.a creation to top-level
  sim: bpf: move libsim.a creation to top-level
  sim: cr16: move libsim.a creation to top-level
  sim: cris: move libsim.a creation to top-level
  sim: d10v: move libsim.a creation to top-level
  sim: erc32: move libsim.a creation to top-level
  sim: example-synacor: move libsim.a creation to top-level
  sim: frv: move libsim.a creation to top-level
  sim: ft32: move libsim.a creation to top-level
  sim: h8300: move libsim.a creation to top-level
  sim: iq2000: move libsim.a creation to top-level
  sim: lm32: move libsim.a creation to top-level
  sim: m32c: move libsim.a creation to top-level
  sim: m32r: move libsim.a creation to top-level
  sim: m68hc11: move libsim.a creation to top-level
  sim: mcore: move libsim.a creation to top-level
  sim: microblaze: move libsim.a creation to top-level
  sim: mips: move libsim.a creation to top-level
  sim: mn10300: move libsim.a creation to top-level
  sim: moxie: move libsim.a creation to top-level
  sim: msp430: move libsim.a creation to top-level
  sim: or1k: move libsim.a creation to top-level
  sim: pru: move libsim.a creation to top-level
  sim: riscv: move libsim.a creation to top-level
  sim: rl78: move libsim.a creation to top-level
  sim: rx: move libsim.a creation to top-level
  sim: sh: move libsim.a creation to top-level
  sim: v850: move libsim.a creation to top-level
  sim: build: drop support for creating libsim.a in subdirs
  sim: build: drop common/nrun.o subdir hack
  sim: modules.c: move generation to top-level
  sim: build: add basic framework for compiling arch objects in
    top-level
  sim: aarch64: move arch-specific file compilation to top-level
  sim: arm: move arch-specific file compilation to top-level
  sim: avr: move arch-specific file compilation to top-level
  sim: bpf: move arch-specific file compilation to top-level
  sim: bfin: move arch-specific file compilation to top-level
  sim: cr16: move arch-specific file compilation to top-level
  sim: cris: move arch-specific file compilation to top-level
  sim: d10v: move arch-specific file compilation to top-level
  sim: erc32: move arch-specific file compilation to top-level
  sim: example-synacor: move arch-specific file compilation to top-level
  sim: frv: move arch-specific file compilation to top-level
  sim: ft32: move arch-specific file compilation to top-level
  sim: h8300: move arch-specific file compilation to top-level
  sim: iq2000: move arch-specific file compilation to top-level
  sim: lm32: move arch-specific file compilation to top-level
  sim: m32c: move arch-specific file compilation to top-level
  sim: m32r: move arch-specific file compilation to top-level
  sim: m68hc11: move arch-specific file compilation to top-level
  sim: mcore: move arch-specific file compilation to top-level
  sim: microblaze: move arch-specific file compilation to top-level
  sim: mips: move arch-specific file compilation to top-level
  sim: mn10300: move arch-specific file compilation to top-level
  sim: moxie: move arch-specific file compilation to top-level
  sim: msp430: move arch-specific file compilation to top-level
  sim: or1k: move arch-specific file compilation to top-level
  sim: pru: move arch-specific file compilation to top-level
  sim: riscv: move arch-specific file compilation to top-level
  sim: rl78: move arch-specific file compilation to top-level
  sim: rx: move arch-specific file compilation to top-level
  sim: sh: move arch-specific file compilation to top-level
  sim: v850: move arch-specific file compilation to top-level
  sim: move arch-specific file compilation of common/ files to top-level
  sim: common: move test-hw-events to top-level build
  sim: disable recursive make in (most) subdirs
  sim: build: drop subdir Makefile.in files
  sim: build: delete Make-common.in logic
  sim: build: drop AM_MAKEFLAGS settings
  sim: common: simplify hw-config.h deps
  sim: igen: simplify build dep
  sim: common: move libcommon.a objects to sources
  sim: build: drop most recursive build deps
  sim: common: move libcommon.a dep to ppc code
  sim: common: move modules.c to source tracking
  sim: common: simplify modules.c deps
  sim: build: drop depdir subdir hack

 sim/Makefile.am                 |   34 +-
 sim/Makefile.in                 | 2450 ++++++++++++++++++++++++++-----
 sim/README-HACKING              |   52 +-
 sim/aarch64/Makefile.in         |   33 -
 sim/aarch64/local.mk            |   19 +
 sim/arch-subdir.mk.in           |    3 -
 sim/arm/Makefile.in             |   29 -
 sim/arm/local.mk                |   21 +
 sim/avr/Makefile.in             |   24 -
 sim/avr/local.mk                |   16 +
 sim/bfin/Makefile.in            |   33 -
 sim/bfin/local.mk               |   24 +-
 sim/bpf/Makefile.in             |   61 -
 sim/bpf/local.mk                |   45 +-
 sim/common/Make-common.in       |  286 ----
 sim/common/defs.h               |    2 +-
 sim/common/hw-events.c          |    2 +
 sim/common/local.mk             |   62 +-
 sim/configure                   |  792 +---------
 sim/configure.ac                |   38 -
 sim/cr16/Makefile.in            |   27 -
 sim/cr16/local.mk               |   22 +-
 sim/cris/Makefile.in            |   36 -
 sim/cris/local.mk               |   40 +-
 sim/d10v/Makefile.in            |   28 -
 sim/d10v/local.mk               |   23 +-
 sim/erc32/Makefile.in           |   32 -
 sim/erc32/local.mk              |   30 +-
 sim/example-synacor/Makefile.in |   26 -
 sim/example-synacor/local.mk    |   17 +
 sim/frv/Makefile.in             |   39 -
 sim/frv/local.mk                |   55 +-
 sim/ft32/Makefile.in            |   26 -
 sim/ft32/local.mk               |   16 +
 sim/h8300/Makefile.in           |   24 -
 sim/h8300/local.mk              |   16 +
 sim/igen/local.mk               |    4 -
 sim/iq2000/Makefile.in          |   31 -
 sim/iq2000/local.mk             |   33 +-
 sim/lm32/Makefile.in            |   17 -
 sim/lm32/local.mk               |   37 +-
 sim/m32c/Makefile.in            |   40 -
 sim/m32c/local.mk               |   33 +-
 sim/m32r/Makefile.in            |   41 -
 sim/m32r/local.mk               |   63 +-
 sim/m68hc11/Makefile.in         |   39 -
 sim/m68hc11/local.mk            |   38 +-
 sim/mcore/Makefile.in           |   25 -
 sim/mcore/local.mk              |   16 +
 sim/microblaze/Makefile.in      |   25 -
 sim/microblaze/local.mk         |   16 +
 sim/mips/Makefile.in            |   58 -
 sim/mips/acinclude.m4           |   20 +-
 sim/mips/local.mk               |   71 +-
 sim/mn10300/Makefile.in         |   35 -
 sim/mn10300/local.mk            |   34 +-
 sim/moxie/Makefile.in           |   27 -
 sim/moxie/local.mk              |   18 +
 sim/msp430/Makefile.in          |   26 -
 sim/msp430/local.mk             |   16 +
 sim/or1k/Makefile.in            |   47 -
 sim/or1k/local.mk               |   38 +-
 sim/ppc/local.mk                |    6 +
 sim/pru/Makefile.in             |   27 -
 sim/pru/local.mk                |   16 +
 sim/riscv/Makefile.in           |   29 -
 sim/riscv/local.mk              |   20 +
 sim/rl78/Makefile.in            |   34 -
 sim/rl78/local.mk               |   22 +-
 sim/rx/Makefile.in              |   39 -
 sim/rx/local.mk                 |   28 +-
 sim/sh/Makefile.in              |   25 -
 sim/sh/local.mk                 |   20 +-
 sim/v850/Makefile.in            |   28 -
 sim/v850/local.mk               |   30 +-
 75 files changed, 3001 insertions(+), 2654 deletions(-)
 delete mode 100644 sim/aarch64/Makefile.in
 delete mode 100644 sim/arm/Makefile.in
 delete mode 100644 sim/avr/Makefile.in
 delete mode 100644 sim/bfin/Makefile.in
 delete mode 100644 sim/bpf/Makefile.in
 delete mode 100644 sim/common/Make-common.in
 delete mode 100644 sim/cr16/Makefile.in
 delete mode 100644 sim/cris/Makefile.in
 delete mode 100644 sim/d10v/Makefile.in
 delete mode 100644 sim/erc32/Makefile.in
 delete mode 100644 sim/example-synacor/Makefile.in
 delete mode 100644 sim/frv/Makefile.in
 delete mode 100644 sim/ft32/Makefile.in
 delete mode 100644 sim/h8300/Makefile.in
 delete mode 100644 sim/iq2000/Makefile.in
 delete mode 100644 sim/lm32/Makefile.in
 delete mode 100644 sim/m32c/Makefile.in
 delete mode 100644 sim/m32r/Makefile.in
 delete mode 100644 sim/m68hc11/Makefile.in
 delete mode 100644 sim/mcore/Makefile.in
 delete mode 100644 sim/microblaze/Makefile.in
 delete mode 100644 sim/mips/Makefile.in
 delete mode 100644 sim/mn10300/Makefile.in
 delete mode 100644 sim/moxie/Makefile.in
 delete mode 100644 sim/msp430/Makefile.in
 delete mode 100644 sim/or1k/Makefile.in
 delete mode 100644 sim/pru/Makefile.in
 delete mode 100644 sim/riscv/Makefile.in
 delete mode 100644 sim/rl78/Makefile.in
 delete mode 100644 sim/rx/Makefile.in
 delete mode 100644 sim/sh/Makefile.in
 delete mode 100644 sim/v850/Makefile.in