Skip to content
Permalink
Browse files
Don't let harmless errorlevels from the "set" utility leak into proje…
…ct-specific build scripts

When using set to unset an environment variable that didn't previously
exist, set raises the errorlevel to 1. This was leaking into
project-specific scripts, causing them to think the build has failed.
We now clear the errorlevel after we finish setting environment
variables.

Fixes <http://webkit.org/b/50350> Windows builds mysteriously fail in
some configurations

Reviewed by Steve Falkenburg.

* win/tools/vsprops/common.vsprops: Call "cmd /c" after setting
environment variables to get rid of any errorlevel that "set" set.

Canonical link: https://commits.webkit.org/63522@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@73075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
aroben committed Dec 1, 2010
1 parent a41995e commit dee1305cb260da84823097154f243cdfc8a5a76e
Showing with 22 additions and 3 deletions.
  1. +19 −0 WebKitLibraries/ChangeLog
  2. +3 −3 WebKitLibraries/win/tools/vsprops/common.vsprops
@@ -1,3 +1,22 @@
2010-12-01 Adam Roben <aroben@apple.com>

Don't let harmless errorlevels from the "set" utility leak into
project-specific build scripts

When using set to unset an environment variable that didn't previously
exist, set raises the errorlevel to 1. This was leaking into
project-specific scripts, causing them to think the build has failed.
We now clear the errorlevel after we finish setting environment
variables.

Fixes <http://webkit.org/b/50350> Windows builds mysteriously fail in
some configurations

Reviewed by Steve Falkenburg.

* win/tools/vsprops/common.vsprops: Call "cmd /c" after setting
environment variables to get rid of any errorlevel that "set" set.

2010-12-01 Steve Falkenburg <sfalken@apple.com>

