mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
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>
This commit is contained in:
parent
640ad632e3
commit
f769d133b7
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -68,3 +68,4 @@ deps/zlib/zlib.target.mk
|
||||||
|
|
||||||
# test artifacts
|
# test artifacts
|
||||||
tools/faketime
|
tools/faketime
|
||||||
|
icu_config.gypi
|
||||||
|
|
|
||||||
33
configure
vendored
33
configure
vendored
|
|
@ -691,6 +691,14 @@ def configure_winsdk(o):
|
||||||
print('ctrpp not found in WinSDK path--using pre-gen files '
|
print('ctrpp not found in WinSDK path--using pre-gen files '
|
||||||
'from tools/msvs/genfiles.')
|
'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):
|
def glob_to_var(dir_base, dir_sub):
|
||||||
list = []
|
list = []
|
||||||
dir_all = os.path.join(dir_base, dir_sub)
|
dir_all = os.path.join(dir_base, dir_sub)
|
||||||
|
|
@ -703,8 +711,18 @@ def glob_to_var(dir_base, dir_sub):
|
||||||
break
|
break
|
||||||
return list
|
return list
|
||||||
|
|
||||||
|
|
||||||
def configure_intl(o):
|
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.
|
# small ICU is off by default.
|
||||||
# always set icu_small, node.gyp depends on it being defined.
|
# always set icu_small, node.gyp depends on it being defined.
|
||||||
o['variables']['icu_small'] = b(False)
|
o['variables']['icu_small'] = b(False)
|
||||||
|
|
@ -821,7 +839,10 @@ def configure_intl(o):
|
||||||
for i in icu_src:
|
for i in icu_src:
|
||||||
var = 'icu_src_%s' % i
|
var = 'icu_src_%s' % i
|
||||||
path = '../../deps/icu/source/%s' % icu_src[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
|
return # end of configure_intl
|
||||||
|
|
||||||
# determine the "flavor" (operating system) we're building for,
|
# determine the "flavor" (operating system) we're building for,
|
||||||
|
|
@ -860,13 +881,7 @@ output = {
|
||||||
}
|
}
|
||||||
pprint.pprint(output, indent=2)
|
pprint.pprint(output, indent=2)
|
||||||
|
|
||||||
def write(filename, data):
|
write('config.gypi', do_not_edit +
|
||||||
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' +
|
|
||||||
pprint.pformat(output, indent=2) + '\n')
|
pprint.pformat(output, indent=2) + '\n')
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
'variables': {
|
'variables': {
|
||||||
'icu_src_derb': [ '../../deps/icu/source/tools/genrb/derb.c' ],
|
'icu_src_derb': [ '../../deps/icu/source/tools/genrb/derb.c' ],
|
||||||
},
|
},
|
||||||
|
'includes': [ '../../icu_config.gypi' ],
|
||||||
'targets': [
|
'targets': [
|
||||||
{
|
{
|
||||||
# a target to hold uconfig defines.
|
# a target to hold uconfig defines.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user