Bug 1345762 - Rename OSPreferences_unix.cpp to OSPreferences_android.cpp. r?gandalf draft
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Thu, 09 Mar 2017 16:35:27 +0900
changeset 495730 7cf32a2c49ef0b25b580e25b30683ceb8de2c734
parent 495587 19289cc8bf6ffce3b2067fbe91aebea5a356d008
child 548456 dc041d53c7965c6c38a3361d41d39ecd4036f9c9
push id48420
push userm_kato@ga2.so-net.ne.jp
push dateThu, 09 Mar 2017 07:47:01 +0000
reviewersgandalf
bugs1345762
milestone55.0a1
Bug 1345762 - Rename OSPreferences_unix.cpp to OSPreferences_android.cpp. r?gandalf OSPreferences_unix.cpp is used on Android only. So we should rename it to OSPreferences_android.cpp Also, we should create android directory into intl/locale, then move OSPreferences_android.cpp and nsAndroidCharset.cpp into it. MozReview-Commit-ID: 2CUbV1Yc2fu
intl/locale/android/OSPreferences_android.cpp
intl/locale/android/moz.build
intl/locale/android/nsAndroidCharset.cpp
intl/locale/moz.build
intl/locale/unix/OSPreferences_unix.cpp
intl/locale/unix/moz.build
intl/locale/unix/nsAndroidCharset.cpp
rename from intl/locale/unix/OSPreferences_unix.cpp
rename to intl/locale/android/OSPreferences_android.cpp
new file mode 100644
--- /dev/null
+++ b/intl/locale/android/moz.build
@@ -0,0 +1,16 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+UNIFIED_SOURCES += [
+    'nsAndroidCharset.cpp',
+    'OSPreferences_android.cpp'
+]
+
+FINAL_LIBRARY = 'xul'
+
+LOCAL_INCLUDES += [
+    '..',
+]
rename from intl/locale/unix/nsAndroidCharset.cpp
rename to intl/locale/android/nsAndroidCharset.cpp
--- a/intl/locale/moz.build
+++ b/intl/locale/moz.build
@@ -11,16 +11,18 @@ toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
 if toolkit == 'windows':
     DIRS += ['windows']
 elif toolkit == 'cocoa':
     DIRS += ['mac']
 else:
     DIRS += ['unix']
     if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
         DIRS += ['gtk']
+    elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
+        DIRS += ['android']
 
 XPIDL_SOURCES += [
     'mozILocaleService.idl',
     'mozIOSPreferences.idl',
     'nsICollation.idl',
     'nsILocale.idl',
     'nsILocaleService.idl',
     'nsIScriptableDateFormat.idl',
--- a/intl/locale/unix/moz.build
+++ b/intl/locale/unix/moz.build
@@ -4,24 +4,17 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     'nsCollationUnix.cpp',
     'nsPosixLocale.cpp',
 ]
 
-if 'gtk' not in CONFIG['MOZ_WIDGET_TOOLKIT']:
-    SOURCES += ['OSPreferences_unix.cpp']
-
-if CONFIG['OS_TARGET'] == 'Android':
-    SOURCES += [
-        'nsAndroidCharset.cpp',
-    ]
-else:
+if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
     SOURCES += [
         'nsUNIXCharset.cpp',
     ]
     GENERATED_FILES = [
         'unixcharset.properties.h',
     ]
     unixcharset = GENERATED_FILES['unixcharset.properties.h']
     unixcharset.script = '../props2arrays.py'