summaryrefslogtreecommitdiffstats
path: root/PCbuild
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-07-16 23:13:19 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-07-16 23:13:19 (GMT)
commit6fd76bceda3fefc5e5814108c5fe819050613d33 (patch)
treef8acf1d6f83647788e50ca1ad2b530b1a4f33560 /PCbuild
parentff1d5ab16e6424cf000be314e3c5ca8e42ae43f4 (diff)
downloadcpython-6fd76bceda3fefc5e5814108c5fe819050613d33.zip
cpython-6fd76bceda3fefc5e5814108c5fe819050613d33.tar.gz
cpython-6fd76bceda3fefc5e5814108c5fe819050613d33.tar.bz2
Fixes use of Py_IntDir and Py_OutDir to control build directories.
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/pcbuild.proj32
-rw-r--r--PCbuild/pyproject.props11
-rw-r--r--PCbuild/python.props9
3 files changed, 41 insertions, 11 deletions
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
index a661848..b849783 100644
--- a/PCbuild/pcbuild.proj
+++ b/PCbuild/pcbuild.proj
@@ -21,6 +21,15 @@
<CleanAllTarget>CleanAll</CleanAllTarget>
<BuildInParallel>true</BuildInParallel>
</Projects>
+ <Projects2>
+ <Platform>$(Platform)</Platform>
+ <Configuration>$(Configuration)</Configuration>
+ <Properties></Properties>
+ <BuildTarget>Build</BuildTarget>
+ <CleanTarget>Clean</CleanTarget>
+ <CleanAllTarget>CleanAll</CleanAllTarget>
+ <BuildInParallel>true</BuildInParallel>
+ </Projects2>
</ItemDefinitionGroup>
<ItemGroup>
<!-- pythonXY.dll -->
@@ -35,6 +44,8 @@
</Projects>
<!-- python3.dll -->
<Projects Include="python3dll.vcxproj" />
+ <!-- pyshellext.dll -->
+ <Projects Include="pyshellext.vcxproj" />
<!-- py[w].exe -->
<Projects Include="pylauncher.vcxproj;pywlauncher.vcxproj" />
<!-- _freeze_importlib -->
@@ -58,9 +69,9 @@
</Projects>
<!-- python[w].exe -->
- <Projects Include="python.vcxproj;pythonw.vcxproj">
+ <Projects2 Include="python.vcxproj;pythonw.vcxproj">
<BuildInParallel>false</BuildInParallel>
- </Projects>
+ </Projects2>
</ItemGroup>
<Target Name="Build">
@@ -69,9 +80,20 @@
BuildInParallel="%(BuildInParallel)"
StopOnFirstFailure="true"
Targets="%(BuildTarget)" />
+ <MSBuild Projects="@(Projects2)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ StopOnFirstFailure="true"
+ Targets="%(BuildTarget)" />
</Target>
<Target Name="Clean">
+ <MSBuild Projects="@(Projects2)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ StopOnFirstFailure="false"
+ Condition="%(CleanTarget) != ''"
+ Targets="%(CleanTarget)" />
<MSBuild Projects="@(Projects)"
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
BuildInParallel="%(BuildInParallel)"
@@ -81,6 +103,12 @@
</Target>
<Target Name="CleanAll">
+ <MSBuild Projects="@(Projects2)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ StopOnFirstFailure="false"
+ Condition="%(CleanAllTarget) != ''"
+ Targets="%(CleanAllTarget)" />
<MSBuild Projects="@(Projects)"
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
BuildInParallel="%(BuildInParallel)"
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props
index c56292a..a3a9c2b 100644
--- a/PCbuild/pyproject.props
+++ b/PCbuild/pyproject.props
@@ -4,10 +4,8 @@
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<OutDir>$(BuildPath)</OutDir>
- <OutDir Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)</OutDir>
<OutDir Condition="!HasTrailingSlash($(OutDir))">$(OutDir)\</OutDir>
- <Py_IntDir Condition="'$(Py_IntDir)' == ''">$(SolutionDir)obj\</Py_IntDir>
- <IntDir Condition="!HasTrailingSlash($(IntDir))">$(IntDir)\</IntDir>
+ <Py_IntDir Condition="'$(PyIntDir)' == ''">$(SolutionDir)obj\</Py_IntDir>
<IntDir>$(Py_IntDir)\$(ArchName)_$(Configuration)\$(ProjectName)\</IntDir>
<IntDir Condition="$(Configuration) == 'PGInstrument' or $(Configuration) == 'PGUpdate'">$(Py_IntDir)\$(ArchName)_PGO\$(ProjectName)\</IntDir>
<TargetName Condition="'$(TargetName)' == ''">$(ProjectName)</TargetName>
@@ -29,7 +27,7 @@
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
- <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(PySourcePath)Include;$(PySourcePath)PC;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;$(_PlatformPreprocessorDefinition)$(_DebugPreprocessorDefinition)$(_PydPreprocessorDefinition)%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Optimization>MaxSpeed</Optimization>
@@ -85,9 +83,8 @@
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TargetEnvironment Condition="'$(Platform)' == 'x64'">X64</TargetEnvironment>
- <TypeLibraryName>$(OutDir)wininst.tlb</TypeLibraryName>
- <HeaderFileName>
- </HeaderFileName>
+ <TypeLibraryName>$(OutDir)%(Filename).tlb</TypeLibraryName>
+ <HeaderFileName>$(IntDir)%(Filename)_h.h</HeaderFileName>
</Midl>
</ItemDefinitionGroup>
diff --git a/PCbuild/python.props b/PCbuild/python.props
index 843771d..ee70210 100644
--- a/PCbuild/python.props
+++ b/PCbuild/python.props
@@ -32,8 +32,13 @@
<PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath>
<!-- Directory where build outputs are put -->
- <BuildPath Condition="'$(PyBuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>
- <BuildPath Condition="'$(PyBuildPath)' != ''">$(PyBuildPath)</BuildPath>
+ <BuildPath32 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\win32\</BuildPath32>
+ <BuildPath32 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32\</BuildPath32>
+ <BuildPath64 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCBuild\amd64\</BuildPath64>
+ <BuildPath64 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\amd64\</BuildPath64>
+ <BuildPath Condition="'$(ArchName)' == 'win32'">$(BuildPath32)</BuildPath>
+ <BuildPath Condition="'$(ArchName)' == 'amd64'">$(BuildPath64)</BuildPath>
+ <BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCBuild\$(ArchName)\</BuildPath>
<BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath>
<!-- Directories of external projects. tcltk is handled in tcltk.props -->