From 29c8c8aecb3409e57a43256f8fe5cb25de1e9856 Mon Sep 17 00:00:00 2001
From: stijn
Date: Sat, 23 Apr 2016 18:55:14 +0200
Subject: windows/msvc: Rewrite qstr auto-generation.
Builds have been broken since reworking autogeneration in c618f91 and
related, this gets fixed here by applying similar qstr generation logic
for the msvc builds: c files are only preprocessed when changed (or not
yet preprocessed) and the concatenated output is fed into makeqstrdefs.py.
To speed up this process, the concatenated output is already filtered to
contain only lines which makeqstrdefs really needs: this makes the qstr
generation stage about twice as fast (checked on different machines).
---
windows/msvc/genhdr.targets | 83 ++++++++++++++++++++++++---------------------
1 file changed, 44 insertions(+), 39 deletions(-)
diff --git a/windows/msvc/genhdr.targets b/windows/msvc/genhdr.targets
index a2b4c8096..ba0681f55 100644
--- a/windows/msvc/genhdr.targets
+++ b/windows/msvc/genhdr.targets
@@ -3,7 +3,7 @@
-
+
@@ -11,65 +11,70 @@
$(PyBuildDir)genhdr\
$(PyBaseDir)py\
$(PyBaseDir)unix\qstrdefsport.h
+ $(PySrcDir)qstrdefs.h
$(DestDir)qstrdefscollected.h
$(DestDir)qstrdefs.generated.h
python
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+ $([System.String]::new('%(FullPath)').Replace('$(PyBaseDir)', '$(DestDir)qstr\'))
+
- $([System.String]::new('%(FullPath)').Replace('$(PyBaseDir)', '$(DestDir)'))
+ $([System.IO.Path]::ChangeExtension('%(OutFile)', '.pp'))
+ $([System.IO.Path]::GetDirectoryName('%(OutFile)'))
- $([System.IO.Path]::ChangeExtension('%(Qstr)', '.qstr'))
- $([System.IO.Path]::ChangeExtension('%(Qstr)', '.pp'))
- $([System.IO.Path]::GetDirectoryName('%(Qstr)'))
- $([System.String]::new('%(FileName)').Contains('qstrdefs'))
+ $([System.DateTime]::Compare($([System.IO.File]::GetLastWriteTime('%(FullPath)')), $([System.IO.File]::GetLastWriteTime('%(OutFile)'))))
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
- $(DestFile).tmp
+ $(QstrGen).tmp
-
+
+
--
cgit v1.2.3