Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2702)

Unified Diff: cc/copyfiles.py

Issue 10828381: libcc and webkit_compositor targets + stubs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Slightly better scripts and updated README Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/copyfiles.py
diff --git a/cc/copyfiles.py b/cc/copyfiles.py
new file mode 100644
index 0000000000000000000000000000000000000000..2bb623cb256e18f6c36ab8b75783c07784e7eb26
--- /dev/null
+++ b/cc/copyfiles.py
@@ -0,0 +1,52 @@
+# Copyright (c) 2012 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import shutil
+import os
+
+prefixes = ["../third_party/WebKit/Source/WebCore/platform/graphics/chromium",
+ "../third_party/WebKit/Source/WebCore/platform/graphics/chromium/cc",
+ "../third_party/WebKit/Source/WebKit/chromium/tests"]
+
+def Copy(name):
+ src = name
+ dst = name
+ if name.startswith("stubs"):
+ return
+ if name == "test/RunAllTests.cpp":
+ return
+ if name.startswith("test/"):
+ src = src[5:]
+ fullsrc = ""
+ for prefix in prefixes:
+ candidate = "%s/%s" % (prefix, src)
+ if os.path.exists(candidate):
+ fullsrc = candidate
+ break
+ if fullsrc == "":
+ print "could not find %s to copy" % name
+ return
+ shutil.copyfile(fullsrc, dst)
+ print "copying from %s to %s" % (fullsrc, dst)
+
+def Readfile(gypfile):
+ cc_gyp = open(gypfile, "r")
+ obj = eval(cc_gyp.read())
+ cc_gyp.close()
+
+ return obj
+
+def Main():
+ files = Readfile("cc.gyp")['variables']['cc_source_files']
+ for f in files:
+ Copy(f)
+
+ files = Readfile("cc_tests.gyp")['variables']['cc_tests_source_files']
+ for f in files:
+ Copy(f)
+
+if __name__ == '__main__':
+ import sys
+ os.chdir(os.path.dirname(__file__))
+ sys.exit(Main())
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/stubs/Extensions3D.h » ('j') | cc/test/RunAllTests.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698