Index: source/libvpx/build/make/gen_msvs_proj.sh |
=================================================================== |
--- source/libvpx/build/make/gen_msvs_proj.sh (revision 278778) |
+++ source/libvpx/build/make/gen_msvs_proj.sh (working copy) |
@@ -67,7 +67,9 @@ |
if [ "${f##*.}" == "$pat" ]; then |
unset file_list[i] |
- objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,[:/],_,g') |
+ objf=$(echo ${f%.*}.obj \ |
+ | sed -e "s,$src_path_bare,," \ |
+ -e 's/^[\./]\+//g' -e 's,[:/ ],_,g') |
open_tag File RelativePath="$f" |
if [ "$pat" == "asm" ] && $asm_use_custom_step; then |
@@ -135,7 +137,9 @@ |
;; |
--lib) proj_kind="lib" |
;; |
- --src-path-bare=*) src_path_bare=$(fix_path "$optval") |
+ --src-path-bare=*) |
+ src_path_bare=$(fix_path "$optval") |
+ src_path_bare=${src_path_bare%/} |
;; |
--static-crt) use_static_runtime=true |
;; |
@@ -149,11 +153,11 @@ |
esac |
;; |
-I*) |
- opt="${opt%/}" |
opt=${opt##-I} |
opt=$(fix_path "$opt") |
+ opt="${opt%/}" |
incs="${incs}${incs:+;}"${opt}"" |
- yasmincs="${yasmincs} -I${opt}" |
+ yasmincs="${yasmincs} -I"${opt}"" |
;; |
-D*) defines="${defines}${defines:+;}${opt##-D}" |
;; |
@@ -174,7 +178,8 @@ |
-*) die_unknown $opt |
;; |
*) |
- file_list[${#file_list[@]}]="$(fix_path $opt)" |
+ # The paths in file_list are fixed outside of the loop. |
+ file_list[${#file_list[@]}]="$opt" |
case "$opt" in |
*.asm) uses_asm=true |
;; |
@@ -182,6 +187,10 @@ |
;; |
esac |
done |
+ |
+# Make one call to fix_path for file_list to improve performance. |
+fix_file_list |
+ |
outfile=${outfile:-/dev/stdout} |
guid=${guid:-`generate_uuid`} |
asm_use_custom_step=false |
@@ -300,7 +309,7 @@ |
vpx) |
tag Tool \ |
Name="VCPreBuildEventTool" \ |
- CommandLine="call obj_int_extract.bat $src_path_bare $plat_no_ws\\\$(ConfigurationName)" \ |
+ CommandLine="call obj_int_extract.bat "$src_path_bare" $plat_no_ws\\\$(ConfigurationName)" \ |
tag Tool \ |
Name="VCCLCompilerTool" \ |
@@ -407,7 +416,7 @@ |
vpx) |
tag Tool \ |
Name="VCPreBuildEventTool" \ |
- CommandLine="call obj_int_extract.bat $src_path_bare $plat_no_ws\\\$(ConfigurationName)" \ |
+ CommandLine="call obj_int_extract.bat "$src_path_bare" $plat_no_ws\\\$(ConfigurationName)" \ |
tag Tool \ |
Name="VCCLCompilerTool" \ |