summaryrefslogtreecommitdiffstats
path: root/PCbuild
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-11-22 19:48:52 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-11-22 19:48:52 (GMT)
commit02a4018c6e375cfa8d828fa7f4c34c9de82a3df2 (patch)
treee88b1684fee212492e6518396d2bf20969131390 /PCbuild
parentbcf4dccfa77df6fd75181e2a7cbfbf2d4b2c6255 (diff)
downloadcpython-02a4018c6e375cfa8d828fa7f4c34c9de82a3df2.zip
cpython-02a4018c6e375cfa8d828fa7f4c34c9de82a3df2.tar.gz
cpython-02a4018c6e375cfa8d828fa7f4c34c9de82a3df2.tar.bz2
Issue #28573: Missing sys._mercurial info and other build issues.
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/pythoncore.vcxproj13
1 files changed, 10 insertions, 3 deletions
diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj
index 963da89..89415ae 100644
--- a/PCbuild/pythoncore.vcxproj
+++ b/PCbuild/pythoncore.vcxproj
@@ -406,14 +406,21 @@
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">
- <Exec Command="hg id -b &gt; &quot;$(IntDir)hgbranch.txt&quot;" ContinueOnError="true" />
- <Exec Command="hg id -i &gt; &quot;$(IntDir)hgversion.txt&quot;" ContinueOnError="true" />
- <Exec Command="hg id -t &gt; &quot;$(IntDir)hgtag.txt&quot;" ContinueOnError="true" />
+ <PropertyGroup>
+ <HG Condition="$(HG) == ''">hg</HG>
+ <_HG>$(HG)</_HG>
+ <_HG Condition="$(HG.Contains(` `))">"$(HG)"</_HG>
+ </PropertyGroup>
+ <Message Text="Getting build info from $(_HG)" Importance="high" />
+ <Exec Command="$(_HG) id -b &gt; &quot;$(IntDir)hgbranch.txt&quot;" ContinueOnError="true" />
+ <Exec Command="$(_HG) id -i &gt; &quot;$(IntDir)hgversion.txt&quot;" ContinueOnError="true" />
+ <Exec Command="$(_HG) id -t &gt; &quot;$(IntDir)hgtag.txt&quot;" ContinueOnError="true" />
<PropertyGroup>
<HgBranch Condition="Exists('$(IntDir)hgbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgbranch.txt').Trim())</HgBranch>
<HgVersion Condition="Exists('$(IntDir)hgversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgversion.txt').Trim())</HgVersion>
<HgTag Condition="Exists('$(IntDir)hgtag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgtag.txt').Trim())</HgTag>
</PropertyGroup>
+ <Message Text="Building $(HgTag):$(HgVersion) $(HgBranch)" Importance="high" />
<ItemGroup>
<ClCompile Include="..\Modules\getbuildinfo.c">
<PreprocessorDefinitions>HGVERSION="$(HgVersion)";HGTAG="$(HgTag)";HGBRANCH="$(HgBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>