From 9dcf77e4c67b159040f1f07aca9a8cad8008a914 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 17 Feb 2018 14:09:31 -0500 Subject: Split MOZ_DEVTOOLS into MOZ_DEVTOOLS (client) and MOZ_DEVTOOLS_SERVER (backend) and make both optional --- build/moz.configure/old.configure | 3 +++ devtools/moz.build | 8 ++----- docshell/base/moz.build | 3 --- docshell/base/nsAboutRedirector.cpp | 2 +- docshell/build/moz.build | 3 --- docshell/build/nsDocShellModule.cpp | 2 +- old-configure.in | 42 +++++++++++++++++++++++++++++++++++-- toolkit/toolkit.mozbuild | 4 +++- 8 files changed, 50 insertions(+), 17 deletions(-) diff --git a/build/moz.configure/old.configure b/build/moz.configure/old.configure index bf08a9867..f7877f96f 100644 --- a/build/moz.configure/old.configure +++ b/build/moz.configure/old.configure @@ -169,6 +169,9 @@ def old_configure_options(*options): '--enable-crashreporter', '--enable-dbus', '--enable-debug-js-modules', + '--enable-jetpack', + '--enable-devtools-server', + '--enable-devtools', '--enable-directshow', '--enable-dtrace', '--enable-dump-painting', diff --git a/devtools/moz.build b/devtools/moz.build index 79787d019..8e368facb 100644 --- a/devtools/moz.build +++ b/devtools/moz.build @@ -4,13 +4,9 @@ # 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_DEVTOOLS'] and CONFIG['MOZ_DEVTOOLS'] not in ('all', 'server'): - error('Unsupported MOZ_DEVTOOLS value: %s' % (CONFIG['MOZ_DEVTOOLS'])) +if CONFIG['MOZ_DEVTOOLS']: + DIRS += ['client'] -if CONFIG['MOZ_DEVTOOLS'] == 'all': - DIRS += [ - 'client', - ] DIRS += [ 'server', diff --git a/docshell/base/moz.build b/docshell/base/moz.build index 1eb04c227..6ea3e6d28 100644 --- a/docshell/base/moz.build +++ b/docshell/base/moz.build @@ -81,8 +81,5 @@ LOCAL_INCLUDES += [ if CONFIG['MOZ_TOOLKIT_SEARCH']: DEFINES['MOZ_TOOLKIT_SEARCH'] = True -if CONFIG['MOZ_DEVTOOLS'] == 'all': - DEFINES['MOZ_DEVTOOLS_ALL'] = True - if CONFIG['GNU_CXX']: CXXFLAGS += ['-Wno-error=shadow'] diff --git a/docshell/base/nsAboutRedirector.cpp b/docshell/base/nsAboutRedirector.cpp index 467e563d5..cb62eacbb 100644 --- a/docshell/base/nsAboutRedirector.cpp +++ b/docshell/base/nsAboutRedirector.cpp @@ -57,7 +57,7 @@ static RedirEntry kRedirMap[] = { "credits", "https://www.mozilla.org/credits/", nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT }, -#ifdef MOZ_DEVTOOLS_ALL +#ifdef MOZ_DEVTOOLS { "debugging", "chrome://devtools/content/aboutdebugging/aboutdebugging.xhtml", nsIAboutModule::ALLOW_SCRIPT diff --git a/docshell/build/moz.build b/docshell/build/moz.build index 130ec8736..e47bd89ed 100644 --- a/docshell/build/moz.build +++ b/docshell/build/moz.build @@ -23,6 +23,3 @@ LOCAL_INCLUDES += [ include('/ipc/chromium/chromium-config.mozbuild') FINAL_LIBRARY = 'xul' - -if CONFIG['MOZ_DEVTOOLS'] == 'all': - DEFINES['MOZ_DEVTOOLS_ALL'] = True diff --git a/docshell/build/nsDocShellModule.cpp b/docshell/build/nsDocShellModule.cpp index 1e62e1479..d43c305f9 100644 --- a/docshell/build/nsDocShellModule.cpp +++ b/docshell/build/nsDocShellModule.cpp @@ -169,7 +169,7 @@ const mozilla::Module::ContractIDEntry kDocShellContracts[] = { { NS_ABOUT_MODULE_CONTRACTID_PREFIX "crashes", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, #endif { NS_ABOUT_MODULE_CONTRACTID_PREFIX "credits", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, -#ifdef MOZ_DEVTOOLS_ALL +#ifdef MOZ_DEVTOOLS { NS_ABOUT_MODULE_CONTRACTID_PREFIX "debugging", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, #endif { NS_ABOUT_MODULE_CONTRACTID_PREFIX "license", &kNS_ABOUT_REDIRECTOR_MODULE_CID }, diff --git a/old-configure.in b/old-configure.in index 0b78f2b23..f9e76e727 100644 --- a/old-configure.in +++ b/old-configure.in @@ -2314,8 +2314,9 @@ MOZ_CONTENT_SANDBOX= MOZ_GMP_SANDBOX= MOZ_SANDBOX=1 MOZ_BINARY_EXTENSIONS= -MOZ_DEVTOOLS=server MOZ_JETPACK=1 +MOZ_DEVTOOLS_SERVER=1 +MOZ_DEVTOOLS= case "$target_os" in mingw*) @@ -4806,6 +4807,44 @@ fi AC_SUBST(MOZ_JETPACK) +dnl ======================================================== +dnl = Disable Mozilla Developer Tools (server) +dnl ======================================================== +MOZ_ARG_DISABLE_BOOL(devtools-server, +[ --disable-devtools-server Disable Mozilla Developer Tools (server)], + MOZ_DEVTOOLS_SERVER=, + MOZ_DEVTOOLS_SERVER=1) + + + +if test -n "$MOZ_DEVTOOLS_SERVER"; then + if test ! -n "$MOZ_JETPACK"; then + AC_MSG_ERROR("Jetpack is required to include the Developer Tools Server") + fi + + AC_DEFINE(MOZ_DEVTOOLS_SERVER) +fi + +AC_SUBST(MOZ_DEVTOOLS_SERVER) + +dnl ======================================================== +dnl = Enable Mozilla Developer Tools (client) +dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(devtools, +[ --enable-devtools Enable Mozilla Developer Tools (client)], + MOZ_DEVTOOLS=1, + MOZ_DEVTOOLS=) + +if test -n "$MOZ_DEVTOOLS"; then + if test ! -n "$MOZ_DEVTOOLS_SERVER"; then + AC_MSG_ERROR("The Developer Tools Server is required to include the client") + fi + + AC_DEFINE(MOZ_DEVTOOLS) +fi + +AC_SUBST(MOZ_DEVTOOLS) + dnl ======================================================== dnl = Define default location for MOZILLA_FIVE_HOME dnl ======================================================== @@ -5688,7 +5727,6 @@ AC_SUBST(LIBJPEG_TURBO_USE_YASM) AC_SUBST_LIST(LIBJPEG_TURBO_ASFLAGS) AC_SUBST(MOZ_LIBAV_FFT) AC_SUBST_LIST(LIBAV_FFT_ASFLAGS) -AC_SUBST(MOZ_DEVTOOLS) AC_SUBST(MOZ_PACKAGE_JSSHELL) AC_SUBST(MOZ_FOLD_LIBS) diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild index 439282525..d94f1240a 100644 --- a/toolkit/toolkit.mozbuild +++ b/toolkit/toolkit.mozbuild @@ -132,8 +132,10 @@ DIRS += [ if CONFIG['MOZ_PREF_EXTENSIONS']: DIRS += ['/extensions/pref'] +if CONFIG['MOZ_DEVTOOLS_SERVER']: + DIRS += ['/devtools'] + DIRS += [ - '/devtools', '/services', '/startupcache', '/js/ductwork/debugger', -- cgit v1.2.3