From 0662c3e5b33840e19f4c14b85bf619c33b3a0d0f Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Mon, 2 Feb 2015 16:50:05 +0000 Subject: [PATCH] Fixes to the update-tzdata.py tool We build one too many times. Creating a missing directory is sufficient. The tz2icu needs some files in the CWD. Added symlinks. Bug: 19230091 Change-Id: I58f9817af68b229f48139e56503f50a2b6dbb4fe --- libc/tools/zoneinfo/update-tzdata.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libc/tools/zoneinfo/update-tzdata.py b/libc/tools/zoneinfo/update-tzdata.py index 330f1662d..4847356df 100755 --- a/libc/tools/zoneinfo/update-tzdata.py +++ b/libc/tools/zoneinfo/update-tzdata.py @@ -117,13 +117,20 @@ def BuildIcuToolsAndData(data_filename): # Build the ICU tools. print 'Configuring ICU tools...' subprocess.check_call(['%s/runConfigureICU' % icu_dir, 'Linux']) - print 'Making ICU tools...' - subprocess.check_call(['make', '-j32']) # Run the ICU tools. os.chdir('tools/tzcode') + + # The tz2icu tool only picks up icuregions and icuzones in they are in the CWD + for icu_data_file in [ 'icuregions', 'icuzones']: + icu_data_file_source = '%s/tools/tzcode/%s' % (icu_dir, icu_data_file) + icu_data_file_symlink = './%s' % icu_data_file + os.symlink(icu_data_file_source, icu_data_file_symlink) + shutil.copyfile('%s/%s' % (original_working_dir, data_filename), data_filename) print 'Making ICU data...' + # The Makefile assumes the existence of the bin directory. + os.mkdir('%s/bin' % icu_working_dir) subprocess.check_call(['make']) # Copy the source file to its ultimate destination.