summaryrefslogtreecommitdiff
path: root/projects/generate.bat
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-04-30 23:24:42 +0100
committerSteve Holme <steve_holme@hotmail.com>2014-04-30 23:26:05 +0100
commit3d77d013e1b55aab711683eb90b72bad651efbeb (patch)
tree1a263f733a6948b94e33d8699b92f6212a18c890 /projects/generate.bat
parent637438f2599331d127e0dec0a041fc7712900a8d (diff)
downloadcurl-3d77d013e1b55aab711683eb90b72bad651efbeb.tar.gz
build: Fixed generation when source file names contain spaces
This shouldn't happen with the source files in the repository, but fixed the output when there are spurious files lying around that contain spaces. For example "pop3 - Copy.c" By including the offending source file in the project files the user can then see the file and remove it if necessary.
Diffstat (limited to 'projects/generate.bat')
-rw-r--r--projects/generate.bat30
1 files changed, 15 insertions, 15 deletions
diff --git a/projects/generate.bat b/projects/generate.bat
index dfbc3fc9c..fed472e04 100644
--- a/projects/generate.bat
+++ b/projects/generate.bat
@@ -87,21 +87,21 @@ rem
set "var=!var:*:=!"
if "!var!" == "CURL_SRC_C_FILES" (
- for /f %%c in ('dir /b ..\src\*.c') do call :element %1 src %%c %3
+ for /f "delims=" %%c in ('dir /b ..\src\*.c') do call :element %1 src "%%c" %3
) else if "!var!" == "CURL_SRC_H_FILES" (
- for /f %%h in ('dir /b ..\src\*.h') do call :element %1 src %%h %3
+ for /f "delims=" %%h in ('dir /b ..\src\*.h') do call :element %1 src "%%h" %3
) else if "!var!" == "CURL_SRC_RC_FILES" (
- for /f %%r in ('dir /b ..\src\*.rc') do call :element %1 src %%r %3
+ for /f "delims=" %%r in ('dir /b ..\src\*.rc') do call :element %1 src "%%r" %3
) else if "!var!" == "CURL_LIB_C_FILES" (
- for /f %%c in ('dir /b ..\lib\*.c') do call :element %1 lib %%c %3
+ for /f "delims=" %%c in ('dir /b ..\lib\*.c') do call :element %1 lib "%%c" %3
) else if "!var!" == "CURL_LIB_H_FILES" (
- for /f %%h in ('dir /b ..\lib\*.h') do call :element %1 lib %%h %3
+ for /f "delims=" %%h in ('dir /b ..\lib\*.h') do call :element %1 lib "%%h" %3
) else if "!var!" == "CURL_LIB_RC_FILES" (
- for /f %%r in ('dir /b ..\lib\*.rc') do call :element %1 lib %%r %3
+ for /f "delims=" %%r in ('dir /b ..\lib\*.rc') do call :element %1 lib "%%r" %3
) else if "!var!" == "CURL_LIB_VTLS_C_FILES" (
- for /f %%c in ('dir /b ..\lib\vtls\*.c') do call :element %1 lib\vtls %%c %3
+ for /f "delims=" %%c in ('dir /b ..\lib\vtls\*.c') do call :element %1 lib\vtls "%%c" %3
) else if "!var!" == "CURL_LIB_VTLS_H_FILES" (
- for /f %%h in ('dir /b ..\lib\vtls\*.h') do call :element %1 lib\vtls %%h %3
+ for /f "delims=" %%h in ('dir /b ..\lib\vtls\*.h') do call :element %1 lib\vtls "%%h" %3
) else (
echo.!var!>> %3
)
@@ -129,26 +129,26 @@ rem
if "%1" == "dsp" (
echo # Begin Source File>> %4
echo.>> %4
- echo SOURCE=..\..\..\..\%2\%3>> %4
+ echo SOURCE=..\..\..\..\%2\%~3>> %4
echo # End Source File>> %4
) else if "%1" == "vcproj1" (
echo %TABS%^<File>> %4
- echo %TABS% RelativePath="..\..\..\..\%2\%3"^>>> %4
+ echo %TABS% RelativePath="..\..\..\..\%2\%~3"^>>> %4
echo %TABS%^</File^>>> %4
) else if "%1" == "vcproj2" (
echo %TABS%^<File>> %4
- echo %TABS% RelativePath="..\..\..\..\%2\%3">> %4
+ echo %TABS% RelativePath="..\..\..\..\%2\%~3">> %4
echo %TABS%^>>> %4
echo %TABS%^</File^>>> %4
) else if "%1" == "vcxproj" (
call :extension %3 ext
if "%ext%" == "c" (
- echo %SPACES%^<ClCompile Include=^"..\..\..\..\%2\%3^" /^>>> %4
+ echo %SPACES%^<ClCompile Include=^"..\..\..\..\%2\%~3^" /^>>> %4
) else if "%ext%" == "h" (
- echo %SPACES%^<ClInclude Include=^"..\..\..\..\%2\%3^" /^>>> %4
+ echo %SPACES%^<ClInclude Include=^"..\..\..\..\%2\%~3^" /^>>> %4
) else if "%ext%" == "rc" (
- echo %SPACES%^<ResourceCompile Include=^"..\..\..\..\%2\%3^" /^>>> %4
+ echo %SPACES%^<ResourceCompile Include=^"..\..\..\..\%2\%~3^" /^>>> %4
)
)
@@ -160,7 +160,7 @@ rem %1 - The filename
rem %2 - The return value
rem
:extension
- set fname=%1
+ set fname=%~1
set ename=
:loop1
if "%fname%"=="" (