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
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'