From 6e5e54e39d8e542077acdafe8cf9033b1ca9acce Mon Sep 17 00:00:00 2001 From: "mnaganov@chromium.org" Date: Fri, 13 Nov 2009 22:05:19 +0000 Subject: DevTools: touch resource dir in generator scripts on Mac. This is to ensure that Xcode will copy re-generated files to framework resources. BUG=none TEST=none Review URL: http://codereview.chromium.org/384129 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31954 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/build/concatenate_js_files.py | 8 +++++++- webkit/build/generate_devtools_html.py | 15 +++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) (limited to 'webkit/build') diff --git a/webkit/build/concatenate_js_files.py b/webkit/build/concatenate_js_files.py index b6d7efc..bc96de3 100755 --- a/webkit/build/concatenate_js_files.py +++ b/webkit/build/concatenate_js_files.py @@ -37,7 +37,7 @@ def main(argv): full_paths = {} for full_path in argv[2:]: - (dir_name, file_name) = os.path.split(full_path) + file_name = os.path.basename(full_path) if file_name.endswith('.js'): full_paths[file_name] = full_path @@ -60,5 +60,11 @@ def main(argv): output_file.close() output.close() + # Touch output file directory to make sure that Xcode will copy + # modified resource files. + if sys.platform == 'darwin': + output_dir_name = os.path.dirname(output_file_name) + os.utime(output_dir_name, None) + if __name__ == '__main__': sys.exit(main(sys.argv)) diff --git a/webkit/build/generate_devtools_html.py b/webkit/build/generate_devtools_html.py index 5160fc2..82f9490 100755 --- a/webkit/build/generate_devtools_html.py +++ b/webkit/build/generate_devtools_html.py @@ -22,8 +22,10 @@ def main(argv): print 'usage: %s inspector_html devtools_html css_and_js_files_list' % argv[0] return 1 - inspector_html = open(argv[1], 'r') - devtools_html = open(argv[2], 'w') + inspector_html_name = argv[1] + devtools_html_name = argv[2] + inspector_html = open(inspector_html_name, 'r') + devtools_html = open(devtools_html_name, 'w') for line in inspector_html: if '' in line: @@ -33,5 +35,14 @@ def main(argv): devtools_html.write(' \n') devtools_html.write(line) + devtools_html.close() + inspector_html.close() + + # Touch output file directory to make sure that Xcode will copy + # modified resource files. + if sys.platform == 'darwin': + output_dir_name = os.path.dirname(devtools_html_name) + os.utime(output_dir_name, None) + if __name__ == '__main__': sys.exit(main(sys.argv)) -- cgit v1.1