From bef4ab9835dec865898c74337dfb7154718b94aa Mon Sep 17 00:00:00 2001 From: SimonLi Date: Thu, 13 May 2021 19:03:43 +0800 Subject: [PATCH 1/2] fix: rebuild mksh depends on rebuild.sh script --- apps/mksh/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mksh/Makefile b/apps/mksh/Makefile index a468a046..c6180344 100755 --- a/apps/mksh/Makefile +++ b/apps/mksh/Makefile @@ -46,7 +46,7 @@ LOCAL_CFLAGS += -DMKSH_LESS_CMDLINE_EDITING -DMKSH_LESS_BUILDINS -DMKSH_NO_INITC all:$(MKSH) $(MKSH): -ifneq ($(wildcard $(BUILD_DIR)),) +ifneq ($(wildcard $(BUILD_DIR)/Rebuild.sh),) $(HIDE)echo "not clean, rebuilding now" $(HIDE)chmod +x $(BUILD_DIR)/Rebuild.sh $(HIDE)cd $(BUILD_DIR) && ./Rebuild.sh > $(BUILD_LOG) 2>&1 From e38f9a98c9d373db8381af707c5996d1fefef64e Mon Sep 17 00:00:00 2001 From: SimonLi Date: Thu, 13 May 2021 19:20:26 +0800 Subject: [PATCH 2/2] fix: mkdir -p is more robust --- apps/mksh/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/mksh/Makefile b/apps/mksh/Makefile index c6180344..15f3c36f 100755 --- a/apps/mksh/Makefile +++ b/apps/mksh/Makefile @@ -51,7 +51,7 @@ ifneq ($(wildcard $(BUILD_DIR)/Rebuild.sh),) $(HIDE)chmod +x $(BUILD_DIR)/Rebuild.sh $(HIDE)cd $(BUILD_DIR) && ./Rebuild.sh > $(BUILD_LOG) 2>&1 else - $(HIDE)mkdir $(BUILD_DIR) + $(HIDE)mkdir -p $(BUILD_DIR) $(HIDE)$(CP) $(LITEOSTHIRDPARTY)/$(MKSH)/. $(BUILD_DIR) $(HIDE)chmod +x $(BUILD_DIR)/Build.sh $(HIDE)cd $(BUILD_DIR) && CC=$(CC) TARGET_OS=$(TARGET_OS) CFLAGS="$(LOCAL_CFLAGS)" LDFLAGS="$(LDFLAGS)" ./Build.sh -r > $(BUILD_LOG) 2>&1