Merge changes I0e4d807f,Ia5ff575c,Ie4a1f313

* changes:
  gen_msvs_*proj.sh: strip SRC_PATH_BARE from obj names
  *.mk: pass SRC_PATH_BARE to all GEN_VCPROJ invocations
  build/msvs: fix builds in source dirs with spaces
This commit is contained in:
James Zern 2014-06-05 20:52:26 -07:00 committed by Gerrit Code Review
commit 5f16b7b632
6 changed files with 17 additions and 9 deletions

View File

@ -11,8 +11,8 @@ REM Arguments:
REM %1 - Relative path to the directory containing the vp8 and vpx_scale REM %1 - Relative path to the directory containing the vp8 and vpx_scale
REM source directories. REM source directories.
REM %2 - Path to obj_int_extract.exe. REM %2 - Path to obj_int_extract.exe.
cl /I "./" /I "%1" /nologo /c /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP "%1/vp8/encoder/vp8_asm_enc_offsets.c" cl /I. /I%1 /nologo /c /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP "%~1/vp8/encoder/vp8_asm_enc_offsets.c"
%2\obj_int_extract.exe rvds "vp8_asm_enc_offsets.obj" > "vp8_asm_enc_offsets.asm" %2\obj_int_extract.exe rvds "vp8_asm_enc_offsets.obj" > "vp8_asm_enc_offsets.asm"
cl /I "./" /I "%1" /nologo /c /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP "%1/vpx_scale/vpx_scale_asm_offsets.c" cl /I. /I%1 /nologo /c /DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP "%~1/vpx_scale/vpx_scale_asm_offsets.c"
%2\obj_int_extract.exe rvds "vpx_scale_asm_offsets.obj" > "vpx_scale_asm_offsets.asm" %2\obj_int_extract.exe rvds "vpx_scale_asm_offsets.obj" > "vpx_scale_asm_offsets.asm"

View File

@ -67,7 +67,9 @@ generate_filter() {
if [ "${f##*.}" == "$pat" ]; then if [ "${f##*.}" == "$pat" ]; then
unset file_list[i] 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" open_tag File RelativePath="$f"
if [ "$pat" == "asm" ] && $asm_use_custom_step; then if [ "$pat" == "asm" ] && $asm_use_custom_step; then
@ -153,7 +155,7 @@ for opt in "$@"; do
opt=${opt##-I} opt=${opt##-I}
opt=$(fix_path "$opt") opt=$(fix_path "$opt")
incs="${incs}${incs:+;}"${opt}"" incs="${incs}${incs:+;}"${opt}""
yasmincs="${yasmincs} -I${opt}" yasmincs="${yasmincs} -I"${opt}""
;; ;;
-D*) defines="${defines}${defines:+;}${opt##-D}" -D*) defines="${defines}${defines:+;}${opt##-D}"
;; ;;
@ -300,7 +302,7 @@ generate_vcproj() {
vpx) vpx)
tag Tool \ tag Tool \
Name="VCPreBuildEventTool" \ 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 \ tag Tool \
Name="VCCLCompilerTool" \ Name="VCCLCompilerTool" \

View File

