зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1206558 (part 6) - Factor out common libevent moz.build stuff. r=mshal.
Two parts. - Most of the common stuff goes into the new libeventcommon.mozbuild file. - A little bit of common bsd/linux stuff factored out in ipc/chromium/moz.build. --HG-- extra : rebase_source : a4bb56a444ad5b0d5d808e5d58dd7abe7dd81dbe
This commit is contained in:
Родитель
89cb2574cf
Коммит
91333243f4
|
@ -4,29 +4,8 @@
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
os_win = 0
|
libevent_path_prefix = 'src/third_party'
|
||||||
os_posix = 0
|
include(libevent_path_prefix + '/libeventcommon.mozbuild')
|
||||||
os_macosx = 0
|
|
||||||
os_bsd = 0
|
|
||||||
os_linux = 0
|
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
||||||
os_win = 1
|
|
||||||
else:
|
|
||||||
os_posix = 1
|
|
||||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
|
||||||
os_macosx = 1
|
|
||||||
libevent_include_suffix = 'mac'
|
|
||||||
elif CONFIG['OS_ARCH'] in ['DragonFly', 'FreeBSD', 'GNU_kFreeBSD',
|
|
||||||
'NetBSD', 'OpenBSD']:
|
|
||||||
os_bsd = 1
|
|
||||||
libevent_include_suffix = 'bsd'
|
|
||||||
else:
|
|
||||||
os_linux = 1
|
|
||||||
if CONFIG['OS_TARGET'] == 'Android':
|
|
||||||
libevent_include_suffix = 'android'
|
|
||||||
else:
|
|
||||||
libevent_include_suffix = 'linux'
|
|
||||||
|
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
'src/base/at_exit.cc',
|
'src/base/at_exit.cc',
|
||||||
|
@ -96,12 +75,6 @@ if os_win:
|
||||||
]
|
]
|
||||||
elif not CONFIG['MOZ_NATIVE_LIBEVENT']:
|
elif not CONFIG['MOZ_NATIVE_LIBEVENT']:
|
||||||
DIRS += ['src/third_party']
|
DIRS += ['src/third_party']
|
||||||
DEFINES['HAVE_CONFIG_H'] = True
|
|
||||||
LOCAL_INCLUDES += sorted([
|
|
||||||
'src/third_party/libevent',
|
|
||||||
'src/third_party/libevent/include',
|
|
||||||
'src/third_party/libevent/' + libevent_include_suffix,
|
|
||||||
])
|
|
||||||
|
|
||||||
if os_posix:
|
if os_posix:
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
|
@ -162,15 +135,6 @@ if os_bsd:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'src/base/process_util_bsd.cc'
|
'src/base/process_util_bsd.cc'
|
||||||
]
|
]
|
||||||
if CONFIG['MOZ_WIDGET_GTK']:
|
|
||||||
SOURCES += [
|
|
||||||
'src/base/message_pump_glib.cc',
|
|
||||||
]
|
|
||||||
if CONFIG['MOZ_ENABLE_QT']:
|
|
||||||
SOURCES += [
|
|
||||||
'!moc_message_pump_qt.cc',
|
|
||||||
'src/base/message_pump_qt.cc',
|
|
||||||
]
|
|
||||||
|
|
||||||
if os_linux:
|
if os_linux:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
|
@ -185,6 +149,8 @@ if os_linux:
|
||||||
]
|
]
|
||||||
DEFINES['ANDROID'] = True
|
DEFINES['ANDROID'] = True
|
||||||
DEFINES['_POSIX_MONOTONIC_CLOCK'] = 0
|
DEFINES['_POSIX_MONOTONIC_CLOCK'] = 0
|
||||||
|
|
||||||
|
if os_bsd or os_linux:
|
||||||
if CONFIG['MOZ_WIDGET_GTK']:
|
if CONFIG['MOZ_WIDGET_GTK']:
|
||||||
SOURCES += [
|
SOURCES += [
|
||||||
'src/base/message_pump_glib.cc',
|
'src/base/message_pump_glib.cc',
|
||||||
|
|
|
@ -0,0 +1,37 @@
|
||||||
|
# -*- Mode: python; c-basic-offset: 4; 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/.
|
||||||
|
|
||||||
|
os_win = 0
|
||||||
|
os_posix = 0
|
||||||
|
os_macosx = 0
|
||||||
|
os_bsd = 0
|
||||||
|
os_linux = 0
|
||||||
|
|
||||||
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||||
|
os_win = 1
|
||||||
|
else:
|
||||||
|
os_posix = 1
|
||||||
|
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||||
|
os_macosx = 1
|
||||||
|
libevent_include_suffix = 'mac'
|
||||||
|
elif CONFIG['OS_ARCH'] in ['DragonFly', 'FreeBSD', 'GNU_kFreeBSD',
|
||||||
|
'NetBSD', 'OpenBSD']:
|
||||||
|
os_bsd = 1
|
||||||
|
libevent_include_suffix = 'bsd'
|
||||||
|
else:
|
||||||
|
os_linux = 1
|
||||||
|
if CONFIG['OS_TARGET'] == 'Android':
|
||||||
|
libevent_include_suffix = 'android'
|
||||||
|
else:
|
||||||
|
libevent_include_suffix = 'linux'
|
||||||
|
|
||||||
|
if os_posix and not CONFIG['MOZ_NATIVE_LIBEVENT']:
|
||||||
|
DEFINES['HAVE_CONFIG_H'] = True
|
||||||
|
LOCAL_INCLUDES += sorted([
|
||||||
|
libevent_path_prefix + '/libevent',
|
||||||
|
libevent_path_prefix + '/libevent/include',
|
||||||
|
libevent_path_prefix + '/libevent/' + libevent_include_suffix,
|
||||||
|
])
|
|
@ -4,30 +4,15 @@
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
libevent_path_prefix = '.'
|
||||||
|
include(libevent_path_prefix + '/libeventcommon.mozbuild')
|
||||||
|
|
||||||
|
if os_win:
|
||||||
error('should not reach here on Windows')
|
error('should not reach here on Windows')
|
||||||
|
|
||||||
if CONFIG['MOZ_NATIVE_LIBEVENT']:
|
if CONFIG['MOZ_NATIVE_LIBEVENT']:
|
||||||
error('should not reach here if we are using a native libevent')
|
error('should not reach here if we are using a native libevent')
|
||||||
|
|
||||||
os_macosx = 0
|
|
||||||
os_bsd = 0
|
|
||||||
os_linux = 0
|
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
|
||||||
os_macosx = 1
|
|
||||||
libevent_include_suffix = 'mac'
|
|
||||||
elif CONFIG['OS_ARCH'] in ['DragonFly', 'FreeBSD', 'GNU_kFreeBSD',
|
|
||||||
'NetBSD', 'OpenBSD']:
|
|
||||||
os_bsd = 1
|
|
||||||
libevent_include_suffix = 'bsd'
|
|
||||||
else:
|
|
||||||
os_linux = 1
|
|
||||||
if CONFIG['OS_TARGET'] == 'Android':
|
|
||||||
libevent_include_suffix = 'android'
|
|
||||||
else:
|
|
||||||
libevent_include_suffix = 'linux'
|
|
||||||
|
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
'libevent/buffer.c',
|
'libevent/buffer.c',
|
||||||
'libevent/bufferevent.c',
|
'libevent/bufferevent.c',
|
||||||
|
@ -54,12 +39,6 @@ SOURCES += [
|
||||||
# symbol clash.
|
# symbol clash.
|
||||||
'libevent/evdns.c',
|
'libevent/evdns.c',
|
||||||
]
|
]
|
||||||
DEFINES['HAVE_CONFIG_H'] = True
|
|
||||||
LOCAL_INCLUDES += sorted([
|
|
||||||
'libevent',
|
|
||||||
'libevent/include',
|
|
||||||
'libevent/' + libevent_include_suffix,
|
|
||||||
])
|
|
||||||
|
|
||||||
if os_macosx or os_bsd:
|
if os_macosx or os_bsd:
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
|
|
Загрузка…
Ссылка в новой задаче