Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Commit

Permalink
build: Fix race condition about 'sol_config.h'
Browse files Browse the repository at this point in the history
When running make even without '-j', FLOW_OIC_GEN rule runs in parallel
with the remaining of Soletta build and was providing 'sol_config.h'
before it was needed most of the time and the build worked. But that
wasn't always the case, which was causing the build to fail for some
users.

This patch adds 'KCONFIG_AUTOHEADER' as dependency for remaining of the
build so it's always there when is needed. This also add a message when
'sol_config.h' is generated to make debug easier.

Signed-off-by: Murilo Belluzzo <murilo.belluzzo@intel.com>
  • Loading branch information
mbelluzzo-intel committed Nov 24, 2015
1 parent b9533cf commit 35be3e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/build/Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ $(1): $($(1)-src) $(1).dep
$(Q)$(MKDIR) -p $(dir $(1))
$(Q)$(TARGETCC) $(OBJ_CFLAGS) $($(2)-gen-cflags) $(sort $($(2)-cflags)) $($(1)-src) -c -o $(1) $(3)

$(1).dep: $($(1)-src) $(all-hdr) $(find-gen-hdrs) $(call find-obj-deps,$(2)) $(all-dest-hdr) $(KCONFIG_CONFIG) $(HEADER_GEN)
$(1).dep: $($(1)-src) $(all-hdr) $(find-gen-hdrs) $(call find-obj-deps,$(2)) $(all-dest-hdr) $(KCONFIG_CONFIG) $(HEADER_GEN) $(KCONFIG_AUTOHEADER)
$(Q)$(MKDIR) -p $(dir $(1))
$(Q)$(TARGETCC) $(OBJ_CFLAGS) $($(2)-gen-cflags) $(sort $($(2)-cflags)) -MM -MG $($(1)-src) -MT "$(1)" > $(1).dep
endef
Expand Down Expand Up @@ -402,5 +402,6 @@ $(FLOW_OIC_GEN): $(FLOW_OIC_GEN_SCRIPT) $(KCONFIG_AUTOHEADER)
--node-type-gen-h=sol-flow/oic.h >/dev/null

$(KCONFIG_AUTOHEADER): $(DEPENDENCY_CACHE) $(KCONFIG_CONFIG) $(obj)/conf
$(Q)echo " "GEN" "$@
$(Q)mkdir -p $(KCONFIG_INCLUDE)config $(KCONFIG_INCLUDE)generated
$(Q)$(obj)/conf -s --silentoldconfig Kconfig

0 comments on commit 35be3e1

Please sign in to comment.