From a9209c4aaaba21ec2b043c997b0f5f40cc67fb7e Mon Sep 17 00:00:00 2001 From: joey0320 Date: Tue, 21 Feb 2023 16:56:25 -0800 Subject: [PATCH] Fix TestDriver.v missing from gen-collateral after recompiling --- sims/vcs/Makefile | 6 +++--- sims/verilator/Makefile | 6 +++--- vlsi/Makefile | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sims/vcs/Makefile b/sims/vcs/Makefile index b26df843..b6f11a80 100644 --- a/sims/vcs/Makefile +++ b/sims/vcs/Makefile @@ -38,10 +38,10 @@ SIM_FILE_REQS += \ $(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v # copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir) -$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR) - cp -f $^ $(GEN_COLLATERAL_DIR) +$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(GEN_COLLATERAL_DIR) + cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR) $(foreach file,\ - $^,\ + $(SIM_FILE_REQS),\ $(if $(filter %.h,$(file)),\ ,\ echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;)) diff --git a/sims/verilator/Makefile b/sims/verilator/Makefile index fd171b4c..d48da28e 100644 --- a/sims/verilator/Makefile +++ b/sims/verilator/Makefile @@ -66,10 +66,10 @@ SIM_FILE_REQS += \ $(ROCKETCHIP_RSRCS_DIR)/csrc/remote_bitbang.cc # copy files and add -FI for *.h files in *.f -$(sim_files): $(SIM_FILE_REQS) | $(GEN_COLLATERAL_DIR) - cp -f $^ $(GEN_COLLATERAL_DIR) +$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(GEN_COLLATERAL_DIR) + cp -f $(SIM_FILE_REQS) $(GEN_COLLATERAL_DIR) $(foreach file,\ - $^,\ + $(SIM_FILE_REQS),\ $(if $(filter %.h,$(file)),\ echo "-FI $(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;,\ echo "$(addprefix $(GEN_COLLATERAL_DIR)/, $(notdir $(file)))" >> $@;)) diff --git a/vlsi/Makefile b/vlsi/Makefile index a1f850a1..ab8438d5 100644 --- a/vlsi/Makefile +++ b/vlsi/Makefile @@ -134,10 +134,10 @@ SIM_FILE_REQS += \ $(ROCKETCHIP_RSRCS_DIR)/vsrc/TestDriver.v # copy files but ignore *.h files in *.f since vcs has +incdir+$(build_dir) -$(sim_files): $(SIM_FILE_REQS) | $(build_dir) - cp -f $^ $(build_dir) +$(sim_files): $(SIM_FILE_REQS) $(ALL_MODS_FILELIST) | $(build_dir) + cp -f $(SIM_FILE_REQS) $(build_dir) $(foreach file,\ - $^,\ + $(SIM_FILE_REQS),\ $(if $(filter %.h,$(file)),\ ,\ echo "$(addprefix $(build_dir)/, $(notdir $(file)))" >> $@;))