sim: build: remove various obsolete generation dep variables
authorMike Frysinger <vapier@gentoo.org>
Thu, 3 Nov 2022 13:26:01 +0000 (20:26 +0700)
committerMike Frysinger <vapier@gentoo.org>
Fri, 4 Nov 2022 06:58:42 +0000 (13:58 +0700)
These manual settings were necessary when we weren't doing automatic
header dependency tracking.  That was changed a while ago, and we use
automake now to do it all for us.  As a result, many of these vars
aren't even referenced anymore.

Further, some of the source file generation (e.g. .c files, or igen,
or cgen outputs) were moved to the common automake build, and it takes
care of dependency tracking for us with the object files.

13 files changed:
sim/bpf/Makefile.in
sim/common/Make-common.in
sim/cr16/Makefile.in
sim/cris/Makefile.in
sim/d10v/Makefile.in
sim/frv/Makefile.in
sim/iq2000/Makefile.in
sim/lm32/Makefile.in
sim/m32r/Makefile.in
sim/mn10300/Makefile.in
sim/or1k/Makefile.in
sim/sh/Makefile.in
sim/v850/Makefile.in

index 23b103ce833295294c13ceaef5e9b29f9eabc4a6..522484235357bfa1e81e3d02fbcb6989fb04e7b2 100644 (file)
@@ -31,28 +31,10 @@ SIM_OBJS = \
        $(BPF_GEN_OBJS) \
        $(BPF_HAND_OBJS)
 
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h \
-       bpf-sim.h \
-       eng-le.h eng-be.h \
-       $(srcdir)/../../opcodes/bpf-desc.h \
-       $(srcdir)/../../opcodes/bpf-opc.h
-
 SIM_EXTRA_CLEAN = bpf-clean
 
 ## COMMON_POST_CONFIG_FRAG
 
-# BPF headers
-
-BPF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       $(SIM_EXTRA_DEPS) \
-       cpu.h cpuall.h \
-        decode-le.h decode-be.h \
-        defs-le.h defs-be.h \
-        eng-le.h eng-be.h
-
 # Dependencies for binaries from CGEN generated source
 
 mloop-le.o: mloop-le.c
@@ -65,7 +47,7 @@ mloop-be.o: mloop-be.c
 decode-le.o: decode-le.c
        $(COMPILE) -DWANT_ISA_EBPFLE $(srcdir)/decode-le.c
        $(POSTCOMPILE)
-decode-be.o: decode-be.c $(BPF_INCLUDE_DEPS)
+decode-be.o: decode-be.c
        $(COMPILE) -DWANT_ISA_EBPFBE $(srcdir)/decode-be.c
        $(POSTCOMPILE)
 
index a79a375a90c5e7f7a6e9424f6a6bbca549611a21..2698f7b2b67309d8acfa63c613b7eeb75124e562 100644 (file)
@@ -175,24 +175,6 @@ SIM_NEW_COMMON_OBJS = \
        \
        $(SIM_HW_OBJS) \
 
-# cgen-sim.h and the headers it includes
-CGEN_SIM_DEPS = \
-       $(srccom)/cgen-sim.h \
-       $(srccom)/cgen-defs.h \
-       $(srccom)/cgen-scache.h \
-       $(srccom)/cgen-fpu.h \
-       $(srccom)/cgen-par.h \
-       $(srccom)/cgen-cpu.h \
-       $(srccom)/cgen-trace.h \
-       cpuall.h
-
-# Add this to SIM_EXTRA_DEPS.
-CGEN_INCLUDE_DEPS = \
-       $(CGEN_SIM_DEPS) \
-       $(srccom)/cgen-engine.h \
-       $(srccom)/cgen-types.h \
-       $(srcdir)/../../include/opcode/cgen.h
-
 ## End COMMON_PRE_CONFIG_FRAG
 
 ## COMMON_POST_CONFIG_FRAG
@@ -244,9 +226,6 @@ LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
 
 RUNTESTFLAGS =
 
-callback_h = $(srcroot)/include/sim/callback.h
-remote_sim_h = $(srcroot)/include/sim/sim.h
-
 all: libsim.a run$(EXEEXT)
 
 libsim.a: $(LIB_OBJS)
@@ -259,104 +238,6 @@ run$(EXEEXT): $(SIM_RUN_OBJS) libsim.a $(LIBDEPS)
          $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o run$(EXEEXT) \
          $(SIM_RUN_OBJS) libsim.a $(EXTRA_LIBS)
 