@ -78,7 +78,9 @@ generate_filter() {
if [ "${f##*.}" == "$pat" ]; then if [ "${f##*.}" == "$pat" ]; then
unset file_list[i] 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')
if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom_step; then if ([ "$pat" == "asm" ] || [ "$pat" == "s" ]) && $asm_use_custom_step; then
# Avoid object file name collisions, i.e. vpx_config.c and # Avoid object file name collisions, i.e. vpx_config.c and
@ -175,7 +177,7 @@ for opt in "$@"; do
opt=${opt##-I} opt=${opt##-I}
opt=$(fix_path "$opt") opt=$(fix_path "$opt")
incs="${incs}${incs:+;}"${opt}"" incs="${incs}${incs:+;}"${opt}""
yasmincs="${yasmincs} -I${opt}" yasmincs="${yasmincs} -I"${opt}""
;; ;;
-D*) defines="${defines}${defines:+;}${opt##-D}" -D*) defines="${defines}${defines:+;}${opt##-D}"
;; ;;
@ -392,7 +394,7 @@ generate_vcxproj() {
hostplat=Win32 hostplat=Win32
fi fi
open_tag PreBuildEvent open_tag PreBuildEvent
tag_content Command "call obj_int_extract.bat $src_path_bare $hostplat\\\$(Configuration)" tag_content Command "call obj_int_extract.bat "$src_path_bare" $hostplat\\\$(Configuration)"
close_tag PreBuildEvent close_tag PreBuildEvent
fi fi
open_tag ClCompile open_tag ClCompile

View File

@ -10,6 +10,6 @@ echo on
REM Arguments: REM Arguments:
REM %1 - Relative path to the directory containing the vp8 source directory. REM %1 - Relative path to the directory containing the vp8 source directory.
REM %2 - Path to obj_int_extract.exe. REM %2 - Path to obj_int_extract.exe.
cl /I "./" /I "%1" /nologo /c "%1/vp8/encoder/vp8_asm_enc_offsets.c" cl /I. /I%1 /nologo /c "%~1/vp8/encoder/vp8_asm_enc_offsets.c"
%2\obj_int_extract.exe rvds "vp8_asm_enc_offsets.obj" > "vp8_asm_enc_offsets.asm" %2\obj_int_extract.exe rvds "vp8_asm_enc_offsets.obj" > "vp8_asm_enc_offsets.asm"

View File

@ -306,6 +306,7 @@ $(1): $($(1:.$(VCPROJ_SFX)=).SRCS) vpx.$(VCPROJ_SFX)
--name=$$(@:.$(VCPROJ_SFX)=)\ --name=$$(@:.$(VCPROJ_SFX)=)\
--ver=$$(CONFIG_VS_VERSION)\ --ver=$$(CONFIG_VS_VERSION)\
--proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\ --proj-guid=$$($$(@:.$(VCPROJ_SFX)=).GUID)\
--src-path-bare="$(SRC_PATH_BARE)" \
$$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \ $$(if $$(CONFIG_STATIC_MSVCRT),--static-crt) \
--out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \ --out=$$@ $$(INTERNAL_CFLAGS) $$(CFLAGS) \
$$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) $$^ $$(INTERNAL_LDFLAGS) $$(LDFLAGS) -l$$(CODEC_LIB) $$^

View File

@ -222,6 +222,7 @@ obj_int_extract.$(VCPROJ_SFX): $(SRC_PATH_BARE)/build/make/obj_int_extract.c
--name=obj_int_extract \ --name=obj_int_extract \
--ver=$(CONFIG_VS_VERSION) \ --ver=$(CONFIG_VS_VERSION) \
--proj-guid=E1360C65-D375-4335-8057-7ED99CC3F9B2 \ --proj-guid=E1360C65-D375-4335-8057-7ED99CC3F9B2 \
--src-path-bare="$(SRC_PATH_BARE)" \
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
--out=$@ $^ \ --out=$@ $^ \
-I. \ -I. \
@ -253,6 +254,7 @@ vpx.$(VCPROJ_SFX): $(CODEC_SRCS) vpx.def obj_int_extract.$(VCPROJ_SFX)
--proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \ --proj-guid=DCE19DAF-69AC-46DB-B14A-39F0FAA5DB74 \
--module-def=vpx.def \ --module-def=vpx.def \
--ver=$(CONFIG_VS_VERSION) \ --ver=$(CONFIG_VS_VERSION) \
--src-path-bare="$(SRC_PATH_BARE)" \
--out=$@ $(CFLAGS) \ --out=$@ $(CFLAGS) \
$(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \ $(filter-out $(addprefix %, $(ASM_INCLUDES)), $^) \
--src-path-bare="$(SRC_PATH_BARE)" \ --src-path-bare="$(SRC_PATH_BARE)" \
@ -447,6 +449,7 @@ test_libvpx.$(VCPROJ_SFX): $(LIBVPX_TEST_SRCS) vpx.$(VCPROJ_SFX) gtest.$(VCPROJ_
-D_VARIADIC_MAX=10 \ -D_VARIADIC_MAX=10 \
--proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \ --proj-guid=CD837F5F-52D8-4314-A370-895D614166A7 \
--ver=$(CONFIG_VS_VERSION) \ --ver=$(CONFIG_VS_VERSION) \
--src-path-bare="$(SRC_PATH_BARE)" \
$(if $(CONFIG_STATIC_MSVCRT),--static-crt) \ $(if $(CONFIG_STATIC_MSVCRT),--static-crt) \
--out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \ --out=$@ $(INTERNAL_CFLAGS) $(CFLAGS) \
-I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \ -I. -I"$(SRC_PATH_BARE)/third_party/googletest/src/include" \