Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ab75d586 authored by Tim Schumacher's avatar Tim Schumacher
Browse files

Fix the download path issues

Variables in rules are seemingly replaced at use-time,
not at parse-time. That has been causing issues if
vendor/cm/terminal/Android.mk wasn't the last Makefile
to set LOCAL_PATH, which is the case if devices use
Android.mk files that are included during the device
configuration phase.

Copy the current LOCAL_PATH into an variable that
doesn't get overwritten and replace current usages of
LOCAL_PATH inside rules by the new variable.

Change-Id: I8ff93ad45ef30f8d338c1622f183293ca9f38fdf
parent c5db18ce
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
LOCAL_PATH := $(call my-dir)
TERM_PROPRIETARY_DIR := $(LOCAL_PATH)/proprietary

$(LOCAL_PATH)/proprietary:
	mkdir -p $(LOCAL_PATH)/proprietary
$(TERM_PROPRIETARY_DIR):
	mkdir -p $(TERM_PROPRIETARY_DIR)

$(LOCAL_PATH)/proprietary/Term.apk: $(LOCAL_PATH)/proprietary
	curl -L -o $(LOCAL_PATH)/proprietary/Term.apk -O -L https://jackpal.github.com/Android-Terminal-Emulator/downloads/Term.apk
$(TERM_PROPRIETARY_DIR)/Term.apk: $(TERM_PROPRIETARY_DIR)
	curl -L -o $(TERM_PROPRIETARY_DIR)/Term.apk -O -L https://jackpal.github.com/Android-Terminal-Emulator/downloads/Term.apk

$(LOCAL_PATH)/proprietary/lib/armeabi/%.so: $(LOCAL_PATH)/proprietary/Term.apk
	unzip -o -d $(LOCAL_PATH)/proprietary $(LOCAL_PATH)/proprietary/Term.apk lib/armeabi/$(@F)
$(TERM_PROPRIETARY_DIR)/lib/armeabi/%.so: $(TERM_PROPRIETARY_DIR)/Term.apk
	unzip -o -d $(TERM_PROPRIETARY_DIR) $(TERM_PROPRIETARY_DIR)/Term.apk lib/armeabi/$(@F)

include $(CLEAR_VARS)