summaryrefslogtreecommitdiffstatshomepage
path: root/windows/msvc/common.props
diff options
context:
space:
mode:
Diffstat (limited to 'windows/msvc/common.props')
-rw-r--r--windows/msvc/common.props27
1 files changed, 23 insertions, 4 deletions
diff --git a/windows/msvc/common.props b/windows/msvc/common.props
index 73103f627a..cfb6adbc14 100644
--- a/windows/msvc/common.props
+++ b/windows/msvc/common.props
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets">
- <Import Project="env.props" />
+ <Import Project="paths.props" Condition="'$(PyPathsIncluded)' != 'True'"/>
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<OutDir>$(PyOutDir)</OutDir>
- <IntDir>$(PyBuildDir)$(Configuration)$(Platform)\</IntDir>
- <PyIncDirs>$(PyBaseDir);$(PyBaseDir)windows;$(PyBaseDir)windows\msvc;$(PyBuildDir)</PyIncDirs>
+ <IntDir>$(PyIntDir)</IntDir>
+ <PyFileCopyCookie>$(PyBuildDir)copycookie$(Configuration)$(Platform)</PyFileCopyCookie>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
@@ -22,5 +22,24 @@
<GenerateMapFile>true</GenerateMapFile>
</Link>
</ItemDefinitionGroup>
- <ItemGroup />
+ <ItemGroup>
+ <PyOutputFiles Include="$(TargetPath)">
+ <Destination>$(PyWinDir)%(FileName)%(Extension)</Destination>
+ </PyOutputFiles>
+ <PyCookieFiles Include="$(PyBuildDir)copycookie*" Exclude="$(PyFileCopyCookie)"/>
+ </ItemGroup>
+
+ <!-- Copy PyOutputFiles to their target destination.
+ To force this when switching between platforms/configurations which are already up-to-date (and as such,
+ for which a build wouldn't even start because all outputs are effectively newer than the inputs)
+ an empty file $(PyFileCopyCookie) is created serving as a record to indicate what was last copied,
+ and any previous records are deleted. So when switching between builds which are otherwise up-to-date
+ the tracker will notice a missing file and a build is started anyway (and it will just copy our files). -->
+ <Target Name="CopyFilesToWinDir" AfterTargets="Build"
+ Inputs="$(TargetPath)" Outputs="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')">
+ <Delete Files="@(PyCookieFiles)"/>
+ <Touch Files="$(PyFileCopyCookie)" AlwaysCreate="true"/>
+ <Copy SourceFiles="%(PyOutputFiles.Identity)" DestinationFiles="%(PyOutputFiles.Destination)"/>
+ <WriteLinesToFile File="$(TLogLocation)$(ProjectName).write.u.tlog" Lines="$(PyFileCopyCookie);@(PyOutputFiles->'%(Destination)')" Overwrite="True"/>
+ </Target>
</Project>