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

Unified Diff: experimental/webtry/gyp_for_webtry

Issue 553333004: gyp build of skfiddle apps, take 2 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address formatting and error checking comments from Joe Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « experimental/webtry/build ('k') | experimental/webtry/res/css/webtry.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/webtry/gyp_for_webtry
diff --git a/experimental/webtry/gyp_for_webtry b/experimental/webtry/gyp_for_webtry
new file mode 100755
index 0000000000000000000000000000000000000000..374c02abe2e3b99692727bf9c3dd566642da33e0
--- /dev/null
+++ b/experimental/webtry/gyp_for_webtry
@@ -0,0 +1,43 @@
+#!/usr/bin/python
+import os
+import sys
+
+script_dir = os.path.dirname(__file__)
+
+skia_src = os.path.abspath(os.environ.get('SKIA_SRC', os.path.join( script_dir, "..", "..")))
+gyp_source_dir = os.path.join(skia_src, 'third_party', 'externals', 'gyp')
+
+WEBTRY_CACHE_DEFAULT = os.path.join(script_dir, "..", "..", "..", "cache")
+WEBTRY_INOUT_DEFAULT = os.path.join(script_dir, "..", "..", "..", "inout")
+
+sys.path.insert(0, os.path.abspath(os.path.join(gyp_source_dir, 'pylib')))
+import gyp
+
+if __name__ == '__main__':
+ if len(sys.argv) < 2:
+ print "Usage: gyp_for_webtry [code hash value]"
+ sys.exit(-1)
+
+ args = sys.argv[2:]
+
+ if not os.environ.get('GYP_GENERATORS'):
+ os.environ['GYP_GENERATORS'] = 'ninja'
+
+ args.append('--check')
+ args.append('-I%s/gyp/common.gypi' % skia_src)
+ args.extend(['--depth', '.'])
+ webtry_cache_dir = os.path.abspath(os.environ.get('WEBTRY_CACHE', WEBTRY_CACHE_DEFAULT))
+ webtry_inout_dir = os.path.abspath(os.environ.get('WEBTRY_INOUT', WEBTRY_INOUT_DEFAULT))
+
+ args.append('-Goutput_dir=%s' % webtry_inout_dir)
+
+ args.append(os.path.join(webtry_cache_dir, '%s.gyp' % sys.argv[1]))
+
+ # gyp is really picky about the current working directory having src/ under it
+ os.chdir(webtry_cache_dir)
+
+ os.environ['CC'] = '../../skia/experimental/webtry/safec'
+ os.environ['CXX'] = '../../skia/experimental/webtry/safec++'
+ os.environ['LD'] = '../../skia/experimental/webtry/safec++'
+
+ sys.exit(gyp.main(args))
« no previous file with comments | « experimental/webtry/build ('k') | experimental/webtry/res/css/webtry.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698