From: Andrew Waterman Date: Thu, 20 Nov 2014 02:07:53 +0000 (-0800) Subject: Add missing makefile dependence X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8e7ae9b1d6da2ad31c44ea753783057678b8987f;p=riscv-isa-sim.git Add missing makefile dependence This manifested as a spurious compile warning when using make -j. --- diff --git a/Makefile.in b/Makefile.in index c3f7dc0..2445f94 100644 --- a/Makefile.in +++ b/Makefile.in @@ -189,7 +189,7 @@ $(2)_objs := $$(patsubst %.cc, %.o, $$($(2)_srcs)) $(2)_c_objs := $$(patsubst %.c, %.o, $$($(2)_c_srcs)) $(2)_deps := $$(patsubst %.o, %.d, $$($(2)_objs)) $(2)_c_deps := $$(patsubst %.o, %.d, $$($(2)_c_objs)) -$$($(2)_pch) : %.h.gch : %.h +$$($(2)_pch) : %.h.gch : %.h $$($(2)_gen_hdrs) $(COMPILE) $$< # If using clang, don't depend (and thus don't build) precompiled headers $$($(2)_objs) : %.o : %.cc $$($(2)_gen_hdrs) $(if $(filter-out clang,$(CC)),$$($(2)_pch)) diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in index f916bd1..c5a9055 100644 --- a/riscv/riscv.mk.in +++ b/riscv/riscv.mk.in @@ -49,7 +49,8 @@ riscv_gen_srcs = \ $(addsuffix .cc, $(call get_insn_list,$(src_dir)/riscv/encoding.h)) icache.h: - $(src_dir)/riscv/gen_icache 1024 > $@ + $(src_dir)/riscv/gen_icache 1024 > $@.tmp + mv $@.tmp $@ $(riscv_gen_srcs): %.cc: insns/%.h insn_template.cc sed 's/NAME/$(subst .cc,,$@)/' $(src_dir)/riscv/insn_template.cc | sed 's/OPCODE/$(call get_opcode,$(src_dir)/riscv/encoding.h,$(subst .cc,,$@))/' > $@