-#
-# Rules for building sim-* components.  Triggered by listing the corresponding
-# .o file in the list of simulator targets.
-#
-
-sim_main_headers = \
-       sim-main.h \
-       $(sim-assert_h) \
-       $(sim-base_h) \
-       $(sim-cpu_h) \
-       $(sim-engine_h) \
-       $(sim-events_h) \
-       $(sim-memopt_h) \
-       $(sim-model_h) \
-       $(sim-module_h) \
-       $(sim-profile_h) \
-       $(sim-trace_h) \
-       $(sim-watch_h) \
-       $(sim-basics_h) \
-       $(SIM_EXTRA_DEPS)
-
-# Exported version of sim_main_headers.
-SIM_MAIN_DEPS = \
-       $(sim_main_headers)
-
-sim-alu_h = $(srccom)/sim-alu.h
-sim-arange_h = $(srccom)/sim-arange.h
-sim-assert_h = $(srccom)/sim-assert.h
-sim-base_h = $(srccom)/sim-base.h \
-               $(sim-module_h) \
-               $(sim-trace_h) \
-               $(sim-core_h) \
-               $(sim-events_h) \
-               $(sim-profile_h) \
-               $(sim-model_h) \
-               $(sim-io_h) \
-               $(sim-engine_h) \
-               $(sim-watch_h) \
-               $(sim-memopt_h) \
-               $(sim-cpu_h)
-sim-basics_h = $(srccom)/sim-basics.h \
-               $(sim-config_h) \
-               $(callback_h) \
-               $(sim-inline_h) \
-               $(sim-types_h) \
-               $(sim-bits_h) \
-               $(sim-endian_h) \
-               $(sim-signal_h) \
-               $(sim-arange_h) \
-               $(sim-utils_h)
-sim-bits_h = $(srccom)/sim-bits.h \
-               $(srccom)/sim-bits.c
-sim-config_h = $(srccom)/sim-config.h
-sim-core_h = $(srccom)/sim-core.h
-sim-cpu_h = $(srccom)/sim-cpu.h
-sim-endian_h = $(srccom)/sim-endian.h \
-               $(srccom)/sim-endian.c
-sim-engine_h = $(srccom)/sim-engine.h
-sim-events_h = $(srccom)/sim-events.h
-sim-fpu_h = $(srccom)/sim-fpu.h
-sim-hw_h = $(srccom)/sim-hw.h
-sim-inline_h = $(srccom)/sim-inline.h
-sim-io_h = $(srccom)/sim-io.h
-sim-memopt_h = $(srccom)/sim-memopt.h
-sim-model_h = $(srccom)/sim-model.h
-sim-module_h = $(srccom)/sim-module.h
-sim-n-bits_h = $(srccom)/sim-n-bits.h
-sim-n-core_h = $(srccom)/sim-n-core.h
-sim-n-endian_h = $(srccom)/sim-n-endian.h
-sim-options_h = $(srccom)/sim-options.h
-sim-profile_h = $(srccom)/sim-profile.h
-sim-signal_h = $(srccom)/sim-signal.h
-sim-trace_h = $(srccom)/sim-trace.h
-sim-types_h = $(srccom)/sim-types.h
-sim-utils_h = $(srccom)/sim-utils.h
-sim-watch_h = $(srccom)/sim-watch.h
-
-hw-alloc_h = $(srccom)/hw-alloc.h
-hw-base_h = $(srccom)/hw-base.h
-hw-device_h = $(srccom)/hw-device.h
-hw-events_h = $(srccom)/hw-events.h
-hw-handles_h = $(srccom)/hw-handles.h
-hw-instances_h = $(srccom)/hw-instances.h
-hw-ports_h = $(srccom)/hw-ports.h
-hw-properties_h = $(srccom)/hw-properties.h
-hw-tree_h = $(srccom)/hw-tree.h
-
-hw_main_headers = \
-       $(srccom)/hw-main.h \
-       $(hw-alloc_h) \
-       $(hw-base_h) \
-       $(hw-device_h) \
-       $(hw-events_h) \
-       $(hw-instances_h) \
-       $(hw-handles_h) \
-       $(hw-ports_h) \
-       $(hw-properties_h) \
-
 #
 # Dependency tracking.  Most of this is conditional on GNU Make being
 # found by configure; if GNU Make is not found, we fall back to a
@@ -440,14 +321,6 @@ stamp-modules: Makefile $(SIM_OBJS:.o=.c)
        $(SILENCE) rm -f $@.l-tmp $@.tmp
        $(SILENCE) touch $@
 
