summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py')
-rw-r--r--Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py19
1 files changed, 14 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py
index ab1df83..e12840f 100644
--- a/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py
+++ b/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/react-to-vsprops-changes.py
@@ -19,11 +19,14 @@ def main():
# Delete any manifest-related files because Visual Studio isn't smart
# enough to figure out that it might need to rebuild them.
obj_directory = os.path.join(os.environ['CONFIGURATIONBUILDDIR'], 'obj')
- for manifest_file in glob.iglob(os.path.join(obj_directory, '*', '*', '*.manifest*')):
- manifest_time = os.path.getmtime(manifest_file)
- if manifest_time < newest_vsprops_time:
- print 'Deleting %s' % manifest_file
- os.remove(manifest_file)
+ for manifest_file in glob.iglob(os.path.join(obj_directory, '*', '*.manifest*')):
+ delete_if_older_than(manifest_file, newest_vsprops_time)
+
+ # Delete any precompiled headers because Visual Studio isn't smart enough
+ # to figure out that it might need to rebuild them, even if we touch
+ # wtf/Platform.h below.
+ for precompiled_header in glob.iglob(os.path.join(obj_directory, '*', '*.pch')):
+ delete_if_older_than(precompiled_header, newest_vsprops_time)
# Touch wtf/Platform.h so all files will be recompiled. This is necessary
# to pick up changes to preprocessor macros (e.g., ENABLE_*).
@@ -33,5 +36,11 @@ def main():
os.utime(wtf_platform_h, None)
+def delete_if_older_than(path, reference_time):
+ if os.path.getmtime(path) < reference_time:
+ print 'Deleting %s' % path
+ os.remove(path)
+
+
if __name__ == '__main__':
sys.exit(main())