Browse Source

Fix makefile race condition

pull/18/head
Andrew Waterman 12 years ago
parent
commit
e26e8c5879
  1. 3
      Makefile.in
  2. 3
      hwacha/hwacha.mk.in

3
Makefile.in

@ -189,6 +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_deps := $$(patsubst %.h, %.d, $$($(2)_precompiled_hdrs))
$$($(2)_pch) : %.h.gch : %.h $$($(2)_gen_hdrs)
$(COMPILE) $$<
# If using clang, don't depend (and thus don't build) precompiled headers
@ -198,7 +199,7 @@ $$($(2)_c_objs) : %.o : %.c $$($(2)_gen_hdrs)
$(COMPILE_C) -c $$<
$(2)_junk += $$(addprefix $(src_dir)/$(1)/, $$($(2)_pch)) \
$$($(2)_objs) $$($(2)_c_objs) $$($(2)_deps) $$($(2)_c_deps) $$($(2)_gen_hdrs)
$$($(2)_objs) $$($(2)_c_objs) $$($(2)_deps) $$($(2)_c_deps) $$($(2)_gen_hdrs) $$($(2)_pch_deps)
# Reverse the dependency list so that a given subproject only depends on
# subprojects listed to its right. This is the correct order for linking

3
hwacha/hwacha.mk.in

@ -40,3 +40,6 @@ hwacha_ut_gen_srcs = \
$(hwacha_ut_gen_srcs): %.cc: insns_ut/%.h insn_template_hwacha_ut.cc
sed 's/NAME/$(subst .cc,,$@)/' $(src_dir)/hwacha/insn_template_hwacha_ut.cc | sed 's/OPCODE/$(call get_opcode,$(src_dir)/hwacha/opcodes_hwacha_ut.h,$(subst .cc,,$@))/' > $@
hwacha_junk = \
$(hwacha_gen_srcs) \
$(hwacha_ut_gen_srcs) \

Loading…
Cancel
Save