From db9c2e310e0039c8280256c17ac338f31bcbd9cc Mon Sep 17 00:00:00 2001 From: stijn Date: Mon, 3 Apr 2017 13:16:12 +0200 Subject: [PATCH] msvc: Rebuild all qstrs when mpconfig headers are modified Make qstr generation depend on modifications in mpconfigport.h, mpconfig.h and makeqstrdata.py and if any of those change scan all source files for qstrs again since they might have changed (for example typcially when enabling new features in mpconfig.h). This fixes #2982 for msvc builds. --- windows/msvc/genhdr.targets | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/windows/msvc/genhdr.targets b/windows/msvc/genhdr.targets index afe5f5d765..5792d878ec 100644 --- a/windows/msvc/genhdr.targets +++ b/windows/msvc/genhdr.targets @@ -43,8 +43,13 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { + + + + + - + @@ -56,15 +61,21 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) { $([System.IO.Path]::GetDirectoryName('%(OutFile)')) - $([System.DateTime]::Compare($([System.IO.File]::GetLastWriteTime('%(FullPath)')), $([System.IO.File]::GetLastWriteTime('%(OutFile)')))) + True + + True + + + @(QstrDependencies->AnyHaveMetadataValue('Changed', 'True')) + + Condition="'%(PyQstrSourceFiles.Changed)' == 'True' Or '$(ForceQstrRebuild)' == 'True'"/> + Condition="@(PyQstrSourceFiles->AnyHaveMetadataValue('Changed', 'True')) Or '$(ForceQstrRebuild)' == 'True'"/>