Skip to content

Commit

Permalink
Tidy up build_mozc.py
Browse files Browse the repository at this point in the history
This is just a clean-up of build_mozc.py.  No behavior change is intended.

BUG=none
TEST=unittest

git-svn-id: https://mozc.googlecode.com/svn/trunk@372 a6090854-d499-a067-5803-1114d4e51264
  • Loading branch information
yukawa committed Nov 2, 2014
1 parent 06e453c commit ce466e5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions src/build_mozc.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ def GetBuildShortBaseName(options, target_platform):

def GetBuildBaseName(options, target_platform):
build_base = GetBuildShortBaseName(options, target_platform)

# On Linux, seems there is no way to specify the build_base directory
# inside common.gypi
if IsWindows() or IsMac():
Expand All @@ -145,8 +146,6 @@ def GetGeneratorName(generator):
"""Gets the generator name based on the platform."""
if generator:
return generator
elif IsWindows():
return 'ninja'
elif IsMac():
return 'xcode'
else:
Expand Down Expand Up @@ -927,9 +926,9 @@ def SetCommandLineForFeature(option_name, windows=False, mac=False,

# TODO(yukawa): Use ninja on OSX.
if generator == 'ninja':
gyp_options.extend(['--generator-output=.'])
short_basename = GetBuildShortBaseName(options, target_platform)
gyp_options.extend(['-G', 'output_dir=%s' % short_basename])
gyp_options.extend(['--generator-output=.'])

# Enable cross-compile
# TODO(yukawa): Enable GYP_CROSSCOMPILE for Windows.
Expand Down Expand Up @@ -1018,6 +1017,7 @@ def BuildOnLinux(options, targets, unused_original_directory_name):
target_names.append(target_name)

ninja = 'ninja'

if hasattr(options, 'android_device'):
# Only for android testing.
os.environ['ANDROID_DEVICES'] = options.android_device
Expand Down Expand Up @@ -1315,9 +1315,8 @@ def RunTestsMain(options, args, original_directory_name):
if target_platform == 'Android':
RunTestsOnAndroid(options, build_options, original_directory_name)
else:
RunTests(GetBuildShortBaseName(options, target_platform),
options.configuration, options.test_jobs)

RunTests(GetBuildBaseName(options, target_platform), options.configuration,
options.test_jobs)

def CleanBuildFilesAndDirectories(options, unused_args):
"""Cleans build files and directories."""
Expand All @@ -1342,10 +1341,10 @@ def CleanBuildFilesAndDirectories(options, unused_args):
'*.xcodeproj')))
file_names.append('%s/mozc_version.txt' % SRC_DIR)

short_basename = GetBuildShortBaseName(options,
GetMozcVersion().GetTargetPlatform())
if short_basename:
directory_names.append(os.path.join(SRC_DIR, short_basename))
target_platform = GetBuildBaseName(options,
GetMozcVersion().GetTargetPlatform())
if target_platform:
directory_names.append(target_platform)

if IsLinux():
# Remove auto-generated files.
Expand Down
2 changes: 1 addition & 1 deletion src/mozc_version_template.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MAJOR=1
MINOR=15
BUILD=1915
BUILD=1916
REVISION=102
# NACL_DICTIONARY_VERSION is the target version of the system dictionary to be
# downloaded by NaCl Mozc.
Expand Down

0 comments on commit ce466e5

Please sign in to comment.