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

Side by Side Diff: source/libvpx/build/make/gen_msvs_vcxproj.sh

Issue 341293003: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/build/make/gen_msvs_proj.sh ('k') | source/libvpx/build/make/iosbuild.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 ## 2 ##
3 ## Copyright (c) 2013 The WebM project authors. All Rights Reserved. 3 ## Copyright (c) 2013 The WebM project authors. All Rights Reserved.
4 ## 4 ##
5 ## Use of this source code is governed by a BSD-style license 5 ## Use of this source code is governed by a BSD-style license
6 ## that can be found in the LICENSE file in the root of the source 6 ## that can be found in the LICENSE file in the root of the source
7 ## tree. An additional intellectual property rights grant can be found 7 ## tree. An additional intellectual property rights grant can be found
8 ## in the file PATENTS. All contributing project authors may 8 ## in the file PATENTS. All contributing project authors may
9 ## be found in the AUTHORS file in the root of the source tree. 9 ## be found in the AUTHORS file in the root of the source tree.
10 ## 10 ##
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 echo "generating filter '$name' from ${#file_list[@]} files" >&2 71 echo "generating filter '$name' from ${#file_list[@]} files" >&2
72 IFS=* 72 IFS=*
73 73
74 file_list_sz=${#file_list[@]} 74 file_list_sz=${#file_list[@]}
75 for i in ${!file_list[@]}; do 75 for i in ${!file_list[@]}; do
76 f=${file_list[i]} 76 f=${file_list[i]}
77 for pat in ${pats//;/$IFS}; do 77 for pat in ${pats//;/$IFS}; do
78 if [ "${f##*.}" == "$pat" ]; then 78 if [ "${f##*.}" == "$pat" ]; then
79 unset file_list[i] 79 unset file_list[i]
80 80
81 objf=$(echo ${f%.*}.obj | sed -e 's/^[\./]\+//g' -e 's,[:/],_,g' ) 81 objf=$(echo ${f%.*}.obj \
82 | sed -e "s,$src_path_bare,," \
83 -e 's/^[\./]\+//g' -e 's,[:/ ],_,g')
82 84
83 if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom _step; then 85 if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom _step; then
84 # Avoid object file name collisions, i.e. vpx_config.c and 86 # Avoid object file name collisions, i.e. vpx_config.c and
85 # vpx_config.asm produce the same object file without 87 # vpx_config.asm produce the same object file without
86 # this additional suffix. 88 # this additional suffix.
87 objf=${objf%.obj}_asm.obj 89 objf=${objf%.obj}_asm.obj
88 open_tag CustomBuild \ 90 open_tag CustomBuild \
89 Include="$f" 91 Include="$f"
90 for plat in "${platforms[@]}"; do 92 for plat in "${platforms[@]}"; do
91 for cfg in Debug Release; do 93 for cfg in Debug Release; do
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 --proj-guid=*) guid="${optval}" 150 --proj-guid=*) guid="${optval}"
149 ;; 151 ;;
150 --module-def=*) module_def="${optval}" 152 --module-def=*) module_def="${optval}"
151 ;; 153 ;;
152 --exe) proj_kind="exe" 154 --exe) proj_kind="exe"
153 ;; 155 ;;
154 --dll) proj_kind="dll" 156 --dll) proj_kind="dll"
155 ;; 157 ;;
156 --lib) proj_kind="lib" 158 --lib) proj_kind="lib"
157 ;; 159 ;;
158 --src-path-bare=*) src_path_bare=$(fix_path "$optval") 160 --src-path-bare=*)
161 src_path_bare=$(fix_path "$optval")
162 src_path_bare=${src_path_bare%/}
159 ;; 163 ;;
160 --static-crt) use_static_runtime=true 164 --static-crt) use_static_runtime=true
161 ;; 165 ;;
162 --enable-werror) werror=true 166 --enable-werror) werror=true
163 ;; 167 ;;
164 --ver=*) 168 --ver=*)
165 vs_ver="$optval" 169 vs_ver="$optval"
166 case "$optval" in 170 case "$optval" in
167 10|11|12) 171 10|11|12)
168 ;; 172 ;;
169 *) die Unrecognized Visual Studio Version in $opt 173 *) die Unrecognized Visual Studio Version in $opt
170 ;; 174 ;;
171 esac 175 esac
172 ;; 176 ;;
173 -I*) 177 -I*)
174 opt="${opt%/}"
175 opt=${opt##-I} 178 opt=${opt##-I}
176 opt=$(fix_path "$opt") 179 opt=$(fix_path "$opt")
180 opt="${opt%/}"
177 incs="${incs}${incs:+;}"${opt}"" 181 incs="${incs}${incs:+;}"${opt}""
178 yasmincs="${yasmincs} -I${opt}" 182 yasmincs="${yasmincs} -I"${opt}""
179 ;; 183 ;;
180 -D*) defines="${defines}${defines:+;}${opt##-D}" 184 -D*) defines="${defines}${defines:+;}${opt##-D}"
181 ;; 185 ;;
182 -L*) # fudge . to $(OutDir) 186 -L*) # fudge . to $(OutDir)
183 if [ "${opt##-L}" == "." ]; then 187 if [ "${opt##-L}" == "." ]; then
184 libdirs="${libdirs}${libdirs:+;}"\$(OutDir)"" 188 libdirs="${libdirs}${libdirs:+;}"\$(OutDir)""
185 else 189 else
186 # Also try directories for this platform/configuration 190 # Also try directories for this platform/configuration
187 opt=${opt##-L} 191 opt=${opt##-L}
188 opt=$(fix_path "$opt") 192 opt=$(fix_path "$opt")
189 libdirs="${libdirs}${libdirs:+;}"${opt}"" 193 libdirs="${libdirs}${libdirs:+;}"${opt}""
190 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)/\ $(Configuration)"" 194 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)/\ $(Configuration)""
191 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)&q uot;" 195 libdirs="${libdirs}${libdirs:+;}"${opt}/\$(PlatformName)&q uot;"
192 fi 196 fi
193 ;; 197 ;;
194 -l*) libs="${libs}${libs:+ }${opt##-l}.lib" 198 -l*) libs="${libs}${libs:+ }${opt##-l}.lib"
195 ;; 199 ;;
196 -*) die_unknown $opt 200 -*) die_unknown $opt
197 ;; 201 ;;
198 *) 202 *)
199 file_list[${#file_list[@]}]="$(fix_path $opt)" 203 # The paths in file_list are fixed outside of the loop.
204 file_list[${#file_list[@]}]="$opt"
200 case "$opt" in 205 case "$opt" in
201 *.asm|*.s) uses_asm=true 206 *.asm|*.s) uses_asm=true
202 ;; 207 ;;
203 esac 208 esac
204 ;; 209 ;;
205 esac 210 esac
206 done 211 done
212
213 # Make one call to fix_path for file_list to improve performance.
214 fix_file_list
215
207 outfile=${outfile:-/dev/stdout} 216 outfile=${outfile:-/dev/stdout}
208 guid=${guid:-`generate_uuid`} 217 guid=${guid:-`generate_uuid`}
209 asm_use_custom_step=false 218 asm_use_custom_step=false
210 uses_asm=${uses_asm:-false} 219 uses_asm=${uses_asm:-false}
211 case "${vs_ver:-11}" in 220 case "${vs_ver:-11}" in
212 10|11|12) 221 10|11|12)
213 asm_use_custom_step=$uses_asm 222 asm_use_custom_step=$uses_asm
214 ;; 223 ;;
215 esac 224 esac
216 225
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 for plat in "${platforms[@]}"; do 394 for plat in "${platforms[@]}"; do
386 for config in Debug Release; do 395 for config in Debug Release; do
387 open_tag ItemDefinitionGroup \ 396 open_tag ItemDefinitionGroup \
388 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'" 397 Condition="'\$(Configuration)|\$(Platform)'=='$config|$plat'"
389 if [ "$name" == "vpx" ]; then 398 if [ "$name" == "vpx" ]; then
390 hostplat=$plat 399 hostplat=$plat
391 if [ "$hostplat" == "ARM" ]; then 400 if [ "$hostplat" == "ARM" ]; then
392 hostplat=Win32 401 hostplat=Win32
393 fi 402 fi
394 open_tag PreBuildEvent 403 open_tag PreBuildEvent
395 tag_content Command "call obj_int_extract.bat $src_path_bare $ho stplat\\\$(Configuration)" 404 tag_content Command "call obj_int_extract.bat "$src_path_ba re" $hostplat\\\$(Configuration)"
396 close_tag PreBuildEvent 405 close_tag PreBuildEvent
397 fi 406 fi
398 open_tag ClCompile 407 open_tag ClCompile
399 if [ "$config" = "Debug" ]; then 408 if [ "$config" = "Debug" ]; then
400 opt=Disabled 409 opt=Disabled
401 runtime=$debug_runtime 410 runtime=$debug_runtime
402 curlibs=$debug_libs 411 curlibs=$debug_libs
403 case "$name" in 412 case "$name" in
404 obj_int_extract) 413 obj_int_extract)
405 debug=DEBUG 414 debug=DEBUG
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } 505 }
497 506
498 # This regexp doesn't catch most of the strings in the vcxproj format, 507 # This regexp doesn't catch most of the strings in the vcxproj format,
499 # since they're like <tag>path</tag> instead of <tag attr="path" /> 508 # since they're like <tag>path</tag> instead of <tag attr="path" />
500 # as previously. It still seems to work ok despite this. 509 # as previously. It still seems to work ok despite this.
501 generate_vcxproj | 510 generate_vcxproj |
502 sed -e '/"/s;\([^ "]\)/;\1\\;g' | 511 sed -e '/"/s;\([^ "]\)/;\1\\;g' |
503 sed -e '/xmlns/s;\\;/;g' > ${outfile} 512 sed -e '/xmlns/s;\\;/;g' > ${outfile}
504 513
505 exit 514 exit
OLDNEW
« no previous file with comments | « source/libvpx/build/make/gen_msvs_proj.sh ('k') | source/libvpx/build/make/iosbuild.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698