Skip to content

Commit 1471f1f

Browse files
committed
---
yaml --- r: 72634 b: refs/heads/dist-snap c: 9ecb97a h: refs/heads/master v: v3
1 parent 344ae8b commit 1471f1f

File tree

2 files changed

+25
-18
lines changed

2 files changed

+25
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 35214d3c6cd5f70b38baa6d879ca40d9db8118ba
10+
refs/heads/dist-snap: 9ecb97ae58c6fde97bfe58aeddd11790899bd4ec
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/mk/install.mk

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -157,40 +157,46 @@ uninstall:
157157

158158
# target platform specific variables
159159
# for arm-linux-androidabi
160-
define DEF_ADB_STATUS
161-
CFG_ADB_DEVICE=$(1)
160+
define DEF_ADB_DEVICE_STATUS
161+
CFG_ADB_DEVICE_STATUS=$(1)
162162
endef
163163

164164
$(foreach target,$(CFG_TARGET_TRIPLES), \
165165
$(if $(findstring $(target),"arm-linux-androideabi"), \
166-
$(if $(findstring adb,$(shell which adb)), \
167-
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[A-Za-z0-9-]+[[:blank:]]+device')), \
168-
$(info install: install-runtime-target for arm-linux-androideabi enabled \
166+
$(if $(findstring adb,$(CFG_ADB)), \
167+
$(if $(findstring device,$(shell adb devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \
168+
$(info install: install-runtime-target for $(target) enabled \
169169
$(info install: android device attached) \
170-
$(eval $(call DEF_ADB_STATUS, true))), \
171-
$(info install: install-runtime-target for arm-linux-androideabi disabled \
170+
$(eval $(call DEF_ADB_DEVICE_STATUS, true))), \
171+
$(info install: install-runtime-target for $(target) disabled \
172172
$(info install: android device not attached) \
173-
$(eval $(call DEF_ADB_STATUS, false))) \
173+
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
174174
), \
175-
$(info install: install-runtime-target for arm-linux-androideabi disabled \
175+
$(info install: install-runtime-target for $(target) disabled \
176176
$(info install: adb not found) \
177-
$(eval $(call DEF_ADB_STATUS, false))) \
177+
$(eval $(call DEF_ADB_DEVICE_STATUS, false))) \
178178
), \
179179
) \
180180
)
181181

182-
ifeq ($(CFG_ADB_DEVICE),true)
183-
182+
ifeq (install-runtime-target,$(firstword $(MAKECMDGOALS)))
183+
$(eval $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS)):;@:)
184+
L_TOKEN := $(word 2,$(MAKECMDGOALS))
185+
ifeq ($(L_TOKEN),)
184186
CFG_RUNTIME_PUSH_DIR=/system/lib
187+
else
188+
CFG_RUNTIME_PUSH_DIR=$(L_TOKEN)
189+
endif
185190

191+
ifeq ($(CFG_ADB_DEVICE_STATUS),true)
186192
ifdef VERBOSE
187193
ADB = adb $(1)
188194
ADB_PUSH = adb push $(1) $(2)
189195
ADB_SHELL = adb shell $(1) $(2)
190196
else
191-
ADB = $(Q)$(call E, adb $(1)) && adb $(1) 1>/dev/null 2>/dev/null
192-
ADB_PUSH = $(Q)$(call E, adb push $(1)) && adb push $(1) $(2) 1>/dev/null 2>/dev/null
193-
ADB_SHELL = $(Q)$(call E, adb shell $(1) $(2)) && adb shell $(1) $(2) 1>/dev/null 2>/dev/null
197+
ADB = $(Q)$(call E, adb $(1)) && adb $(1) 1>/dev/null
198+
ADB_PUSH = $(Q)$(call E, adb push $(1)) && adb push $(1) $(2) 1>/dev/null
199+
ADB_SHELL = $(Q)$(call E, adb shell $(1) $(2)) && adb shell $(1) $(2) 1>/dev/null
194200
endif
195201

196202
define INSTALL_RUNTIME_TARGET_N
@@ -215,8 +221,9 @@ $(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,arm-linux-androideabi))
215221
install-runtime-target: \
216222
install-runtime-target-arm-linux-androideabi-cleanup \
217223
install-runtime-target-arm-linux-androideabi-host-$(CFG_BUILD_TRIPLE)
218-
219224
else
220225
install-runtime-target:
221-
@echo
226+
@echo "No device to install runtime library"
227+
@echo
228+
endif
222229
endif

0 commit comments

Comments
 (0)