diff options
author | Steven R. Loomis <srl@icu-project.org> | 2014-10-03 17:42:37 -0700 |
---|---|---|
committer | Trevor Norris <trev.norris@gmail.com> | 2014-10-07 15:17:44 -0700 |
commit | f769d133b7612edb8115d53d28fad7aab5387580 (patch) | |
tree | 71943c6c030edde6ff773a0646338d8461f7d9e4 /configure | |
parent | 640ad632e3bf04fe07fa2b9dc3ca940c2e8d0261 (diff) | |
download | android-node-v8-f769d133b7612edb8115d53d28fad7aab5387580.tar.gz android-node-v8-f769d133b7612edb8115d53d28fad7aab5387580.tar.bz2 android-node-v8-f769d133b7612edb8115d53d28fad7aab5387580.zip |
build: i18n: move noisy variables to separate gypi
Fixes: https://github.com/joyent/node/issues/7676#issuecomment-57535890
Reviewed-by: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 33 |
1 files changed, 24 insertions, 9 deletions
@@ -691,6 +691,14 @@ def configure_winsdk(o): print('ctrpp not found in WinSDK path--using pre-gen files ' 'from tools/msvs/genfiles.') +def write(filename, data): + filename = os.path.join(root_dir, filename) + print 'creating ', filename + f = open(filename, 'w+') + f.write(data) + +do_not_edit = '# Do not edit. Generated by the configure script.\n' + def glob_to_var(dir_base, dir_sub): list = [] dir_all = os.path.join(dir_base, dir_sub) @@ -703,8 +711,18 @@ def glob_to_var(dir_base, dir_sub): break return list - def configure_intl(o): + icu_config = { + 'variables': {} + } + icu_config_name = 'icu_config.gypi' + def write_config(data, name): + return + + # write an empty file to start with + write(icu_config_name, do_not_edit + + pprint.pformat(icu_config, indent=2) + '\n') + # small ICU is off by default. # always set icu_small, node.gyp depends on it being defined. o['variables']['icu_small'] = b(False) @@ -821,7 +839,10 @@ def configure_intl(o): for i in icu_src: var = 'icu_src_%s' % i path = '../../deps/icu/source/%s' % icu_src[i] - o['variables'][var] = glob_to_var('tools/icu', path) + icu_config['variables'][var] = glob_to_var('tools/icu', path) + # write updated icu_config.gypi with a bunch of paths + write(icu_config_name, do_not_edit + + pprint.pformat(icu_config, indent=2) + '\n') return # end of configure_intl # determine the "flavor" (operating system) we're building for, @@ -860,13 +881,7 @@ output = { } pprint.pprint(output, indent=2) -def write(filename, data): - filename = os.path.join(root_dir, filename) - print 'creating ', filename - f = open(filename, 'w+') - f.write(data) - -write('config.gypi', '# Do not edit. Generated by the configure script.\n' + +write('config.gypi', do_not_edit + pprint.pformat(output, indent=2) + '\n') config = { |