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

Unified Diff: gyp_skia

Issue 199873003: gyp_skia: make default GYP_GENERATORS for each platform explicit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: added cygwin Created 6 years, 9 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gyp_skia
diff --git a/gyp_skia b/gyp_skia
index b4f9e74de9d345275644fc0d70a69ef404cf78b7..1ba6fc78e86360c4dc712e7b55a480899fa5d562 100755
--- a/gyp_skia
+++ b/gyp_skia
@@ -28,6 +28,9 @@ gyp_config_dir = os.path.join(script_dir, 'gyp')
sys.path.insert(0, os.path.join(gyp_source_dir, 'pylib'))
import gyp
+ENVVAR_GYP_GENERATORS = 'GYP_GENERATORS'
+
+
def additional_include_files(args=[]):
# Determine the include files specified on the command line.
# This doesn't cover all the different option formats you can use,
@@ -62,9 +65,9 @@ def get_output_dir():
if not output_dir:
return os.path.join(os.path.abspath(script_dir), 'out')
- if (sys.platform.startswith('darwin') and
- (not os.getenv('GYP_GENERATORS') or
- 'xcode' in os.getenv('GYP_GENERATORS'))):
+ if (sys.platform.startswith('darwin') and
+ (not os.getenv(ENVVAR_GYP_GENERATORS) or
+ 'xcode' in os.getenv(ENVVAR_GYP_GENERATORS))):
print 'ERROR: variable SKIA_OUT is not valid on Mac (using xcodebuild)'
sys.exit(-1);
@@ -77,6 +80,20 @@ def get_output_dir():
if __name__ == '__main__':
args = sys.argv[1:]
+ if not os.getenv(ENVVAR_GYP_GENERATORS):
+ print ('%s environment variable not set, using default' %
+ ENVVAR_GYP_GENERATORS)
+ if sys.platform.startswith('darwin'):
+ default_gyp_generators = 'xcode'
+ elif sys.platform.startswith('win'):
+ default_gyp_generators = 'msvs'
+ elif sys.platform.startswith('cygwin'):
+ default_gyp_generators = 'msvs'
+ else:
+ default_gyp_generators = 'make'
+ os.environ[ENVVAR_GYP_GENERATORS] = default_gyp_generators
+ print '%s is "%s"' % (ENVVAR_GYP_GENERATORS, os.getenv(ENVVAR_GYP_GENERATORS))
+
# Set CWD to the directory containing this script.
# This allows us to launch it from other directories, in spite of gyp's
# finickyness about the current working directory.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698