Bug 1221453 - Use AbsolutePaths with LOCAL_INCLUDES instead of manual -I in CXXFLAGS. r=gps

This commit is contained in:
Mike Hommey 2015-11-04 14:28:42 +09:00
Родитель 762aba02cd
Коммит 4d40edea15
20 изменённых файлов: 122 добавлений и 88 удалений

Просмотреть файл

@ -42,13 +42,16 @@ FINAL_LIBRARY = 'xul'
# These includes are from Android JB, for use of MediaCodec.
LOCAL_INCLUDES += ['/ipc/chromium/src']
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/native/opengl/include',
'frameworks/native/include',
'frameworks/av/include/media',
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '15':
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/av/include/media',
'frameworks/native/include',
'frameworks/native/opengl/include',
]
]
]
include('/ipc/chromium/chromium-config.mozbuild')

Просмотреть файл

@ -97,20 +97,26 @@ LOCAL_INCLUDES += [
'/ipc/chromium/src',
]
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'dalvik/libnativehelper/include/nativehelper',
'frameworks/av/include/media',
'frameworks/base/include',
'frameworks/base/include/binder',
'frameworks/base/include/utils',
'frameworks/base/include/media',
'frameworks/base/include/media/stagefright/openmax',
'frameworks/base/media/libstagefright/include',
'frameworks/native/opengl/include',
'frameworks/native/include',
'hardware/libhardware/include/',
if CONFIG['ANDROID_VERSION'] == '15':
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'dalvik/libnativehelper/include/nativehelper',
'frameworks/base/include',
'frameworks/base/include/binder',
'frameworks/base/include/media',
'frameworks/base/include/media/stagefright/openmax',
'frameworks/base/include/utils',
'frameworks/base/media/libstagefright/include',
'hardware/libhardware/include',
]
]
else:
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/av/include/media',
'frameworks/native/include',
'frameworks/native/opengl/include',
]
]
if CONFIG['ANDROID_VERSION'] > '15':

Просмотреть файл

@ -33,7 +33,7 @@ if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
FINAL_LIBRARY = 'xul'
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/native/opengl/include',]
]

Просмотреть файл

@ -40,12 +40,14 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
EXPORTS += ['OSXRunLoopSingleton.h']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/wilhelm/include',
'system/media/wilhelm/include',
if CONFIG['ANDROID_VERSION'] >= '17':
LOCAL_INCLUDES += [
'%' + '%s/frameworks/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
]
else:
LOCAL_INCLUDES += [
'%' + '%s/system/media/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
]
]
if CONFIG['_MSC_VER']:
DEFINES['__PRETTY_FUNCTION__'] = '__FUNCSIG__'

Просмотреть файл

@ -66,9 +66,9 @@ UNIFIED_SOURCES += [
]
if CONFIG['ANDROID_VERSION'] >= '17':
CXXFLAGS += ['-I%s/frameworks/av/media/mtp' % CONFIG['ANDROID_SOURCE']]
LOCAL_INCLUDES += ['%' + '%s/frameworks/av/media/mtp' % CONFIG['ANDROID_SOURCE']]
else:
CXXFLAGS += ['-I%s/frameworks/base/media/mtp' % CONFIG['ANDROID_SOURCE']]
LOCAL_INCLUDES += ['%' + '%s/frameworks/base/media/mtp' % CONFIG['ANDROID_SOURCE']]
if CONFIG['ENABLE_TESTS']:
XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']

Просмотреть файл

@ -129,7 +129,7 @@ if CONFIG['GNU_CXX']:
]
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
DEFINES['_HAS_EXCEPTIONS'] = 0

Просмотреть файл

@ -277,7 +277,7 @@ if CONFIG['GNU_CXX']:
]
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
DEFINES['_HAS_EXCEPTIONS'] = 0

Просмотреть файл

@ -33,7 +33,7 @@ if CONFIG['GNU_CXX']:
]
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
DEFINES['_HAS_EXCEPTIONS'] = 0

Просмотреть файл

@ -39,7 +39,7 @@ if CONFIG['GNU_CXX']:
]
if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
LOCAL_INCLUDES += ['%' + '%s/include/' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
DEFINES['_HAS_EXCEPTIONS'] = 0

Просмотреть файл

@ -86,7 +86,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp']
EXPORTS += ['SharedSurfaceGralloc.h']
LOCAL_INCLUDES += ['/widget/gonk']
CXXFLAGS += ['-I%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')]
LOCAL_INCLUDES += ['%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')]
if gl_provider == 'CGL':
# These files include Mac headers that are unfriendly to unified builds

Просмотреть файл

@ -228,11 +228,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
'opengl/GrallocTextureHost.cpp',
]
LOCAL_INCLUDES += ['/widget/gonk']
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'system/core/libsync/include'
]
]
if CONFIG['ANDROID_VERSION'] >= '21':
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'system/core/libsync/include'
]
]
SOURCES += [
'ipc/ShadowLayerUtilsGralloc.cpp',
]
@ -403,14 +404,21 @@ if CONFIG['MOZ_DEBUG']:
if CONFIG['MOZ_ENABLE_D3D10_LAYER']:
DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/base/include/media/stagefright',
'frameworks/base/include/media/stagefright/openmax',
'frameworks/av/include/media/stagefright',
'frameworks/native/include/media/openmax',
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
if CONFIG['ANDROID_VERSION'] > '17':
includes = [
'frameworks/av/include/media/stagefright',
'frameworks/native/include/media/openmax',
]
else:
includes = [
'frameworks/base/include/media/stagefright',
'frameworks/base/include/media/stagefright/openmax',
]
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in includes
]
]
if CONFIG['ENABLE_TESTS']:
DIRS += ['apz/test/gtest']

Просмотреть файл

