Remove build_tools command from build_mozc.py

With this CL, build_tools command of build_mozc.py is completely removed. 2-pass build can not be enabled anymore even manually.

No behavior change is intended with this CL.

BUG=Issue mozc:223
TEST=unittest

git-svn-id: https://mozc.googlecode.com/svn/trunk@507 a6090854-d499-a067-5803-1114d4e51264
diff --git a/src/build_mozc.py b/src/build_mozc.py
index 2237979..3a69565 100644
--- a/src/build_mozc.py
+++ b/src/build_mozc.py
@@ -34,7 +34,6 @@
 Typical usage:
 
   % python build_mozc.py gyp
-  % python build_mozc.py build_tools -c Release
   % python build_mozc.py build base/base.gyp:base
 """
 
@@ -201,7 +200,6 @@
 
   for name in mozc_top_level_names:
     gyp_file_names.extend(glob.glob(name + '/*.gyp'))
-  gyp_file_names.extend(glob.glob('%s/build_tools/*/*.gyp' % SRC_DIR))
   # Include subdirectories of data/test/session/scenario
   gyp_file_names.extend(glob.glob('%s/data/test/session/scenario/*.gyp' %
                                   SRC_DIR))
@@ -998,23 +996,6 @@
 
 
 
-def BuildToolsMain(options, unused_args, original_directory_name):
-  """The main function for 'build_tools' command."""
-  if not IsWindows():
-    logging.info('build_tools is deprecated on this platform.')
-    return
-
-  build_tools_dir = os.path.join(GetRelPath(os.getcwd(),
-                                            original_directory_name),
-                                 SRC_DIR, 'build_tools')
-  build_tools_targets = [
-      'out_win/%s:build_tools' % options.configuration,
-  ]
-
-  for build_tools_target in build_tools_targets:
-    BuildMain(options, [build_tools_target], original_directory_name)
-
-
 def CanonicalTargetToGypFileAndTargetName(target):
   """Parses the target string."""
   if ':' not in target:
@@ -1424,7 +1405,6 @@
   print 'Commands: '
   print '  gyp          Generate project files.'
   print '  build        Build the specified target.'
-  print '  build_tools  Build tools used by the build command.'
   print '  runtests     Build all tests and run them.'
   print '  clean        Clean all the build files and directories.'
   print ''
@@ -1450,7 +1430,6 @@
 
   command_to_procedure = {
       'gyp': (ParseGypOptions, GypMain),
-      'build_tools': (ParseBuildOptions, BuildToolsMain),
       'build': (ParseBuildOptions, BuildMain),
       'runtests': (ParseRunTestsOptions, RunTestsMain),
       'clean': (ParseCleanOptions, CleanMain)}
diff --git a/src/build_tools/build_tools.gyp b/src/build_tools/build_tools.gyp
deleted file mode 100644
index c448f1d..0000000
--- a/src/build_tools/build_tools.gyp
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 2010-2015, Google Inc.
-# All rights reserved.
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-#     * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#     * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following disclaimer
-# in the documentation and/or other materials provided with the
-# distribution.
-#     * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived from
-# this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# The gyp file is used for pre-building code generation tools.
-#
-# In particualr, generating embedded_dictionary_data.h (140+ MB) with
-# converter_compiler_main is slow (can take several minutes).
-#
-# If we simply add a dependency from embedded_dictionary_data.h to
-# converter_compiler_main binary, we end up re-generating the header file
-# every time converter_compiler_main binary is rebuilt. This can happen by
-# a change as simple as fixing a comment in base/util.h, as
-# converter_compiler_main depends on base/util.h.
-#
-# To solve the problem, we pre-build converter_compiler_main and use the
-# pre-built version in mozc_tools directory for code generation.
-#
-# In order to build products for Chrome OS, we also pre-build all the other code
-# generation tools. They need to be built for the host machine rather than the
-# target machine.
-
-{
-  'variables': {
-    'relative_dir': 'build_tools',
-    'gen_out_dir': '<(SHARED_INTERMEDIATE_DIR)/<(relative_dir)',
-  },
-  'targets': [
-    {
-      'target_name': 'build_tools',
-      'type': 'none',
-      'toolsets': ['host'],
-      'conditions': [
-        ['enable_two_pass_build==1', {
-          'dependencies': [
-            '../protobuf/protobuf.gyp:install_protoc',
-            '../dictionary/dictionary.gyp:install_gen_system_dictionary_data_main',
-          ],
-        }, {  # else
-          'actions': [
-            {
-              'action_name': 'show_message',
-              'inputs': [
-                'build_tools.gyp',
-              ],
-              'outputs': [
-                '<(gen_out_dir)/dummy_output_file',
-              ],
-              'action': [
-                'python',
-                '-c',
-                '"build_tools is deprecated!"',
-              ],
-              'message': 'build_tools is deprecated!',
-            },
-          ],
-        }],
-      ],
-    },
-  ],
-}
diff --git a/src/data_manager/data_manager.gypi b/src/data_manager/data_manager.gypi
index 836434d..bd65ab4 100644
--- a/src/data_manager/data_manager.gypi
+++ b/src/data_manager/data_manager.gypi
@@ -245,12 +245,8 @@
       'target_name': 'gen_embedded_dictionary_data_for_<(dataset_tag)',
       'type': 'none',
       'toolsets': ['host'],
-      'conditions': [
-        ['enable_two_pass_build==0', {
-          'dependencies': [
-            '<(DEPTH)/dictionary/dictionary.gyp:gen_system_dictionary_data_main#host',
-          ],
-        }],
+      'dependencies': [
+        '<(DEPTH)/dictionary/dictionary.gyp:gen_system_dictionary_data_main#host',
       ],
       'actions': [
         {
@@ -260,14 +256,9 @@
             'gen_test_dictionary_flag': '<(gen_test_dictionary)',
             'additional_inputs': [],
             'additional_actions': [],
+            'generator': '<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)',
+            'additional_inputs': ['<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)'],
             'conditions': [
-              ['enable_two_pass_build==0', {
-                'generator': '<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)',
-                'additional_inputs': ['<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)'],
-              }, {  # else
-                # Use the pre-built binariy when 2-pass build is enabled.
-                'generator': '<(mozc_build_tools_dir)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)',
-              }],
               ['use_packed_dictionary==1', {
                 'additional_inputs': [
                   '<(SHARED_INTERMEDIATE_DIR)/data_manager/packed/packed_data_light_<(dataset_tag)'
@@ -351,25 +342,13 @@
       'target_name': 'gen_separate_dictionary_data_for_<(dataset_tag)',
       'type': 'none',
       'toolsets': ['host'],
-      'conditions': [
-        ['enable_two_pass_build==0', {
-          'dependencies': [
-            '<(DEPTH)/dictionary/dictionary.gyp:gen_system_dictionary_data_main#host',
-          ],
-        }],
+      'dependencies': [
+        '<(DEPTH)/dictionary/dictionary.gyp:gen_system_dictionary_data_main#host',
       ],
       'variables': {
         'additional_inputs%': [],
-        'conditions': [
-          # Use the pre-built binariy when 2-pass build is enabled.
-          ['enable_two_pass_build==0', {
-            'generator': '<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)',
-            'additional_inputs': ['<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)'],
-          }, {  # else
-            # Use the pre-built binariy when 2-pass build is enabled.
-            'generator': '<(mozc_build_tools_dir)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)',
-          }],
-        ],
+        'generator': '<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)',
+        'additional_inputs': ['<(PRODUCT_DIR)/gen_system_dictionary_data_main<(EXECUTABLE_SUFFIX)'],
       },
       'actions': [
         {
diff --git a/src/gyp/common.gypi b/src/gyp/common.gypi
index 5e8debd..d90d0cf 100644
--- a/src/gyp/common.gypi
+++ b/src/gyp/common.gypi
@@ -34,9 +34,6 @@
 # http://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi
 {
   'variables': {
-    # Set 1 when using two-pass build
-    'enable_two_pass_build%': 0,
-
     # Top directory of third party libraries.
     'third_party_dir': '<(DEPTH)/third_party',
 
diff --git a/src/mozc_version_template.txt b/src/mozc_version_template.txt
index 2078b10..84b0b90 100644
--- a/src/mozc_version_template.txt
+++ b/src/mozc_version_template.txt
@@ -1,6 +1,6 @@
 MAJOR=2
 MINOR=16
-BUILD=2033
+BUILD=2034
 REVISION=102
 # NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
 # downloaded by NaCl Mozc.
diff --git a/src/protobuf/genproto.gypi b/src/protobuf/genproto.gypi
index f5cb744..a4b47bf 100644
--- a/src/protobuf/genproto.gypi
+++ b/src/protobuf/genproto.gypi
@@ -36,19 +36,14 @@
       ['use_libprotobuf==1', {
         'protoc_wrapper_additional_options': [],
         'additional_inputs': [],
-      }],
-      ['use_libprotobuf==0 and enable_two_pass_build==0', {
+      }, {  # else
         'protoc_wrapper_additional_options': ['--protoc_dir=<(PRODUCT_DIR)'],
         'additional_inputs': ['<(PRODUCT_DIR)/protoc<(EXECUTABLE_SUFFIX)'],
       }],
-      ['use_libprotobuf==0 and enable_two_pass_build==1', {
-        'protoc_wrapper_additional_options': ['--protoc_dir=<(mozc_build_tools_dir)'],
-        'additional_inputs': [],
-      }],
     ],
   },
   'conditions': [
-    ['use_libprotobuf==0 and enable_two_pass_build==0', {
+    ['use_libprotobuf==0', {
       'dependencies': [
         '<(DEPTH)/protobuf/protobuf.gyp:protoc#host',
       ],