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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/linux/unbundle/harfbuzz.gyp ('k') | third_party/harfbuzz-ng/harfbuzz.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/linux/unbundle/replace_gyp_files.py
diff --git a/build/linux/unbundle/replace_gyp_files.py b/build/linux/unbundle/replace_gyp_files.py
new file mode 100755
index 0000000000000000000000000000000000000000..bf2945863c061b3c08590ac81d93ee61d655c15e
--- /dev/null
+++ b/build/linux/unbundle/replace_gyp_files.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Replaces gyp files in tree with files from here that
+make the build use system libraries.
+"""
+
+
+import os.path
+import shutil
+import sys
+
+
+REPLACEMENTS = {
+ 'use_system_harfbuzz': 'third_party/harfbuzz-ng/harfbuzz.gyp',
+}
+
+
+def DoMain(argv):
+ my_dirname = os.path.dirname(__file__)
+ source_tree_root = os.path.abspath(
+ os.path.join(my_dirname, '..', '..', '..'))
+
+ for flag, path in REPLACEMENTS.items():
+ # Accept arguments in gyp command-line syntax, and ignore other
+ # parameters, so that the caller can re-use command-line for this
+ # script and gyp.
+ if '-D%s=1' % flag not in argv:
+ continue
+
+ # Copy the gyp file from directory of this script to target path.
+ shutil.copyfile(os.path.join(my_dirname, os.path.basename(path)),
+ os.path.join(source_tree_root, path))
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(DoMain(sys.argv))
« 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