From bea305aec5248bd7533f894a1cdd0dbe05ce8c38 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 19 Sep 2017 10:49:52 +0200 Subject: [PATCH] depot: avoid rule aliaing in api/base content.mk This patch merges two similar rules, which create content at 'include' into a single rule. This prevents a possible race condition when creating archives in parallel. --- repos/base/recipes/api/base/content.mk | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/repos/base/recipes/api/base/content.mk b/repos/base/recipes/api/base/content.mk index 3a2a3603d7..cfc8990ada 100644 --- a/repos/base/recipes/api/base/content.mk +++ b/repos/base/recipes/api/base/content.mk @@ -3,17 +3,14 @@ content: include mk/spec lib LICENSE # architectures, for which a 'trace/timestamp.h' header is available ARCHS := riscv arm_v6 arm_v7 x86_32 x86_64 -MIRRORED_FROM_OS := $(foreach A,$(ARCHS),include/spec/$A/trace/timestamp.h) - include: mkdir -p include cp -r $(REP_DIR)/include/* $@/ - -content: $(MIRRORED_FROM_OS) - -$(MIRRORED_FROM_OS): - mkdir -p $(dir $@) - cp $(GENODE_DIR)/repos/os/$@ $@ + for a in ${ARCHS}; do \ + mkdir -p include/spec/$$a/trace; \ + cp $(GENODE_DIR)/repos/os/include/spec/$$a/trace/timestamp.h \ + include/spec/$$a/trace; \ + done LIB_MK_FILES := base.mk ld.mk ldso-startup.mk