aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2016-07-07 13:17:35 +0800
committerFathi Boudra <fathi.boudra@linaro.org>2016-07-07 05:24:56 +0000
commit5050bda7ff2430ff452aa645286c444b1b7a38ca (patch)
tree7226652588c02cea3e4b022c686827e35a004953
parent88038d1653fdb7a0fef35ddc7218b76079a6527f (diff)
downloadlinaro-android-build-tools-5050bda7ff2430ff452aa645286c444b1b7a38ca.tar.gz
create-user-build-script: clean environmen variables export
1. add new environment export for TARGET_GCC_VERSION_EXP, MALLOC_IMPL, TARGET_BUILD_KERNEL, TARGET_BOOTIMAGE_USE_FAT 2. update to export TARGET_KERNEL_SOURCE with the new common method 3. remove exports for USE_LINARO_TOOLCHAIN, TOOLCHAIN_URL and TARGET_TOOLS_PREFIX which are deprecated for toolchain specification. Change-Id: I888925466c90b507b640f313bc111d2409163658 Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
-rwxr-xr-xbuild-scripts/create-user-build-script38
1 files changed, 22 insertions, 16 deletions
diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script
index 004bbb0..1a4035b 100755
--- a/build-scripts/create-user-build-script
+++ b/build-scripts/create-user-build-script
@@ -142,6 +142,21 @@ cd \${DIR}
EOF
}
+export_config_env_var(){
+ local CONFIG_VAR_NAME="${1}"
+ if [ -z "${CONFIG_VAR_NAME}" ]; then
+ return
+ fi
+
+ local CONFIG_VAR_VALUE=$(eval echo \${${CONFIG_VAR_NAME}})
+ if [ -n "${CONFIG_VAR_VALUE}" ]; then
+ cat <<EOF
+export ${CONFIG_VAR_NAME}="${CONFIG_VAR_VALUE}"
+EOF
+ fi
+
+}
+
jenkins_configs_method()
{
cat <<EOF
@@ -171,11 +186,7 @@ export TARGET_PRODUCT=${TARGET_PRODUCT}
export PATCHSETS="${PATCHSETS}"
export LUNCH=${LUNCH}
EOF
- if [ -n "${TARGET_KERNEL_SOURCE}" ]; then
- cat <<EOF
-export TARGET_KERNEL_SOURCE=${TARGET_KERNEL_SOURCE}
-EOF
- fi
+
cat <<EOF
export TARGET_SIMULATOR=false
export BUILD_TINY_ANDROID=${BUILD_TINY_ANDROID}
@@ -188,19 +199,14 @@ export DEBUG_NO_STDCXX11=${DEBUG_NO_STDCXX11}
export TOOLCHAIN_TRIPLET=${TOOLCHAIN_TRIPLET}
export ANDROID_64=${ANDROID_64}
export WITH_HOST_DALVIK=${WITH_HOST_DALVIK}
-export USE_LINARO_TOOLCHAIN=${USE_LINARO_TOOLCHAIN}
-EOF
- if [ -n "${TOOLCHAIN_URL}" ]; then
- cat <<EOF
-export TOOLCHAIN_URL=${TOOLCHAIN_URL}
-export TARGET_TOOLS_PREFIX=android-toolchain-eabi/bin/arm-linux-androideabi-
EOF
- else
- cat <<EOF
-export TARGET_TOOLS_PREFIX=${TARGET_TOOLS_PREFIX}
-EOF
- fi
+ export_config_env_var "TARGET_GCC_VERSION_EXP"
+ export_config_env_var "MALLOC_IMPL"
+ export_config_env_var "TARGET_KERNEL_SOURCE"
+ export_config_env_var "TARGET_BUILD_KERNEL"
+ export_config_env_var "TARGET_BOOTIMAGE_USE_FAT"
+
}
git_configs_method()