[v5,4/5] Makefile: staging symlink uses a relative path
diff mbox

Message ID 1436824511-1601-4-git-send-email-s.martin49@gmail.com
State Changes Requested
Headers show

Commit Message

Samuel Martin July 13, 2015, 9:55 p.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(-)

Patch
diff mbox

diff --git a/Makefile b/Makefile
index 69c1105..570cbf2 100644
--- a/Makefile
+++ b/Makefile
@@ -460,7 +460,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)