[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Minios-devel] [UNIKRAFT PATCH 04/10] build: introduce uk_mk_dir



Hum,

I am not a fan of this. It was actually intended to force directory creation within the build directory so that it never happens that anything created or modified is shared across multiple projects/applications. Imagine the same Unikraft source directory (e.g., sources of Unikraft) is used by multiple projects/applications and you want to build them at the same time (e.g., because of unit testing). In order to avoid race conditions you want to have the builds independent form each other.

Do you have a good reason why we should weaken this?

Thanks,

Simon

On 04.06.19 18:28, Yuri Volchkov wrote:
This functionality is useful for libraries too

Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx>
---
  support/build/Makefile.rules | 8 ++++++--
  1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/support/build/Makefile.rules b/support/build/Makefile.rules
index d90807e0..e1a5c206 100644
--- a/support/build/Makefile.rules
+++ b/support/build/Makefile.rules
@@ -48,9 +48,13 @@ endef
  #
  
################################################################################
+define uk_mk_dir =
+$(if $(shell mkdir -p $1 && cd $1 >/dev/null && pwd),,\
+       $(error could not create directory $1))
+endef
+
  define mk_sub_build_dir =
-$(if $(shell mkdir -p "$(BUILD_DIR)/$(1)" && cd "$(BUILD_DIR)/$(1)" >/dev/null 
&& pwd),,\
-     $(error could not create directory "$(BUILD_DIR)/$(1)"))
+$(call uk_mk_dir, $(BUILD_DIR)/$1)
  endef
sub_build_dir = $(addprefix $(BUILD_DIR)/,$(notdir $(1)))


_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.