-# CGEN support.
-
-# For use in Makefile.in for cpu-specific files.
-CGEN_MAIN_CPU_DEPS = \
-       $(SIM_MAIN_DEPS) \
-       $(srccom)/cgen-ops.h \
-       $(srccom)/cgen-mem.h
-
 # Support targets.
 
 install: install-common $(SIM_EXTRA_INSTALL)
index f37bdccf08d41189e2ca1f233c25e1c82af3cdae..f62589207ee9dc4e26f8a8170a942904a9fd09a5 100644 (file)
@@ -24,6 +24,4 @@ SIM_OBJS = \
        table.o \
        simops.o
 
-SIM_EXTRA_DEPS = simops.h
-
 ## COMMON_POST_CONFIG_FRAG
index c3660e76f0d4ac393581f7748cf5dc38cfb79932..7b69c114d929b1370046c7bfafeab32cf7f41866 100644 (file)
@@ -33,12 +33,6 @@ SIM_OBJS = \
 
 SIM_EXTRA_HW_DEVICES = rv cris cris_900000xx
 
-# Extra headers included by sim-main.h.
-# FIXME: $(srccom)/cgen-ops.h should be in CGEN_INCLUDE_DEPS.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) $(srccom)/cgen-ops.h \
-       arch.h cpuall.h cris-sim.h engv10.h engv32.h
-
 SIM_EXTRA_CLEAN = cris-clean
 
 ## COMMON_POST_CONFIG_FRAG
