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

Unified Diff: build/gyp_pdfium

Issue 298893007: Create a standalone pdfium build. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: upload after squashing Created 6 years, 7 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/all.gyp ('k') | build/gyp_pdfium.py » ('j') | build/standalone.gypi » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/gyp_pdfium
diff --git a/build/gyp_pdfium b/build/gyp_pdfium
new file mode 100644
index 0000000000000000000000000000000000000000..0458b96d134f5dc1049a23fbc2f05db277b12e6f
--- /dev/null
+++ b/build/gyp_pdfium
@@ -0,0 +1,46 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 PDFium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# This script is wrapper for PDFium that adds some support for how GYP
+# is invoked by PDFium beyond what can be done in the gclient hooks.
+
+import os
+import platform
+import sys
+
+script_dir = os.path.dirname(os.path.realpath(__file__))
+pdfium_root = os.path.abspath(os.path.join(script_dir, os.pardir))
+
+sys.path.insert(0, os.path.join(pdfium_root, 'build', 'gyp', 'pylib'))
+import gyp
+
+
+def run_gyp(args):
+ rc = gyp.main(args)
+ if rc != 0:
+ print 'Error running GYP'
+ sys.exit(rc)
+
+
+def main():
+ args = sys.argv[1:]
+ args.append(os.path.join(script_dir, 'all.gyp'))
+
+ args.append('-I')
+ args.append(os.path.join(pdfium_root, 'build', 'standalone.gypi'))
+
+ args.extend(['-D', 'gyp_output_dir=out'])
+
+ # Set the GYP DEPTH variable to the root of the PDFium project.
+ args.append('--depth=' + os.path.relpath(pdfium_root))
+
+ print 'Updating projects from gyp files...'
+ sys.stdout.flush()
+
+ run_gyp(args)
+
Nico 2014/05/24 23:14:23 (nit: style guide says 2 empty lines between pytho
jam 2014/05/27 01:46:21 will fix in a followup
+if __name__ == '__main__':
+ sys.exit(main())
« no previous file with comments | « build/all.gyp ('k') | build/gyp_pdfium.py » ('j') | build/standalone.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698