ref: 95735c3938cf18e5140a4528b65c713502884710
parent: dddc3c6906f0d840935214ab0b26ea9a6e06cc27
author: James Zern <[email protected]>
date: Wed Apr 23 10:51:45 EDT 2014
configure: quote some uses of source_path doesn't completely fix configure/build in directories with spaces, but it's good practice Change-Id: Ic7a5b3a0aa9e297b34061af07e099de8b1f003cd
--- a/build/make/configure.sh
+++ b/build/make/configure.sh
@@ -864,7 +864,7 @@
CC=armcc
AR=armar
AS=armasm
- LD=${source_path}/build/make/armlink_adapter.sh
+ LD="${source_path}/build/make/armlink_adapter.sh"
STRIP=arm-none-linux-gnueabi-strip
NM=arm-none-linux-gnueabi-nm
tune_cflags="--cpu="
@@ -1339,10 +1339,10 @@
if enabled source_path_used; then
# Prepare the PWD for building.
for f in ${OOT_INSTALLS}; do
- install -D ${source_path}/$f $f
+ install -D "${source_path}/$f" "$f"
done
fi
- cp ${source_path}/build/make/Makefile .
+ cp "${source_path}/build/make/Makefile" .
clean_temp_files
true
--- a/build/make/version.sh
+++ b/build/make/version.sh
@@ -24,9 +24,9 @@
id=${3:-VERSION_STRING}
git_version_id=""
-if [ -d ${source_path}/.git ]; then
+if [ -d "${source_path}/.git" ]; then
# Source Path is a git working copy. Check for local modifications.
- export GIT_DIR=${source_path}/.git
+ export GIT_DIR="${source_path}/.git"
git_version_id=`git describe --match=v[0-9]* 2>/dev/null`
fi
--- a/configure
+++ b/configure
@@ -158,7 +158,7 @@
# all targets available are enabled, by default.
for t in ${all_targets}; do
- [ -f ${source_path}/${t}.mk ] && enable_feature ${t}
+ [ -f "${source_path}/${t}.mk" ] && enable_feature ${t}
done
if ! perl --version >/dev/null; then
@@ -166,9 +166,9 @@
fi
-if [ "`cd ${source_path} && pwd`" != "`pwd`" ]; then
+if [ "`cd \"${source_path}\" && pwd`" != "`pwd`" ]; then
# test to see if source_path already configured
- if [ -f ${source_path}/vpx_config.h ]; then
+ if [ -f "${source_path}/vpx_config.h" ]; then
die "source directory already configured; run 'make distclean' there first"
fi
fi
@@ -201,27 +201,27 @@
enable_feature os_support
enable_feature temporal_denoising
-[ -d ${source_path}/../include ] && enable_feature alt_tree_layout
+[ -d "${source_path}/../include" ] && enable_feature alt_tree_layout
for d in vp8 vp9; do
- [ -d ${source_path}/${d} ] && disable_feature alt_tree_layout;
+ [ -d "${source_path}/${d}" ] && disable_feature alt_tree_layout;
done
if ! enabled alt_tree_layout; then
# development environment
-[ -d ${source_path}/vp8 ] && CODECS="${CODECS} vp8_encoder vp8_decoder"
-[ -d ${source_path}/vp9 ] && CODECS="${CODECS} vp9_encoder vp9_decoder"
+[ -d "${source_path}/vp8" ] && CODECS="${CODECS} vp8_encoder vp8_decoder"
+[ -d "${source_path}/vp9" ] && CODECS="${CODECS} vp9_encoder vp9_decoder"
else
# customer environment
-[ -f ${source_path}/../include/vpx/vp8cx.h ] && CODECS="${CODECS} vp8_encoder"
-[ -f ${source_path}/../include/vpx/vp8dx.h ] && CODECS="${CODECS} vp8_decoder"
-[ -f ${source_path}/../include/vpx/vp9cx.h ] && CODECS="${CODECS} vp9_encoder"
-[ -f ${source_path}/../include/vpx/vp9dx.h ] && CODECS="${CODECS} vp9_decoder"
-[ -f ${source_path}/../include/vpx/vp8cx.h ] || disable_feature vp8_encoder
-[ -f ${source_path}/../include/vpx/vp8dx.h ] || disable_feature vp8_decoder
-[ -f ${source_path}/../include/vpx/vp9cx.h ] || disable_feature vp9_encoder
-[ -f ${source_path}/../include/vpx/vp9dx.h ] || disable_feature vp9_decoder
+[ -f "${source_path}/../include/vpx/vp8cx.h" ] && CODECS="${CODECS} vp8_encoder"
+[ -f "${source_path}/../include/vpx/vp8dx.h" ] && CODECS="${CODECS} vp8_decoder"
+[ -f "${source_path}/../include/vpx/vp9cx.h" ] && CODECS="${CODECS} vp9_encoder"
+[ -f "${source_path}/../include/vpx/vp9dx.h" ] && CODECS="${CODECS} vp9_decoder"
+[ -f "${source_path}/../include/vpx/vp8cx.h" ] || disable_feature vp8_encoder
+[ -f "${source_path}/../include/vpx/vp8dx.h" ] || disable_feature vp8_decoder
+[ -f "${source_path}/../include/vpx/vp9cx.h" ] || disable_feature vp9_encoder
+[ -f "${source_path}/../include/vpx/vp9dx.h" ] || disable_feature vp9_decoder
-[ -f ${source_path}/../lib/*/*mt.lib ] && soft_enable static_msvcrt
+[ -f "${source_path}/../lib/*/*mt.lib" ] && soft_enable static_msvcrt
fi
CODECS="$(echo ${CODECS} | tr ' ' '\n')"
@@ -468,7 +468,7 @@
;;
esac
if [ -f "${source_path}/build/make/version.sh" ]; then
- local ver=`"$source_path/build/make/version.sh" --bare $source_path`
+ local ver=`"$source_path/build/make/version.sh" --bare "$source_path"`
DIST_DIR="${DIST_DIR}-${ver}"
VERSION_STRING=${ver}
ver=${ver%%-*}