Bug 1146355: Prepare build system to support Bluetooth APIs v1 and v2, r=shuang

This patch adds support for both Bluetooth interfaces to the build
system. The actual interface must be selected at compile time.
This commit is contained in:
Thomas Zimmermann 2015-04-09 15:57:40 +02:00
parent 90dc6d375b
commit e5ffd87067
7 changed files with 55 additions and 12 deletions

View File

@ -398,7 +398,6 @@ MSVC_ENABLE_PGO = True
LOCAL_INCLUDES += [
'../battery',
'../bluetooth',
'../bluetooth/bluetooth1',
'../events',
'../media',
'../network',
@ -429,6 +428,15 @@ LOCAL_INCLUDES += [
'/xpcom/ds',
]
if CONFIG['MOZ_B2G_BT_API_V2']:
LOCAL_INCLUDES += [
'../bluetooth/bluetooth2',
]
else:
LOCAL_INCLUDES += [
'../bluetooth/bluetooth1',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
LOCAL_INCLUDES += [
'../fmradio',

View File

@ -44,7 +44,6 @@ LOCAL_INCLUDES += [
'/dom/base',
'/dom/battery',
'/dom/bluetooth',
'/dom/bluetooth/bluetooth1',
'/dom/camera',
'/dom/canvas',
'/dom/geolocation',
@ -90,6 +89,15 @@ if CONFIG['MOZ_AUDIO_CHANNEL_MANAGER']:
'/dom/system/gonk',
]
if CONFIG['MOZ_B2G_BT_API_V2']:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth2',
]
else:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth1',
]
FINAL_LIBRARY = 'xul'
SPHINX_TREES['webidl'] = 'docs'

View File

@ -123,8 +123,6 @@ LOCAL_INCLUDES += [
'/docshell/base',
'/dom/base',
'/dom/bluetooth',
'/dom/bluetooth/bluetooth1',
'/dom/bluetooth/bluetooth1/ipc',
'/dom/devicestorage',
'/dom/filesystem',
'/dom/fmradio/ipc',
@ -161,6 +159,17 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gonk', 'qt'):
if CONFIG['MOZ_TOOLKIT_SEARCH']:
DEFINES['MOZ_TOOLKIT_SEARCH'] = True
if CONFIG['MOZ_B2G_BT_API_V2']:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth2',
'/dom/bluetooth/bluetooth2/ipc',
]
else:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth1',
'/dom/bluetooth/bluetooth1/ipc',
]
JAR_MANIFESTS += ['jar.mn']
BROWSER_CHROME_MANIFESTS += ['tests/browser.ini']

View File

@ -41,6 +41,7 @@ DIRS += [
'animation',
'apps',
'base',
'bluetooth',
'activities',
'archivereader',
'requestsync',
@ -146,11 +147,6 @@ if CONFIG['MOZ_B2G']:
'engineeringmode'
]
if CONFIG['MOZ_B2G_BT_API_V2']:
DIRS += ['bluetooth2']
else:
DIRS += ['bluetooth']
DIRS += ['presentation']
TEST_DIRS += [

View File

@ -114,9 +114,17 @@ include('/ipc/chromium/chromium-config.mozbuild')
LOCAL_INCLUDES += [
'/dom/base',
'/dom/bluetooth',
'/dom/bluetooth/bluetooth1',
'/dom/geolocation',
'/dom/wifi',
]
if CONFIG['MOZ_B2G_BT_API_V2']:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth2',
]
else:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth1',
]
FINAL_LIBRARY = 'xul'

View File

@ -74,5 +74,12 @@ LOCAL_INCLUDES += [
if CONFIG['MOZ_B2G_BT']:
LOCAL_INCLUDES += [
'/dom/bluetooth',
'/dom/bluetooth/bluetooth1',
]
if CONFIG['MOZ_B2G_BT_API_V2']:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth2',
]
else:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth1',
]

View File

@ -109,8 +109,15 @@ if CONFIG['MOZ_B2G_FM']:
if CONFIG['MOZ_B2G_BT']:
LOCAL_INCLUDES += [
'/dom/bluetooth',
'/dom/bluetooth/bluetooth1',
]
if CONFIG['MOZ_B2G_BT_API_V2']:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth2',
]
else:
LOCAL_INCLUDES += [
'/dom/bluetooth/bluetooth1',
]
if CONFIG['MOZ_WEBSPEECH']:
LOCAL_INCLUDES += [