Prechádzať zdrojové kódy

qcacld-3.0: remove realpath dependency

Android build system is using toybox “realpath” which doesn’t have
“—relative-to” option as in GNU tools. Use more generic python API.

Change-Id: Ib129bd721056e2fcb563817ac61cc6811568f68d
CRs-Fixed: 2676451
Mahesh Kumar Kalikot Veetil 5 rokov pred
rodič
commit
0d007bf428
1 zmenil súbory, kde vykonal 4 pridanie a 3 odobranie
  1. 4 3
      Kbuild

+ 4 - 3
Kbuild

@@ -25,9 +25,10 @@ CONFIG_QCA_CLD_WLAN_PROFILE ?= $(WLAN_PROFILE)
 
 ifeq ($(KERNEL_BUILD), n)
 ifneq ($(ANDROID_BUILD_TOP),)
-      override WLAN_ROOT := $(shell realpath --relative-to $(CURDIR) $(ANDROID_BUILD_TOP)/$(WLAN_ROOT))
-      override WLAN_COMMON_INC := $(shell realpath --relative-to $(CURDIR) $(ANDROID_BUILD_TOP)/$(WLAN_COMMON_INC))
-      override WLAN_FW_API := $(shell realpath --relative-to $(CURDIR) $(ANDROID_BUILD_TOP)/$(WLAN_FW_API))
+      ANDROID_BUILD_TOP_REL := $(shell python -c "import os.path; print(os.path.relpath('$(ANDROID_BUILD_TOP)'))")
+      override WLAN_ROOT := $(ANDROID_BUILD_TOP_REL)/$(WLAN_ROOT)
+      override WLAN_COMMON_INC := $(ANDROID_BUILD_TOP_REL)/$(WLAN_COMMON_INC)
+      override WLAN_FW_API := $(ANDROID_BUILD_TOP_REL)/$(WLAN_FW_API)
 endif
 endif