Bug 875013: Eliminate VPATH usage in dom/mobilemessage. r=joey

This commit is contained in:
Vicamo Yang 2013-09-12 05:17:24 +02:00
parent 09e49f7930
commit 06c33720be
11 changed files with 47 additions and 77 deletions

View File

@ -2,35 +2,6 @@
# 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/.
VPATH = \
$(srcdir) \
$(srcdir)/ipc \
$(NULL)
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
VPATH += $(srcdir)/android
else ifdef MOZ_B2G_RIL
VPATH += $(srcdir)/gonk
else
VPATH += $(srcdir)/fallback
endif
include $(topsrcdir)/dom/dom-config.mk
LOCAL_INCLUDES = \
-I$(topsrcdir)/content/events/src \
-I$(topsrcdir)/dom/base \
$(NULL)
# Add VPATH to LOCAL_INCLUDES so we are going to include the correct backend
# subdirectory (and the ipc one).
LOCAL_INCLUDES += $(VPATH:%=-I%)
ifdef MOZ_B2G_RIL
LOCAL_INCLUDES += \
-I$(topsrcdir)/dom/system/gonk \
$(NULL)
endif
include $(topsrcdir)/config/rules.mk
include $(topsrcdir)/ipc/chromium/chromium-config.mk

View File

@ -8,11 +8,11 @@
#include "jsapi.h" // For OBJECT_TO_JSVAL and JS_NewDateObjectMsec
#include "jsfriendapi.h" // For js_DateGetMsecSinceEpoch
#include "nsJSUtils.h"
#include "Constants.h"
#include "nsContentUtils.h"
#include "nsIDOMFile.h"
#include "nsTArrayHelpers.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
#include "mozilla/dom/mobilemessage/SmsTypes.h"
#include "nsDOMFile.h"

View File

@ -11,7 +11,7 @@
#include "nsIObserverService.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "Constants.h"
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
#include "nsIDOMMozSmsEvent.h"
#include "nsIDOMMozMmsEvent.h"
#include "nsIDOMMozSmsMessage.h"

View File

@ -9,7 +9,7 @@
#include "jsfriendapi.h" // For js_DateGetMsecSinceEpoch
#include "nsJSUtils.h" // For nsDependentJSString
#include "nsTArrayHelpers.h" // For nsTArrayToJSArray
#include "Constants.h" // For MessageType
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
using namespace mozilla::dom::mobilemessage;

View File

@ -4,15 +4,14 @@
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "SmsFilter.h"
#include "nsIDOMClassInfo.h"
#include "Constants.h"
#include "nsError.h"
#include "Constants.h"
#include "jsapi.h"
#include "jsfriendapi.h" // For js_DateGetMsecSinceEpoch.
#include "js/Utility.h"
#include "nsJSUtils.h"
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
#include "nsDOMString.h"
#include "nsError.h"
#include "nsIDOMClassInfo.h"
#include "nsJSUtils.h"
using namespace mozilla::dom::mobilemessage;

View File

