Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1414)

Unified Diff: platform_tools/nacl/nacl_make

Issue 14655006: Use exportVar function in nacl_make (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform_tools/nacl/nacl_make
===================================================================
--- platform_tools/nacl/nacl_make (revision 9009)
+++ platform_tools/nacl/nacl_make (working copy)
@@ -1,5 +1,12 @@
#!/bin/bash
+function exportVar {
+ NAME=$1
+ VALUE=$2
+ echo export $NAME=\"$VALUE\"
+ export $NAME="$VALUE"
+}
+
function setenv {
if [ -z "$1" ]; then
echo "ERROR: setenv() requires one argument."
@@ -40,25 +47,25 @@
export NACL_CROSS_PREFIX=${CROSS_ID}-nacl
if [[ -z "$NACL_MAKE_CCACHE" ]]; then
- export NACLCC=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-gcc
- export NACLCXX=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-g++
+ exportVar NACLCC ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-gcc
+ exportVar NACLCXX ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-g++
else
- export NACLCC="${NACL_MAKE_CCACHE} ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-gcc"
- export NACLCXX="${NACL_MAKE_CCACHE} ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-g++"
+ exportVar NACLCC "${NACL_MAKE_CCACHE} ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-gcc"
+ exportVar NACLCXX "${NACL_MAKE_CCACHE} ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-g++"
fi
- export NACLAR=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ar
- export NACLRANLIB=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ranlib
- export NACLLD=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ld
- export NACLSTRINGS=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings
- export NACLSTRIP=${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strip
+ exportVar NACLAR ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ar
+ exportVar NACLRANLIB ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ranlib
+ exportVar NACLLD ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-ld
+ exportVar NACLSTRINGS ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strings
+ exportVar NACLSTRIP ${NACL_BIN_PATH}/${NACL_CROSS_PREFIX}-strip
- export CC=${NACLCC}
- export CXX=${NACLCXX}
- export AR=${NACLAR}
- export RANLIB=${NACLRANLIB}
- export PATH=${NACL_BIN_PATH}:${PATH};
+ exportVar CC "${NACLCC}"
+ exportVar CXX "${NACLCXX}"
+ exportVar AR "${NACLAR}"
+ exportVar RANLIB "${NACLRANLIB}"
+ exportVar PATH ${NACL_BIN_PATH}:${PATH};
- export GYP_DEFINES="skia_os=nacl skia_arch_width=${ARCH_WIDTH}"
+ exportVar GYP_DEFINES "skia_os=nacl skia_arch_width=${ARCH_WIDTH}"
}
function build {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698