Bug 902316 - Build external projects in external tier; r=glandium, gps
authorTrevor Saunders <trev.saunders@gmail.com>
Fri, 09 Aug 2013 15:01:08 -0700
changeset 141925 18fbebfda0cdcd9b7be5951b36e32a0e94eb940a
parent 141924 2d0efde9e71b510732aaa3a52a3c8b74522d3ae5
child 141926 ea854a4e9e95ddaad6031e90c31436cdeb6dd7dc
push id32291
push usergszorc@mozilla.com
push dateFri, 09 Aug 2013 22:02:30 +0000
treeherdermozilla-inbound@18fbebfda0cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium, gps
bugs902316
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 902316 - Build external projects in external tier; r=glandium, gps
config/external/moz.build
toolkit/toolkit.mozbuild
new file mode 100644
--- /dev/null
+++ b/config/external/moz.build
@@ -0,0 +1,64 @@
+
+external_dirs = []
+if not CONFIG['MOZ_NATIVE_SQLITE']:
+    external_dirs += ['db/sqlite3/src']
+
+if not CONFIG['MOZ_NATIVE_JPEG']:
+    external_dirs += ['media/libjpeg']
+
+if CONFIG['MOZ_UPDATER']:
+    if not CONFIG['MOZ_NATIVE_BZ2']:
+        external_dirs += ['modules/libbz2']
+
+if CONFIG['MOZ_VORBIS']:
+    external_dirs += ['media/libvorbis']
+
+if CONFIG['MOZ_TREMOR']:
+    external_dirs += ['media/libtremor']
+
+if CONFIG['MOZ_OPUS']:
+    external_dirs += ['media/libopus']
+
+if CONFIG['MOZ_WEBM']:
+    external_dirs += ['media/libnestegg']
+
+if CONFIG['MOZ_VP8'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
+    external_dirs += ['media/libvpx']
+
+if CONFIG['MOZ_OGG']:
+    external_dirs += ['media/libogg', 'media/libtheora']
+
+if CONFIG['MOZ_SPEEX_RESAMPLER']:
+    external_dirs += ['media/libspeex_resampler']
+
+if CONFIG['MOZ_SOUNDTOUCH']:
+    external_dirs += ['media/libsoundtouch']
+
+if CONFIG['MOZ_CUBEB']:
+    external_dirs += ['media/libcubeb']
+
+if CONFIG['MOZ_OMX_PLUGIN']:
+    external_dirs += [
+        'media/omx-plugin/lib/ics/libutils',
+        'media/omx-plugin/lib/ics/libstagefright',
+        'media/omx-plugin/lib/gb/libutils',
+        'media/omx-plugin/lib/gb/libstagefright',
+        'media/omx-plugin/lib/gb/libstagefright_color_conversion',
+        'media/omx-plugin/lib/gb235/libstagefright',
+        'media/omx-plugin/lib/froyo/libstagefright',
+        'media/omx-plugin',
+        'media/omx-plugin/gb',
+        'media/omx-plugin/gb235',
+        'media/omx-plugin/froyo',
+        'media/omx-plugin/lib/hc/libstagefright',
+        'media/omx-plugin/hc',
+        'media/omx-plugin/sony',
+        'media/omx-plugin/jb-htc',
+    ]
+
+if not CONFIG['MOZ_NATIVE_PNG']:
+    external_dirs += ['media/libpng']
+
+external_dirs += ['media/kiss_fft']
+
+PARALLEL_DIRS += ['../../' + i for i in external_dirs]
--- a/toolkit/toolkit.mozbuild
+++ b/toolkit/toolkit.mozbuild
@@ -5,25 +5,27 @@
 
 if CONFIG['LIBXUL_SDK']:
     error('toolkit.mozbuild is not compatible with --enable-libxul-sdk=')
 
 if not CONFIG['MOZ_NATIVE_NSPR']:
     add_tier_dir('nspr', 'config/nspr')
 
 add_tier_dir('precompile', 'config/makefiles/precompile')
-
-if not CONFIG['MOZ_NATIVE_SQLITE']:
-    add_tier_dir('nss', 'db/sqlite3/src')
+add_tier_dir('external', 'config/external')
 
 if not CONFIG['MOZ_NATIVE_NSS']:
     add_tier_dir('nss', 'security/build')
 
 include('/config/js/js.mozbuild')
 
+# the signing related bits of libmar depend on nss
+if CONFIG['MOZ_UPDATER']:
+    add_tier_dir('platform', 'modules/libmar')
+
 if CONFIG['NS_TRACE_MALLOC']:
     add_tier_dir('platform', 'tools/trace-malloc/lib')
 
 if CONFIG['MOZ_DMD']:
     add_tier_dir('platform', 'memory/replace/dmd')
 
 if CONFIG['MOZ_TREE_FREETYPE']:
     add_tier_dir('platform', 'modules/freetype2', static=True)
@@ -34,25 +36,17 @@ add_tier_dir('platform', [
     'modules/libpref',
     'intl',
     'netwerk',
 ])
 
 if CONFIG['MOZ_AUTH_EXTENSION']:
     add_tier_dir('platform', 'extensions/auth')
 
-# External/3rd party libraries.
-
-if not CONFIG['MOZ_NATIVE_JPEG']:
-    add_tier_dir('platform', 'media/libjpeg')
-
 if CONFIG['MOZ_UPDATER']:
-    if not CONFIG['MOZ_NATIVE_BZ2']:
-        add_tier_dir('platform', 'modules/libbz2')
-
     add_tier_dir('platform', 'other-licenses/bsdiff')
 
 # Gecko/Core components.
 
 add_tier_dir('platform', ['ipc', 'js/ipc'])
 
 add_tier_dir('platform', ['hal', 'js/xpconnect', 'intl/chardet'])
 
@@ -61,75 +55,24 @@ add_tier_dir('platform', ['modules/libja
 if CONFIG['MOZ_PERMISSIONS']:
     add_tier_dir('platform', ['extensions/cookie', 'extensions/permissions'])
 
 add_tier_dir('platform', 'rdf')
 
 if CONFIG['MOZ_JSDEBUGGER']:
     add_tier_dir('platform', 'js/jsd')
 
-if CONFIG['MOZ_VORBIS']:
-    add_tier_dir('platform', 'media/libvorbis')
-
-if CONFIG['MOZ_TREMOR']:
-    add_tier_dir('platform', 'media/libtremor')
-
-if CONFIG['MOZ_OPUS']:
-    add_tier_dir('platform', 'media/libopus')
-
-if CONFIG['MOZ_WEBM']:
-    add_tier_dir('platform', 'media/libnestegg')
-
-if CONFIG['MOZ_VP8'] and not CONFIG['MOZ_NATIVE_LIBVPX']:
-    add_tier_dir('platform', 'media/libvpx')
-
-if CONFIG['MOZ_OGG']:
-    add_tier_dir('platform', ['media/libogg', 'media/libtheora'])
-
 if CONFIG['MOZ_WEBRTC']:
     add_tier_dir('platform', [
         'media/webrtc',
         'media/mtransport/third_party',
         'media/mtransport/build',
         'media/mtransport/standalone',
     ])
 
-if CONFIG['MOZ_SPEEX_RESAMPLER']:
-    add_tier_dir('platform', 'media/libspeex_resampler')
-
-if CONFIG['MOZ_SOUNDTOUCH']:
-    add_tier_dir('platform', 'media/libsoundtouch')
-
-if CONFIG['MOZ_CUBEB']:
-    add_tier_dir('platform', 'media/libcubeb')
-
-if CONFIG['MOZ_OMX_PLUGIN']:
-    add_tier_dir('platform', [
-        'media/omx-plugin/lib/ics/libutils',
-        'media/omx-plugin/lib/ics/libstagefright',
-        'media/omx-plugin/lib/gb/libutils',
-        'media/omx-plugin/lib/gb/libstagefright',
-        'media/omx-plugin/lib/gb/libstagefright_color_conversion',
-        'media/omx-plugin/lib/gb235/libstagefright',
-        'media/omx-plugin/lib/froyo/libstagefright',
-        'media/omx-plugin',
-        'media/omx-plugin/gb',
-        'media/omx-plugin/gb235',
-        'media/omx-plugin/froyo',
-        'media/omx-plugin/lib/hc/libstagefright',
-        'media/omx-plugin/hc',
-        'media/omx-plugin/sony',
-        'media/omx-plugin/jb-htc',
-    ])
-
-if not CONFIG['MOZ_NATIVE_PNG']:
-    add_tier_dir('platform', 'media/libpng')
-
-add_tier_dir('platform', 'media/kiss_fft')
-
 if CONFIG['ENABLE_TESTS']:
     add_tier_dir('platform', 'testing/specialpowers')
 
 if CONFIG['ENABLE_TESTS']:
     add_tier_dir('platform', 'testing/gtest')
 
 add_tier_dir('platform', [
     'uriloader',
@@ -175,19 +118,16 @@ add_tier_dir('platform', 'xpfe/component
 if CONFIG['MOZ_ENABLE_XREMOTE']:
     add_tier_dir('platform', 'widget/xremoteclient')
 
 if CONFIG['MOZ_SPELLCHECK']:
     add_tier_dir('platform', 'extensions/spellcheck')
 
 add_tier_dir('platform', 'security/manager')
 
-if CONFIG['MOZ_UPDATER']:
-    add_tier_dir('platform', 'modules/libmar')
-
 add_tier_dir('platform', 'toolkit')
 
 if CONFIG['MOZ_PREF_EXTENSIONS']:
     add_tier_dir('platform', 'extensions/pref')
 
 add_tier_dir('platform', 'services')
 add_tier_dir('platform', 'startupcache')
 add_tier_dir('platform', 'js/ductwork/debugger')