From 8e7ae9b1d6da2ad31c44ea753783057678b8987f Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Wed, 19 Nov 2014 18:07:53 -0800 Subject: [PATCH] Add missing makefile dependence This manifested as a spurious compile warning when using make -j. --- Makefile.in | 2 +- riscv/riscv.mk.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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,,$@))/' > $@ -- 2.30.2