@@ -691,6 +691,14 @@ def configure_winsdk(o):
691
691
print ('ctrpp not found in WinSDK path--using pre-gen files '
692
692
'from tools/msvs/genfiles.' )
693
693
694
+ def write (filename , data ):
695
+ filename = os .path .join (root_dir , filename )
696
+ print 'creating ' , filename
697
+ f = open (filename , 'w+' )
698
+ f .write (data )
699
+
700
+ do_not_edit = '# Do not edit. Generated by the configure script.\n '
701
+
694
702
def glob_to_var (dir_base , dir_sub ):
695
703
list = []
696
704
dir_all = os .path .join (dir_base , dir_sub )
@@ -703,8 +711,18 @@ def glob_to_var(dir_base, dir_sub):
703
711
break
704
712
return list
705
713
706
-
707
714
def configure_intl (o ):
715
+ icu_config = {
716
+ 'variables' : {}
717
+ }
718
+ icu_config_name = 'icu_config.gypi'
719
+ def write_config (data , name ):
720
+ return
721
+
722
+ # write an empty file to start with
723
+ write (icu_config_name , do_not_edit +
724
+ pprint .pformat (icu_config , indent = 2 ) + '\n ' )
725
+
708
726
# small ICU is off by default.
709
727
# always set icu_small, node.gyp depends on it being defined.
710
728
o ['variables' ]['icu_small' ] = b (False )
@@ -821,7 +839,10 @@ def configure_intl(o):
821
839
for i in icu_src :
822
840
var = 'icu_src_%s' % i
823
841
path = '../../deps/icu/source/%s' % icu_src [i ]
824
- o ['variables' ][var ] = glob_to_var ('tools/icu' , path )
842
+ icu_config ['variables' ][var ] = glob_to_var ('tools/icu' , path )
843
+ # write updated icu_config.gypi with a bunch of paths
844
+ write (icu_config_name , do_not_edit +
845
+ pprint .pformat (icu_config , indent = 2 ) + '\n ' )
825
846
return # end of configure_intl
826
847
827
848
# determine the "flavor" (operating system) we're building for,
@@ -860,13 +881,7 @@ output = {
860
881
}
861
882
pprint .pprint (output , indent = 2 )
862
883
863
- def write (filename , data ):
864
- filename = os .path .join (root_dir , filename )
865
- print 'creating ' , filename
866
- f = open (filename , 'w+' )
867
- f .write (data )
868
-
869
- write ('config.gypi' , '# Do not edit. Generated by the configure script.\n ' +
884
+ write ('config.gypi' , do_not_edit +
870
885
pprint .pformat (output , indent = 2 ) + '\n ' )
871
886
872
887
config = {
0 commit comments