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

Side by Side 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, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2012 Google Inc. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import shutil
6 import os
7
8 prefixes = ["../third_party/WebKit/Source/WebCore/platform/graphics/chromium",
9 "../third_party/WebKit/Source/WebCore/platform/graphics/chromium/cc" ,
10 "../third_party/WebKit/Source/WebKit/chromium/tests"]
11
12 def Copy(name):
13 src = name
14 dst = name
15 if name.startswith("stubs"):
16 return
17 if name == "test/RunAllTests.cpp":
18 return
19 if name.startswith("test/"):
20 src = src[5:]
21 fullsrc = ""
22 for prefix in prefixes:
23 candidate = "%s/%s" % (prefix, src)
24 if os.path.exists(candidate):
25 fullsrc = candidate
26 break
27 if fullsrc == "":
28 print "could not find %s to copy" % name
29 return
30 shutil.copyfile(fullsrc, dst)
31 print "copying from %s to %s" % (fullsrc, dst)
32
33 def Readfile(gypfile):
34 cc_gyp = open(gypfile, "r")
35 obj = eval(cc_gyp.read())
36 cc_gyp.close()
37
38 return obj
39
40 def Main():
41 files = Readfile("cc.gyp")['variables']['cc_source_files']
42 for f in files:
43 Copy(f)
44
45 files = Readfile("cc_tests.gyp")['variables']['cc_tests_source_files']
46 for f in files:
47 Copy(f)
48
49 if __name__ == '__main__':
50 import sys
51 os.chdir(os.path.dirname(__file__))
52 sys.exit(Main())
OLDNEW
« 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