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

Side by Side Diff: build/linux/unbundle/replace_gyp_files.py

Issue 13732002: Linux: move use_system_harfbuzz logic out of the main file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: command line examples in README Created 7 years, 8 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
« no previous file with comments | « build/linux/unbundle/harfbuzz.gyp ('k') | third_party/harfbuzz-ng/harfbuzz.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 """
7 Replaces gyp files in tree with files from here that
8 make the build use system libraries.
9 """
10
11
12 import os.path
13 import shutil
14 import sys
15
16
17 REPLACEMENTS = {
18 'use_system_harfbuzz': 'third_party/harfbuzz-ng/harfbuzz.gyp',
19 }
20
21
22 def DoMain(argv):
23 my_dirname = os.path.dirname(__file__)
24 source_tree_root = os.path.abspath(
25 os.path.join(my_dirname, '..', '..', '..'))
26
27 for flag, path in REPLACEMENTS.items():
28 # Accept arguments in gyp command-line syntax, and ignore other
29 # parameters, so that the caller can re-use command-line for this
30 # script and gyp.
31 if '-D%s=1' % flag not in argv:
32 continue
33
34 # Copy the gyp file from directory of this script to target path.
35 shutil.copyfile(os.path.join(my_dirname, os.path.basename(path)),
36 os.path.join(source_tree_root, path))
37
38 return 0
39
40
41 if __name__ == '__main__':
42 sys.exit(DoMain(sys.argv))
OLDNEW
« no previous file with comments | « build/linux/unbundle/harfbuzz.gyp ('k') | third_party/harfbuzz-ng/harfbuzz.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698