@@ -157,40 +157,46 @@ uninstall:
157
157
158
158
# target platform specific variables
159
159
# 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 )
162
162
endef
163
163
164
164
$(foreach target,$(CFG_TARGET_TRIPLES), \
165
165
$(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 \
169
169
$(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 \
172
172
$(info install : android device not attached) \
173
- $(eval $(call DEF_ADB_STATUS , false))) \
173
+ $(eval $(call DEF_ADB_DEVICE_STATUS , false))) \
174
174
), \
175
- $(info install : install-runtime-target for arm-linux-androideabi disabled \
175
+ $(info install : install-runtime-target for $( target ) disabled \
176
176
$(info install : adb not found) \
177
- $(eval $(call DEF_ADB_STATUS , false))) \
177
+ $(eval $(call DEF_ADB_DEVICE_STATUS , false))) \
178
178
), \
179
179
) \
180
180
)
181
181
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 ) ,)
184
186
CFG_RUNTIME_PUSH_DIR =/system/lib
187
+ else
188
+ CFG_RUNTIME_PUSH_DIR =$(L_TOKEN )
189
+ endif
185
190
191
+ ifeq ($(CFG_ADB_DEVICE_STATUS ) ,true)
186
192
ifdef VERBOSE
187
193
ADB = adb $(1 )
188
194
ADB_PUSH = adb push $(1 ) $(2 )
189
195
ADB_SHELL = adb shell $(1 ) $(2 )
190
196
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
194
200
endif
195
201
196
202
define INSTALL_RUNTIME_TARGET_N
@@ -215,8 +221,9 @@ $(eval $(call INSTALL_RUNTIME_TARGET_CLEANUP_N,arm-linux-androideabi))
215
221
install-runtime-target : \
216
222
install-runtime-target-arm-linux-androideabi-cleanup \
217
223
install-runtime-target-arm-linux-androideabi-host-$(CFG_BUILD_TRIPLE )
218
-
219
224
else
220
225
install-runtime-target :
221
- @echo
226
+ @echo " No device to install runtime library"
227
+ @echo
228
+ endif
222
229
endif
0 commit comments