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

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: fix error from patch getting conffused by safec++ 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
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..40c10e74944de7ae87063265e6f7cec7ca95b99a
--- /dev/null
+++ b/experimental/webtry/gyp_for_webtry
@@ -0,0 +1,36 @@
+#!/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, "..", "..") ))
jcgregorio 2014/09/17 15:00:07 No space after join( Nor between ) ))
humper 2014/09/17 15:08:23 Done.
+gyp_source_dir = os.path.join(skia_src, 'third_party', 'externals', 'gyp')
+
+sys.path.insert(0, os.path.abspath(os.path.join(gyp_source_dir, 'pylib')))
+import gyp
+
+if __name__ == '__main__':
+ args = sys.argv[2:]
jcgregorio 2014/09/17 15:00:07 Check for correct # of args and exit if not correc
humper 2014/09/17 15:08:23 Done.
+
+ 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', os.path.join( script_dir, "..", "..", "..", "cache" ) ))
jcgregorio 2014/09/17 15:00:07 Getting a little long, maybe break out os.path.joi
humper 2014/09/17 15:08:23 Done.
+ webtry_inout_dir = os.path.abspath(os.environ.get('WEBTRY_INOUT', os.path.join( script_dir, "..", "..", "..", "inout" ) ))
+
+ 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))

Powered by Google App Engine
This is Rietveld 408576698