diff --git a/.gitignore b/.gitignore index 8eb4781ea1..dd51cf6320 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ .pydevproject .repo .settings -/out/ +/out* /packager/base/ /packager/build/ /packager/buildtools/ diff --git a/gyp_packager.py b/gyp_packager.py index 077cdc0288..316b02b2e6 100755 --- a/gyp_packager.py +++ b/gyp_packager.py @@ -91,12 +91,14 @@ if __name__ == '__main__': if ['--depth' in arg for arg in args].count(True) == 0: args.append('--depth=packager') - output_dir = os.path.join(checkout_dir, 'out') - gyp_generator_flags = 'output_dir="' + output_dir + '"' - if os.environ.get('GYP_GENERATOR_FLAGS'): - os.environ['GYP_GENERATOR_FLAGS'] += ' ' + gyp_generator_flags - else: - os.environ['GYP_GENERATOR_FLAGS'] = gyp_generator_flags + if (not os.environ.get('GYP_GENERATOR_FLAGS') or + ('output_dir=' not in os.environ.get('GYP_GENERATOR_FLAGS'))): + output_dir = os.path.join(checkout_dir, 'out') + gyp_generator_flags = 'output_dir="' + output_dir + '"' + if os.environ.get('GYP_GENERATOR_FLAGS'): + os.environ['GYP_GENERATOR_FLAGS'] += ' ' + gyp_generator_flags + else: + os.environ['GYP_GENERATOR_FLAGS'] = gyp_generator_flags print 'Updating projects from gyp files...' sys.stdout.flush()