diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-20 19:59:09 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-03-20 19:59:09 +0000 |
commit | 7225506621e7102e8c3c5b4c9f29ac20851bc25a (patch) | |
tree | d5fe45dfdac34ea2024eb32f0c04b5137078fa2b | |
parent | e65f1fa7bc0a4c60ba4b4f104f4c81e65087fd5a (diff) |
gyp_skia: make default GYP_GENERATORS for each platform explicit
BUG=skia:2317
R=bungeman@google.com
Author: epoger@google.com
Review URL: https://codereview.chromium.org/199873003
git-svn-id: http://skia.googlecode.com/svn/trunk@13883 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-x | gyp_skia | 23 |
1 files changed, 20 insertions, 3 deletions
@@ -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. |