Reviewed by Adam Roben.
@@ -41,15 +41,15 @@
/>
<Tool
Name="VCPostBuildEventTool"
CommandLine="REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file&#x0D;&#x0A;if not exist &quot;$(ProjectDir)$(ProjectName)PostBuild.cmd&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;set CONFIGURATIONNAME=$(ConfigurationName)&#x0D;&#x0A;set INPUTDIR=$(InputDir)&#x0D;&#x0A;set INPUTFILENAME=$(InputFileName)&#x0D;&#x0A;set INPUTPATH=$(InputPath)&#x0D;&#x0A;set INTDIR=$(IntDir)&#x0D;&#x0A;set LIBRARYCONFIGSUFFIX=$(LibraryConfigSuffix)&#x0D;&#x0A;set OUTDIR=$(OutDir)&#x0D;&#x0A;set PLATFORMNAME=$(PlatformName)&#x0D;&#x0A;set PROJECTDIR=$(ProjectDir)&#x0D;&#x0A;set PROJECTFILENAME=$(ProjectFileName)&#x0D;&#x0A;set PROJECTNAME=$(ProjectName)&#x0D;&#x0A;set PROJECTPATH=$(ProjectPath)&#x0D;&#x0A;set SOLUTIONDIR=$(SolutionDir)&#x0D;&#x0A;set SOLUTIONFILENAME=$(SolutionFileName)&#x0D;&#x0A;set SOLUTIONNAME=$(SolutionName)&#x0D;&#x0A;set SOLUTIONPATH=$(SolutionPath)&#x0D;&#x0A;set TARGETDIR=$(TargetDir)&#x0D;&#x0A;set TARGETEXT=$(TargetExt)&#x0D;&#x0A;set TARGETFILENAME=$(TargetFileName)&#x0D;&#x0A;set TARGETPATH=$(TargetPath)&#x0D;&#x0A;set WEBKITCONFIGSUFFIX=$(WebKitConfigSuffix)&#x0D;&#x0A;set WEBKITDLLCONFIGSUFFIX=$(WebKitDLLConfigSuffix)&#x0D;&#x0A;&#x0D;&#x0A;&quot;$(ProjectDir)$(ProjectName)PostBuild.cmd&quot;&#x0D;&#x0A;"
CommandLine="REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PostBuild.cmd file&#x0D;&#x0A;if not exist &quot;$(ProjectDir)$(ProjectName)PostBuild.cmd&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;set CONFIGURATIONNAME=$(ConfigurationName)&#x0D;&#x0A;set INPUTDIR=$(InputDir)&#x0D;&#x0A;set INPUTFILENAME=$(InputFileName)&#x0D;&#x0A;set INPUTPATH=$(InputPath)&#x0D;&#x0A;set INTDIR=$(IntDir)&#x0D;&#x0A;set LIBRARYCONFIGSUFFIX=$(LibraryConfigSuffix)&#x0D;&#x0A;set OUTDIR=$(OutDir)&#x0D;&#x0A;set PLATFORMNAME=$(PlatformName)&#x0D;&#x0A;set PROJECTDIR=$(ProjectDir)&#x0D;&#x0A;set PROJECTFILENAME=$(ProjectFileName)&#x0D;&#x0A;set PROJECTNAME=$(ProjectName)&#x0D;&#x0A;set PROJECTPATH=$(ProjectPath)&#x0D;&#x0A;set SOLUTIONDIR=$(SolutionDir)&#x0D;&#x0A;set SOLUTIONFILENAME=$(SolutionFileName)&#x0D;&#x0A;set SOLUTIONNAME=$(SolutionName)&#x0D;&#x0A;set SOLUTIONPATH=$(SolutionPath)&#x0D;&#x0A;set TARGETDIR=$(TargetDir)&#x0D;&#x0A;set TARGETEXT=$(TargetExt)&#x0D;&#x0A;set TARGETFILENAME=$(TargetFileName)&#x0D;&#x0A;set TARGETPATH=$(TargetPath)&#x0D;&#x0A;set WEBKITCONFIGSUFFIX=$(WebKitConfigSuffix)&#x0D;&#x0A;set WEBKITDLLCONFIGSUFFIX=$(WebKitDLLConfigSuffix)&#x0D;&#x0A;&#x0D;&#x0A;REM If any of the above variables didn&apos;t exist previously and&#x0D;&#x0A;REM were set to an empty string, set will set the errorlevel to 1,&#x0D;&#x0A;REM which will cause the project-specific script to think the build&#x0D;&#x0A;REM has failed. This cmd /c call will clear the errorlevel.&#x0D;&#x0A;cmd /c&#x0D;&#x0A;&#x0D;&#x0A;&quot;$(ProjectDir)$(ProjectName)PostBuild.cmd&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCPreBuildEventTool"
CommandLine="REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PreBuild.cmd file.&#x0D;&#x0A;if not exist &quot;$(ProjectDir)$(ProjectName)PreBuild.cmd&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;set CONFIGURATIONNAME=$(ConfigurationName)&#x0D;&#x0A;set INPUTDIR=$(InputDir)&#x0D;&#x0A;set INPUTFILENAME=$(InputFileName)&#x0D;&#x0A;set INPUTPATH=$(InputPath)&#x0D;&#x0A;set INTDIR=$(IntDir)&#x0D;&#x0A;set LIBRARYCONFIGSUFFIX=$(LibraryConfigSuffix)&#x0D;&#x0A;set OUTDIR=$(OutDir)&#x0D;&#x0A;set PLATFORMNAME=$(PlatformName)&#x0D;&#x0A;set PROJECTDIR=$(ProjectDir)&#x0D;&#x0A;set PROJECTFILENAME=$(ProjectFileName)&#x0D;&#x0A;set PROJECTNAME=$(ProjectName)&#x0D;&#x0A;set PROJECTPATH=$(ProjectPath)&#x0D;&#x0A;set SOLUTIONDIR=$(SolutionDir)&#x0D;&#x0A;set SOLUTIONFILENAME=$(SolutionFileName)&#x0D;&#x0A;set SOLUTIONNAME=$(SolutionName)&#x0D;&#x0A;set SOLUTIONPATH=$(SolutionPath)&#x0D;&#x0A;set TARGETDIR=$(TargetDir)&#x0D;&#x0A;set TARGETEXT=$(TargetExt)&#x0D;&#x0A;set TARGETFILENAME=$(TargetFileName)&#x0D;&#x0A;set TARGETPATH=$(TargetPath)&#x0D;&#x0A;set WEBKITCONFIGSUFFIX=$(WebKitConfigSuffix)&#x0D;&#x0A;set WEBKITDLLCONFIGSUFFIX=$(WebKitDLLConfigSuffix)&#x0D;&#x0A;&#x0D;&#x0A;&quot;$(ProjectDir)$(ProjectName)PreBuild.cmd&quot;&#x0D;&#x0A;"
CommandLine="REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PreBuild.cmd file.&#x0D;&#x0A;if not exist &quot;$(ProjectDir)$(ProjectName)PreBuild.cmd&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;set CONFIGURATIONNAME=$(ConfigurationName)&#x0D;&#x0A;set INPUTDIR=$(InputDir)&#x0D;&#x0A;set INPUTFILENAME=$(InputFileName)&#x0D;&#x0A;set INPUTPATH=$(InputPath)&#x0D;&#x0A;set INTDIR=$(IntDir)&#x0D;&#x0A;set LIBRARYCONFIGSUFFIX=$(LibraryConfigSuffix)&#x0D;&#x0A;set OUTDIR=$(OutDir)&#x0D;&#x0A;set PLATFORMNAME=$(PlatformName)&#x0D;&#x0A;set PROJECTDIR=$(ProjectDir)&#x0D;&#x0A;set PROJECTFILENAME=$(ProjectFileName)&#x0D;&#x0A;set PROJECTNAME=$(ProjectName)&#x0D;&#x0A;set PROJECTPATH=$(ProjectPath)&#x0D;&#x0A;set SOLUTIONDIR=$(SolutionDir)&#x0D;&#x0A;set SOLUTIONFILENAME=$(SolutionFileName)&#x0D;&#x0A;set SOLUTIONNAME=$(SolutionName)&#x0D;&#x0A;set SOLUTIONPATH=$(SolutionPath)&#x0D;&#x0A;set TARGETDIR=$(TargetDir)&#x0D;&#x0A;set TARGETEXT=$(TargetExt)&#x0D;&#x0A;set TARGETFILENAME=$(TargetFileName)&#x0D;&#x0A;set TARGETPATH=$(TargetPath)&#x0D;&#x0A;set WEBKITCONFIGSUFFIX=$(WebKitConfigSuffix)&#x0D;&#x0A;set WEBKITDLLCONFIGSUFFIX=$(WebKitDLLConfigSuffix)&#x0D;&#x0A;&#x0D;&#x0A;REM If any of the above variables didn&apos;t exist previously and&#x0D;&#x0A;REM were set to an empty string, set will set the errorlevel to 1,&#x0D;&#x0A;REM which will cause the project-specific script to think the build&#x0D;&#x0A;REM has failed. This cmd /c call will clear the errorlevel.&#x0D;&#x0A;cmd /c&#x0D;&#x0A;&#x0D;&#x0A;&quot;$(ProjectDir)$(ProjectName)PreBuild.cmd&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCPreLinkEventTool"
CommandLine="REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PreLink.cmd file.&#x0D;&#x0A;if not exist &quot;$(ProjectDir)$(ProjectName)PreLink.cmd&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;set CONFIGURATIONNAME=$(ConfigurationName)&#x0D;&#x0A;set INPUTDIR=$(InputDir)&#x0D;&#x0A;set INPUTFILENAME=$(InputFileName)&#x0D;&#x0A;set INPUTPATH=$(InputPath)&#x0D;&#x0A;set INTDIR=$(IntDir)&#x0D;&#x0A;set LIBRARYCONFIGSUFFIX=$(LibraryConfigSuffix)&#x0D;&#x0A;set OUTDIR=$(OutDir)&#x0D;&#x0A;set PLATFORMNAME=$(PlatformName)&#x0D;&#x0A;set PROJECTDIR=$(ProjectDir)&#x0D;&#x0A;set PROJECTFILENAME=$(ProjectFileName)&#x0D;&#x0A;set PROJECTNAME=$(ProjectName)&#x0D;&#x0A;set PROJECTPATH=$(ProjectPath)&#x0D;&#x0A;set SOLUTIONDIR=$(SolutionDir)&#x0D;&#x0A;set SOLUTIONFILENAME=$(SolutionFileName)&#x0D;&#x0A;set SOLUTIONNAME=$(SolutionName)&#x0D;&#x0A;set SOLUTIONPATH=$(SolutionPath)&#x0D;&#x0A;set TARGETDIR=$(TargetDir)&#x0D;&#x0A;set TARGETEXT=$(TargetExt)&#x0D;&#x0A;set TARGETFILENAME=$(TargetFileName)&#x0D;&#x0A;set TARGETPATH=$(TargetPath)&#x0D;&#x0A;set WEBKITCONFIGSUFFIX=$(WebKitConfigSuffix)&#x0D;&#x0A;set WEBKITDLLCONFIGSUFFIX=$(WebKitDLLConfigSuffix)&#x0D;&#x0A;&#x0D;&#x0A;&quot;$(ProjectDir)$(ProjectName)PreLink.cmd&quot;&#x0D;&#x0A;"
CommandLine="REM Do not edit from the Visual Studio IDE! Customize via a $(ProjectName)PreLink.cmd file.&#x0D;&#x0A;if not exist &quot;$(ProjectDir)$(ProjectName)PreLink.cmd&quot; exit /b&#x0D;&#x0A;&#x0D;&#x0A;set CONFIGURATIONNAME=$(ConfigurationName)&#x0D;&#x0A;set INPUTDIR=$(InputDir)&#x0D;&#x0A;set INPUTFILENAME=$(InputFileName)&#x0D;&#x0A;set INPUTPATH=$(InputPath)&#x0D;&#x0A;set INTDIR=$(IntDir)&#x0D;&#x0A;set LIBRARYCONFIGSUFFIX=$(LibraryConfigSuffix)&#x0D;&#x0A;set OUTDIR=$(OutDir)&#x0D;&#x0A;set PLATFORMNAME=$(PlatformName)&#x0D;&#x0A;set PROJECTDIR=$(ProjectDir)&#x0D;&#x0A;set PROJECTFILENAME=$(ProjectFileName)&#x0D;&#x0A;set PROJECTNAME=$(ProjectName)&#x0D;&#x0A;set PROJECTPATH=$(ProjectPath)&#x0D;&#x0A;set SOLUTIONDIR=$(SolutionDir)&#x0D;&#x0A;set SOLUTIONFILENAME=$(SolutionFileName)&#x0D;&#x0A;set SOLUTIONNAME=$(SolutionName)&#x0D;&#x0A;set SOLUTIONPATH=$(SolutionPath)&#x0D;&#x0A;set TARGETDIR=$(TargetDir)&#x0D;&#x0A;set TARGETEXT=$(TargetExt)&#x0D;&#x0A;set TARGETFILENAME=$(TargetFileName)&#x0D;&#x0A;set TARGETPATH=$(TargetPath)&#x0D;&#x0A;set WEBKITCONFIGSUFFIX=$(WebKitConfigSuffix)&#x0D;&#x0A;set WEBKITDLLCONFIGSUFFIX=$(WebKitDLLConfigSuffix)&#x0D;&#x0A;&#x0D;&#x0A;REM If any of the above variables didn&apos;t exist previously and&#x0D;&#x0A;REM were set to an empty string, set will set the errorlevel to 1,&#x0D;&#x0A;REM which will cause the project-specific script to think the build&#x0D;&#x0A;REM has failed. This cmd /c call will clear the errorlevel.&#x0D;&#x0A;cmd /c&#x0D;&#x0A;&#x0D;&#x0A;&quot;$(ProjectDir)$(ProjectName)PreLink.cmd&quot;&#x0D;&#x0A;"
/>
<Tool
Name="VCResourceCompilerTool"

0 comments on commit dee1305

Please sign in to comment.