diff mbox

[v4,4/4] Makefile: staging symlink uses a relative path

Message ID 1436784870-17417-4-git-send-email-s.martin49@gmail.com
State Superseded
Headers show

Commit Message

Samuel Martin July 13, 2015, 10:54 a.m. UTC
A step forward toward a relocatable SDK.

Signed-off-by: Samuel Martin <s.martin49@gmail.com>

---
changes v3->v4:
- no change

changes v2->v3:
- no change
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/Makefile b/Makefile
index d4913dc..e6c3c11 100644
--- a/Makefile
+++ b/Makefile
@@ -447,7 +447,7 @@  $(STAGING_DIR):
 	@ln -snf lib $(STAGING_DIR)/usr/$(LIB_SYMLINK)
 	@mkdir -p $(STAGING_DIR)/usr/include
 	@mkdir -p $(STAGING_DIR)/usr/bin
-	@ln -snf $(STAGING_DIR) $(BASE_DIR)/staging
+	@ln -snf $(subst $(BASE_DIR)/,,$(STAGING_DIR)) $(BASE_DIR)/staging
 
 ifeq ($(BR2_ROOTFS_SKELETON_CUSTOM),y)
 TARGET_SKELETON = $(BR2_ROOTFS_SKELETON_CUSTOM_PATH)