@@ -56,20 +50,6 @@ rvdummy$(EXEEXT): rvdummy.o $(EXTRA_LIBDEPS)
        $(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
          $(CC) $(ALL_CFLAGS) -o rvdummy$(EXEEXT) rvdummy.o $(EXTRA_LIBS)
 
-rvdummy.o: rvdummy.c $(remote_sim_h) $(callback_h)
-
-# CRISV10 objs
-
-CRISV10F_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpuv10.h decodev10.h engv10.h
-
-# CRISV32 objs
-
-CRISV32F_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpuv32.h decodev32.h engv32.h
-
 cris-clean:
        -rm -f stamp-arch
        -rm -f tmp-* rvdummy$(EXEEXT)
index 458fd80eb677e1f6a3aa7ba1433c19cbddae4eff..0437e803fe5b181335a2f4205daa0a9cc422fc79 100644 (file)
@@ -25,9 +25,4 @@ SIM_OBJS = \
        simops.o \
        endian.o
 
-SIM_EXTRA_DEPS = simops.h
-
-INCLUDE = d10v_sim.h $(srcroot)/include/sim/callback.h endian.c \
-       $(srcroot)/include/gdb/sim-d10v.h
-
 ## COMMON_POST_CONFIG_FRAG
index effd03699be9afc9079fe6f648fafc62231876ee..3d0646f6ae7cc5cf8df7bca3cef40091891ee19a 100644 (file)
@@ -29,13 +29,6 @@ SIM_OBJS = \
        profile.o profile-fr400.o profile-fr450.o profile-fr500.o profile-fr550.o options.o \
        reset.o registers.o
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h cpuall.h frv-sim.h $(srcdir)/../../opcodes/frv-desc.h cache.h \
-       registers.h profile.h eng.h \
-       $(sim-options_h)
-
 SIM_EXTRA_CFLAGS = @SIM_FRV_TRAPDUMP_FLAGS@
 
 SIM_EXTRA_CLEAN = frv-clean
@@ -47,13 +40,6 @@ memory.o sem.o: SIM_WERROR_CFLAGS =
 
 arch = frv
 
-# FRV objs
-
-FRVBF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       $(SIM_EXTRA_DEPS) \
-       cpu.h decode.h eng.h
-
 frv-clean:
        rm -f tmp-*
        rm -f stamp-arch stamp-cpu
index e7e0c71ea866694c4558175527a93babcc9d4917..2d8c94cdd024d54c67cdbb9afe693609a495e14c 100644 (file)
@@ -26,11 +26,6 @@ SIM_OBJS = \
        sim-if.o arch.o \
        $(IQ2000_OBJS)
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h cpuall.h $(srcdir)/../../opcodes/iq2000-desc.h eng.h
-
 ALL_CPU_CFLAGS = -DHAVE_CPU_IQ2000BF -DHAVE_CPU_IQ10BF
 
 SIM_EXTRA_CLEAN = iq2000-clean
@@ -45,10 +40,6 @@ arch.o: arch.c
 
 # IQ2000 objs
 
-IQ2000BF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpu.h decode.h eng.h
-
 iq2000-clean:
        rm -f tmp-*
        rm -f stamp-arch stamp-cpu
index 05191597414c0772a5c30147bc8588d179a4bf10..5d78e36bf6bb52607a3b27c1f4761c55c429514a 100644 (file)
@@ -14,21 +14,12 @@ SIM_OBJS = \
 
 SIM_EXTRA_HW_DEVICES = lm32cpu lm32timer lm32uart
 
-# List of extra dependencies.
-# Generally this consists of simulator specific files included by sim-main.h.
-SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \
-       eng.h
-
 SIM_EXTRA_CLEAN = lm32-clean
 
 ## COMMON_POST_CONFIG_FRAG
 
 arch = lm32 
 
-LM32BF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpu.h decode.h eng.h
-
 lm32-clean:
        rm -f stamp-arch stamp-cpu 
        rm -f tmp-*
index 935c33da6e2679961260ccecb0f7a12cdf579211..6a0e2e5fcf5e6ffb839f8936e2ea5af045419fd8 100644 (file)
@@ -35,12 +35,6 @@ SIM_OBJS = \
 
 SIM_EXTRA_HW_DEVICES = m32r_cache m32r_uart
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       arch.h cpuall.h m32r-sim.h $(srcdir)/../../opcodes/m32r-desc.h \
-       eng.h engx.h eng2.h
-
 SIM_EXTRA_CLEAN = m32r-clean
 
 # Some modules don't build cleanly yet.
index 5240fc629298a9de1765621557a19302641ba03f..f8ac93cdd56ed40897a45329372e17456bef9875 100644 (file)
@@ -27,9 +27,6 @@ SIM_OBJS = $(MN10300_OBJS) interp.o
 
 SIM_EXTRA_HW_DEVICES = mn103cpu mn103int mn103tim mn103ser mn103iop
 
-# Extra dependencies for "sim-main.h"
-SIM_EXTRA_DEPS = mn10300_sim.h itable.h idecode.h
-
 # List of extra flags to always pass to $(CC).
 SIM_EXTRA_CFLAGS = -DPOLL_QUIT_INTERVAL=0x20
 
index 20952cb2f14907453bb4cacf41ab78d6d867f911..fdf49835c7b8f8951006d502ced9e124b6201e1c 100644 (file)
@@ -40,36 +40,19 @@ SIM_OBJS = \
 
 SIM_OBJS += $(OR1K_OBJS)
 
-# Extra headers included by sim-main.h.
-SIM_EXTRA_DEPS = \
-       $(CGEN_INCLUDE_DEPS) \
-       or1k-sim.h \
-       $(srcdir)/../../opcodes/or1k-desc.h \
-       arch.h \
-       cpuall.h \
-       decode.h
-
 ## COMMON_POST_CONFIG_FRAG
 
 arch = or1k
 
-# or1k32bf
-
-OR1K32BF_INCLUDE_DEPS = \
-       $(CGEN_MAIN_CPU_DEPS) \
-       cpu.h \
-       decode.h \
-       eng.h
-
-or1k.o: or1k.c $(OR1K32BF_INCLUDE_DEPS)
+or1k.o: or1k.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
-sim-if.o: sim-if.c $(SIM_MAIN_DEPS) $(srcdir)/../common/sim-core.h eng.h
+sim-if.o: sim-if.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
-traps.o: traps.c $(SIM_MAIN_DEPS) eng.h
+traps.o: traps.c
        $(COMPILE) $<
        $(POSTCOMPILE)
 
index 4bba7059ff81df9e1833c0161fdce10c9aaa3fa5..1960cb1fcf40427847d713d1f4b3d28f66cba462 100644 (file)
@@ -21,6 +21,5 @@ SIM_OBJS = \
        interp.o \
        $(SIM_NEW_COMMON_OBJS) \
        table.o
-SIM_EXTRA_DEPS = table.c code.c ppi.c
 
 ## COMMON_POST_CONFIG_FRAG
index ab4214526a4cb8431259f40be7f7ebf24e7ab73d..ec70b0bb15a5b1a639bd47ac49bc8f1fca8c6054 100644 (file)
@@ -23,8 +23,4 @@ SIM_OBJS = \
        itable.o semantics.o idecode.o icache.o engine.o irun.o support.o \
        sim-resume.o
 
-# List of extra dependencies.
-# Generally this consists of simulator specific files included by sim-main.h.
-SIM_EXTRA_DEPS = v850_sim.h sim-main.h
-
 ## COMMON_POST_CONFIG_FRAG