From 489f60461c6d9ca4e607fa8c22c5af054e0ff442 Mon Sep 17 00:00:00 2001 From: Eunji Jeong Date: Tue, 3 Feb 2015 13:42:05 +0900 Subject: [PATCH] Remove duplicated configuration for android --- mk/install.mk | 5 ++--- mk/rt.mk | 4 +--- mk/tests.mk | 9 ++++----- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/mk/install.mk b/mk/install.mk index 6a011d32730..8850cd77803 100644 --- a/mk/install.mk +++ b/mk/install.mk @@ -58,14 +58,13 @@ tmp/empty_dir: # Android runtime setup # FIXME: This probably belongs somewhere else -# target platform specific variables -# for arm-linux-androidabi +# target platform specific variables for android define DEF_ADB_DEVICE_STATUS CFG_ADB_DEVICE_STATUS=$(1) endef $(foreach target,$(CFG_TARGET), \ - $(if $(or $(findstring $(target),"arm-linux-androideabi"),$(findstring $(target),"aarch64-linux-android")), \ + $(if $(findstring android, $(target)), \ $(if $(findstring adb,$(CFG_ADB)), \ $(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[_A-Za-z0-9-]+[[:blank:]]+device')), \ $(info install: install-runtime-target for $(target) enabled \ diff --git a/mk/rt.mk b/mk/rt.mk index a8bbeb41517..527485c5029 100644 --- a/mk/rt.mk +++ b/mk/rt.mk @@ -139,9 +139,7 @@ ifeq ($$(CFG_WINDOWSY_$(1)), 1) JEMALLOC_ARGS_$(1) := --enable-lazy-lock else ifeq ($(OSTYPE_$(1)), apple-ios) JEMALLOC_ARGS_$(1) := --disable-tls -else ifeq ($(OSTYPE_$(1)), linux-androideabi) - JEMALLOC_ARGS_$(1) := --disable-tls -else ifeq ($(OSTYPE_$(1)), linux-android) +else ifeq ($(findstring android, $(OSTYPE_$(1))), android) JEMALLOC_ARGS_$(1) := --disable-tls endif diff --git a/mk/tests.mk b/mk/tests.mk index 0d5e266c39d..3007056dcfb 100644 --- a/mk/tests.mk +++ b/mk/tests.mk @@ -107,14 +107,13 @@ endef $(foreach target,$(CFG_TARGET), \ $(eval $(call DEF_TARGET_COMMANDS,$(target)))) -# Target platform specific variables -# for arm-linux-androidabi +# Target platform specific variables for android define DEF_ADB_DEVICE_STATUS CFG_ADB_DEVICE_STATUS=$(1) endef $(foreach target,$(CFG_TARGET), \ - $(if $(or $(findstring $(target),"arm-linux-androideabi"),$(findstring $(target),"aarch64-linux-android")), \ + $(if $(findstring android, $(target)), \ $(if $(findstring adb,$(CFG_ADB)), \ $(if $(findstring device,$(shell $(CFG_ADB) devices 2>/dev/null | grep -E '^[:_A-Za-z0-9-]+[[:blank:]]+device')), \ $(info check: android device attached) \ @@ -137,7 +136,7 @@ $(info check: android device test dir $(CFG_ADB_TEST_DIR) ready \ $(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)) \ $(shell $(CFG_ADB) push $(S)src/etc/adb_run_wrapper.sh $(CFG_ADB_TEST_DIR) 1>/dev/null) \ $(foreach target,$(CFG_TARGET), \ - $(if $(or $(findstring $(target),"arm-linux-androideabi"),$(findstring $(target),"aarch64-linux-android")), \ + $(if $(findstring android, $(target)), \ $(shell $(CFG_ADB) shell mkdir $(CFG_ADB_TEST_DIR)/$(target)) \ $(foreach crate,$(TARGET_CRATES), \ $(shell $(CFG_ADB) push $(TLIB2_T_$(target)_H_$(CFG_BUILD))/$(call CFG_LIB_GLOB_$(target),$(crate)) \ @@ -436,7 +435,7 @@ $(foreach host,$(CFG_HOST), \ $(foreach crate, $(TEST_CRATES), \ $(if $(findstring $(target),$(CFG_BUILD)), \ $(eval $(call DEF_TEST_CRATE_RULES,$(stage),$(target),$(host),$(crate))), \ - $(if $(or $(findstring $(target),"arm-linux-androideabi"), $(findstring $(target),"aarch64-linux-android")), \ + $(if $(findstring android, $(target)), \ $(if $(findstring $(CFG_ADB_DEVICE_STATUS),"true"), \ $(eval $(call DEF_TEST_CRATE_RULES_android,$(stage),$(target),$(host),$(crate))), \ $(eval $(call DEF_TEST_CRATE_RULES_null,$(stage),$(target),$(host),$(crate))) \