@ -174,7 +174,7 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
CXXFLAGS += ['-I%s/hardware/libhardware_legacy/include' % CONFIG['ANDROID_SOURCE']]
LOCAL_INCLUDES += ['%' + '%s/hardware/libhardware_legacy/include' % CONFIG['ANDROID_SOURCE']]
CFLAGS += CONFIG['GLIB_CFLAGS']
CFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS']

Просмотреть файл

@ -85,17 +85,18 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
LOCAL_INCLUDES += [
'/dom/system/gonk',
]
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'dalvik/libnativehelper/include/nativehelper',
'frameworks/base/include',
'frameworks/base/include/binder',
'frameworks/base/include/utils',
'frameworks/base/include/media',
'frameworks/base/include/media/stagefright/openmax',
'frameworks/base/media/libstagefright/include',
if CONFIG['ANDROID_VERSION'] == '15':
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'dalvik/libnativehelper/include/nativehelper',
'frameworks/base/include',
'frameworks/base/include/binder',
'frameworks/base/include/media',
'frameworks/base/include/media/stagefright/openmax',
'frameworks/base/include/utils',
'frameworks/base/media/libstagefright/include',
]
]
]
if CONFIG['MOZ_B2G_FM']:
LOCAL_INCLUDES += [

Просмотреть файл

@ -63,12 +63,14 @@ if CONFIG['OS_TARGET'] == 'Android':
FINAL_LIBRARY = 'gkmedias'
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
CFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/wilhelm/include',
'system/media/wilhelm/include',
if CONFIG['ANDROID_VERSION'] >= '17':
LOCAL_INCLUDES += [
'%' + '%s/frameworks/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
]
else:
LOCAL_INCLUDES += [
'%' + '%s/system/media/wilhelm/include' % CONFIG['ANDROID_SOURCE'],
]
]
CFLAGS += CONFIG['MOZ_ALSA_CFLAGS']
CFLAGS += CONFIG['MOZ_PULSEAUDIO_CFLAGS']

Просмотреть файл

@ -33,20 +33,22 @@ if CONFIG['GNU_CXX']:
CXXFLAGS += ['-Wno-multichar']
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'dalvik/libnativehelper/include/nativehelper',
'frameworks/base/include/',
'frameworks/base/include/binder/',
'frameworks/base/include/utils/',
'frameworks/base/include/media/',
'frameworks/base/include/media/stagefright/openmax',
'frameworks/base/media/libstagefright/include',
'frameworks/base/native/include',
'system/core/include',
'hardware/libhardware/include',
]
]
if CONFIG['ANDROID_VERSION'] == '15':
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'dalvik/libnativehelper/include/nativehelper',
'frameworks/base/include/',
'frameworks/base/include/binder/',
'frameworks/base/include/media/',
'frameworks/base/include/media/stagefright/openmax',
'frameworks/base/include/utils/',
'frameworks/base/media/libstagefright/include',
'frameworks/base/native/include',
'hardware/libhardware/include',
'system/core/include',
]
]
EXTRA_DSO_LDOPTS += [
'-lutils',
'-lstagefright',

Просмотреть файл

@ -17,8 +17,8 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] >= '16
'nsDNSServiceDiscovery.cpp',
]
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'external/mdnsresponder/mDNSShared',
]
]

Просмотреть файл

@ -67,7 +67,7 @@ LOCAL_INCLUDES += [
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['ANDROID_VERSION'] > '19':
CXXFLAGS += ['-I%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']]
LOCAL_INCLUDES += ['%' + '%s/bionic/libc/dns/include' % CONFIG['ANDROID_SOURCE']]
if CONFIG['ENABLE_INTL_API']:
DEFINES['IDNA2008'] = True

Просмотреть файл

@ -66,8 +66,8 @@ for var in ('IMPL_NS_NET', 'FORCE_PR_LOG'):
DEFINES[var] = True
if CONFIG['ANDROID_VERSION'] == '15':
CXXFLAGS += ['-I%s/frameworks/base/media/libstagefright/mpeg2ts' % CONFIG['ANDROID_SOURCE']]
LOCAL_INCLUDES += ['%' + '%s/frameworks/base/media/libstagefright/mpeg2ts' % CONFIG['ANDROID_SOURCE']]
else:
CXXFLAGS += ['-I%s/frameworks/av/media/libstagefright/mpeg2ts' % CONFIG['ANDROID_SOURCE']]
LOCAL_INCLUDES += ['%' + '%s/frameworks/av/media/libstagefright/mpeg2ts' % CONFIG['ANDROID_SOURCE']]
CXXFLAGS += ['-Wno-multichar']

Просмотреть файл

@ -52,12 +52,18 @@ DEFINES['XPCOM_GLUE'] = True
DISABLE_STL_WRAPPING = True
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/native/include/gui',
'frameworks/native/opengl/include',
if CONFIG['ANDROID_VERSION'] > '15':
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'frameworks/native/include/gui',
'frameworks/native/opengl/include',
'system/core/libsuspend/include',
]
]
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'hardware/libhardware/include',
'hardware/libhardware_legacy/include',
'system/core/libsuspend/include',
]
]

Просмотреть файл

@ -96,10 +96,14 @@ if CONFIG['ANDROID_VERSION'] != '15':
if CONFIG['MOZ_OMX_DECODER']:
DEFINES['MOZ_OMX_DECODER'] = True
CXXFLAGS += [
'-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
if CONFIG['ANDROID_VERSION'] > '15':
LOCAL_INCLUDES += [
'%' + '%s/frameworks/native/opengl/include' % CONFIG['ANDROID_SOURCE'],
]
LOCAL_INCLUDES += [
'%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
'hardware/libhardware/include',
'hardware/libhardware_legacy/include',
'frameworks/native/opengl/include',
]
]