@ -8,7 +8,6 @@
#include "mozilla/dom/mobilemessage/SmsTypes.h"
#include "nsIDOMSmsFilter.h"
#include "Types.h"
#include "mozilla/Attributes.h"
namespace mozilla {

View File

@ -7,7 +7,7 @@
#include "nsIDOMClassInfo.h"
#include "jsapi.h" // For OBJECT_TO_JSVAL and JS_NewDateObjectMsec
#include "jsfriendapi.h" // For js_DateGetMsecSinceEpoch
#include "Constants.h"
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
using namespace mozilla::dom::mobilemessage;

View File

@ -5,11 +5,17 @@
#include "SmsServicesFactory.h"
#include "nsXULAppAPI.h"
#include "SmsService.h"
#include "SmsIPCService.h"
#ifndef MOZ_B2G_RIL
#include "MobileMessageDatabaseService.h"
#include "MmsService.h"
#include "ipc/SmsIPCService.h"
#ifdef MOZ_WIDGET_ANDROID
#include "android/MobileMessageDatabaseService.h"
#include "android/SmsService.h"
#include "android/MmsService.h"
#elif defined(MOZ_B2G_RIL)
#include "gonk/SmsService.h"
#else
#include "fallback/MmsService.h"
#include "fallback/MobileMessageDatabaseService.h"
#include "fallback/SmsService.h"
#endif
#include "nsServiceManagerUtils.h"

View File

@ -6,10 +6,10 @@
#include "SmsMessage.h"
#include "MmsMessage.h"
#include "SmsSegmentInfo.h"
#include "Constants.h"
#include "nsIObserverService.h"
#include "mozilla/Services.h"
#include "mozilla/dom/ContentChild.h"
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
#include "MobileMessageThread.h"
using namespace mozilla;

View File

@ -8,7 +8,6 @@
#include "nsIMmsService.h"
#include "nsIObserverService.h"
#include "mozilla/Services.h"
#include "Constants.h"
#include "nsIDOMMozSmsMessage.h"
#include "nsIDOMMozMmsMessage.h"
#include "mozilla/unused.h"
@ -21,6 +20,7 @@
#include "nsIDOMFile.h"
#include "mozilla/dom/ipc/Blob.h"
#include "mozilla/dom/ContentParent.h"
#include "mozilla/dom/mobilemessage/Constants.h" // For MessageType
#include "nsContentUtils.h"
#include "nsTArrayHelpers.h"
#include "nsCxPusher.h"

View File

@ -4,38 +4,42 @@
# 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/.
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
mmsdir = 'android'
elif CONFIG['MOZ_B2G_RIL']:
mmsdir = 'gonk'
else:
mmsdir = 'fallback'
EXPORTS.mozilla.dom.mobilemessage += [
'Constants.h',
'MobileMessageCallback.h',
'MobileMessageService.h',
'SmsServicesFactory.h',
'Types.h',
'Constants.h', # Required by almost all cpp files
'MobileMessageService.h', # Required by nsLayoutModule.cpp
'SmsServicesFactory.h', # Required by nsLayoutModule.cpp
'Types.h', # Required by IPDL SmsTypes.h
'ipc/SmsChild.h',
'ipc/SmsParent.h',
]
if CONFIG['MOZ_B2G_RIL']:
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
CPP_SOURCES += [
'android/MobileMessageDatabaseService.cpp',
'android/SmsService.cpp',
'android/MmsService.cpp',
]
elif CONFIG['MOZ_B2G_RIL']:
EXTRA_JS_MODULES = [
'gonk/MmsPduHelper.jsm',
'gonk/WspPduHelper.jsm',
'gonk/mms_consts.js',
'gonk/wap_consts.js',
]
else:
EXPORTS.mozilla.dom.mobilemessage += [
"%s/%s" % (mmsdir, 'MmsService.h'),
"%s/%s" % (mmsdir, 'MobileMessageDatabaseService.h'),
EXTRA_COMPONENTS += [
'gonk/MmsService.js',
'gonk/MmsService.manifest',
'gonk/MobileMessageDatabaseService.js',
'gonk/MobileMessageDatabaseService.manifest',
]
CPP_SOURCES += [
'MobileMessageDatabaseService.cpp',
'MmsService.cpp',
'gonk/SmsService.cpp',
]
else:
CPP_SOURCES += [
'fallback/MobileMessageDatabaseService.cpp',
'fallback/MmsService.cpp',
'fallback/SmsService.cpp',
]
EXPORTS.mozilla.dom += [
@ -54,24 +58,15 @@ CPP_SOURCES += [
'MobileMessageManager.cpp',
'MobileMessageService.cpp',
'MobileMessageThread.cpp',
'SmsChild.cpp',
'SmsFilter.cpp',
'SmsIPCService.cpp',
'SmsMessage.cpp',
'SmsParent.cpp',
'SmsSegmentInfo.cpp',
'SmsService.cpp',
'SmsServicesFactory.cpp',
'ipc/SmsChild.cpp',
'ipc/SmsIPCService.cpp',
'ipc/SmsParent.cpp',
]
if CONFIG['MOZ_B2G_RIL']:
EXTRA_COMPONENTS += [
'gonk/MmsService.js',
'gonk/MmsService.manifest',
'gonk/MobileMessageDatabaseService.js',
'gonk/MobileMessageDatabaseService.manifest',
]
IPDL_SOURCES += [
'ipc/PMobileMessageCursor.ipdl',
'ipc/PSms.ipdl',