Bug 875934 - Move LIBRARY_NAME to moz.build (batch #2); r=mshal
authorBrian O'Keefe <bokeefe@alum.wpi.edu>
Tue, 18 Jun 2013 08:13:42 -0400
changeset 135759 d57032f0b27761d3495b29dbda57c1da36ac1054
parent 135758 d4f61f0a66fd084876fc00fbbfbae9532801d29a
child 135760 3435df09ce346a8807fa2ec3d63ffe43fd03ff8c
push id29806
push usergszorc@mozilla.com
push dateThu, 20 Jun 2013 03:29:11 +0000
treeherdermozilla-inbound@d57032f0b277 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs875934
milestone24.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 875934 - Move LIBRARY_NAME to moz.build (batch #2); r=mshal
browser/components/shell/src/Makefile.in
browser/components/shell/src/moz.build
content/xul/content/src/Makefile.in
content/xul/content/src/moz.build
memory/mozjemalloc/Makefile.in
memory/mozjemalloc/moz.build
toolkit/components/filepicker/Makefile.in
toolkit/components/filepicker/moz.build
toolkit/components/parentalcontrols/Makefile.in
toolkit/components/parentalcontrols/moz.build
toolkit/library/Makefile.in
toolkit/library/moz.build
toolkit/library/winvccorlib/Makefile.in
toolkit/library/winvccorlib/moz.build
tools/profiler/Makefile.in
tools/profiler/moz.build
--- a/browser/components/shell/src/Makefile.in
+++ b/browser/components/shell/src/Makefile.in
@@ -8,35 +8,16 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 FORCE_STATIC_LIB = 1
 USE_STATIC_LIBS = 1
 
-
-# TODO: Previously, LIBRARY_NAME was set as follows:
-#ifdef CPPSRCS
-#LIBRARY_NAME = shellservice_s
-#endif
-# But now we set CPPSRCS in moz.build, which isn't defined at this point.
-# This can be simplified when LIBRARY_NAME is in moz.build as well.
-ifeq ($(OS_ARCH),WINNT)
-LIBRARY_NAME = shellservice_s
-else
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-LIBRARY_NAME = shellservice_s
-else
-ifdef MOZ_WIDGET_GTK
-LIBRARY_NAME = shellservice_s
-endif
-endif
-endif
-
 DISABLED_EXTRA_COMPONENTS = nsSetDefaultBrowser.js nsSetDefaultBrowser.manifest
 
 include $(topsrcdir)/config/rules.mk
 
 DEFINES += -DMOZ_APP_NAME=\"$(MOZ_APP_NAME)\" \
   -DMOZ_APP_VERSION=\"$(MOZ_APP_VERSION)\"
 
 CXXFLAGS += $(TK_CFLAGS)
--- a/browser/components/shell/src/moz.build
+++ b/browser/components/shell/src/moz.build
@@ -14,12 +14,15 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'co
     CPP_SOURCES += [
         'nsMacShellService.cpp',
     ]
 elif CONFIG['MOZ_WIDGET_GTK']:
     CPP_SOURCES += [
         'nsGNOMEShellService.cpp',
     ]
 
+if CPP_SOURCES:
+    LIBRARY_NAME = 'shellservice_s'
+
 EXTRA_COMPONENTS += [
     'nsSetDefaultBrowser.js',
     'nsSetDefaultBrowser.manifest',
 ]
--- a/content/xul/content/src/Makefile.in
+++ b/content/xul/content/src/Makefile.in
@@ -7,17 +7,16 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 FAIL_ON_WARNINGS = 1
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_XUL
-LIBRARY_NAME	= gkconxulcon_s
 MSVC_ENABLE_PGO := 1
 LIBXUL_LIBRARY	= 1
 endif
 
 # we don't want the shared lib, but we want to force the creation of a
 # static lib.
 FORCE_STATIC_LIB = 1
 
--- a/content/xul/content/src/moz.build
+++ b/content/xul/content/src/moz.build
@@ -7,8 +7,9 @@
 MODULE = 'xul'
 
 if CONFIG['MOZ_XUL']:
     CPP_SOURCES += [
         'nsXULElement.cpp',
         'nsXULPopupListener.cpp',
         'nsXULContextMenuBuilder.cpp',
     ]
+    LIBRARY_NAME = 'gkconxulcon_s'
--- a/memory/mozjemalloc/Makefile.in
+++ b/memory/mozjemalloc/Makefile.in
@@ -8,17 +8,16 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifndef MOZ_JEMALLOC3
 DISABLED_CSRCS = jemalloc.c
 
-LIBRARY_NAME = jemalloc
 FORCE_STATIC_LIB= 1
 
 ifeq ($(OS_ARCH),SunOS)
 ifndef GNU_CC
 MODULE_OPTIMIZE_FLAGS = -xO5
 endif
 endif
 
--- a/memory/mozjemalloc/moz.build
+++ b/memory/mozjemalloc/moz.build
@@ -9,8 +9,10 @@ MODULE = 'jemalloc'
 EXPORTS += [
     'jemalloc_types.h',
 ]
 
 if not CONFIG['MOZ_JEMALLOC3']:
     CSRCS += [
         'jemalloc.c',
     ]
+    LIBRARY_NAME = 'jemalloc'
+
--- a/toolkit/components/filepicker/Makefile.in
+++ b/toolkit/components/filepicker/Makefile.in
@@ -8,17 +8,16 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_XUL
 ifeq (,$(filter android qt os2 cocoa windows,$(MOZ_WIDGET_TOOLKIT)))
-LIBRARY_NAME = fileview
 EXPORT_LIBRARY = 1
 IS_COMPONENT = 1
 MODULE_NAME = nsFileViewModule
 LIBXUL_LIBRARY = 1
 DISABLED_EXTRA_COMPONENTS = nsFilePicker.js
 DISABLED_EXTRA_PP_COMPONENTS = nsFilePicker.manifest
 endif
 endif
--- a/toolkit/components/filepicker/moz.build
+++ b/toolkit/components/filepicker/moz.build
@@ -2,16 +2,17 @@
 # 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/.
 
 if CONFIG['MOZ_XUL'] and \
     CONFIG['MOZ_WIDGET_TOOLKIT'] not in ('android', 'qt', 'os2', 'cocoa', 'windows'):
         MODULE = 'filepicker'
+        LIBRARY_NAME = 'fileview'
         XPIDL_SOURCES += [
             'nsIFileView.idl',
         ]
         CPP_SOURCES += [
             'nsFileView.cpp',
         ]
         EXTRA_COMPONENTS += [
             'nsFilePicker.js',
--- a/toolkit/components/parentalcontrols/Makefile.in
+++ b/toolkit/components/parentalcontrols/Makefile.in
@@ -7,15 +7,14 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifndef MOZ_DISABLE_PARENTAL_CONTROLS
 ifeq (WINNT,$(OS_ARCH))
-LIBRARY_NAME = parentalcontrols_s
 FORCE_STATIC_LIB = 1
 LIBXUL_LIBRARY = 1
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/parentalcontrols/moz.build
+++ b/toolkit/components/parentalcontrols/moz.build
@@ -7,11 +7,12 @@
 XPIDL_SOURCES += [
     'nsIParentalControlsService.idl',
 ]
 
 MODULE = 'parentalcontrols'
 
 if not CONFIG['MOZ_DISABLE_PARENTAL_CONTROLS']:
     if CONFIG['OS_ARCH'] == 'WINNT':
+        LIBRARY_NAME = 'parentalcontrols_s'
         CPP_SOURCES += [
             'nsParentalControlsServiceWin.cpp',
         ]
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -12,19 +12,16 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/rdf/util/src/objs.mk
 include $(topsrcdir)/intl/unicharutil/util/objs.mk
 
 MSVC_ENABLE_PGO := 1
 FORCE_SHARED_LIB = 1
 MOZILLA_INTERNAL_API = 1
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-# This is going to be a framework named "XUL", not an ordinary library named
-# "libxul.dylib"
-LIBRARY_NAME=XUL
 # Setting MAKE_FRAMEWORK makes DLL_PREFIX and DLL_SUFFIX be ignored when
 # setting SHARED_LIBRARY; we need to leave DLL_PREFIX and DLL_SUFFIX
 # as-is so that dependencies of the form -ltracemalloc still work.
 MAKE_FRAMEWORK=1
 endif
 
 VPATH += $(topsrcdir)/build/
 
--- a/toolkit/library/moz.build
+++ b/toolkit/library/moz.build
@@ -4,16 +4,23 @@
 # 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_METRO'] and CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['winvccorlib']
 
 MODULE = 'libxul'
 
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+    # This is going to be a framework named "XUL", not an ordinary library named
+    # "libxul.dylib"
+    LIBRARY_NAME = 'XUL'
+else:
+    LIBRARY_NAME = 'xul'
+
 CPP_SOURCES += [
     '$(INTL_UNICHARUTIL_UTIL_LCPPSRCS)',
     '$(RDF_UTIL_SRC_LCPPSRCS)',
     'nsStaticXULComponents.cpp',
 ]
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     CPP_SOURCES += [
@@ -34,10 +41,8 @@ if CONFIG['OS_ARCH'] == 'OS2':
         'dlldeps-xul.cpp',
         'nsGFXDeps.cpp',
     ]
     if not CONFIG['MOZ_NATIVE_ZLIB']:
         CPP_SOURCES += [
             'dlldeps-zlib.cpp',
         ]
 
-LIBRARY_NAME = 'xul'
-
--- a/toolkit/library/winvccorlib/Makefile.in
+++ b/toolkit/library/winvccorlib/Makefile.in
@@ -6,18 +6,16 @@ DEPTH     = @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 # When we're linking GTest we recurse into this directory but don't need
 # to generate this library
 ifndef LINK_GTEST
 
-LIBRARY_NAME	= dummyvccorlib
-
 include $(DEPTH)/config/autoconf.mk
 
 FORCE_SHARED_LIB=1
 
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/library/winvccorlib/moz.build
+++ b/toolkit/library/winvccorlib/moz.build
@@ -1,12 +1,15 @@
 # -*- 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/.
 
 MODULE = 'dummyvccorlib'
 
+if not CONFIG['LINK_GTEST']:
+    LIBRARY_NAME = 'dummyvccorlib'
+
 CPP_SOURCES += [
     'dummyvccorlib.cpp',
 ]
 
--- a/tools/profiler/Makefile.in
+++ b/tools/profiler/Makefile.in
@@ -19,17 +19,16 @@ LOCAL_INCLUDES += \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
   $(NULL)
 
 ifneq (,$(filter armeabi,$(ANDROID_CPU_ARCH)))
 DEFINES += -DARCH_ARMV6
 endif
 
 MODULE_NAME     = nsProfilerModule
-LIBRARY_NAME    = profiler
 EXPORT_LIBRARY  = 1
 LIBXUL_LIBRARY  = 1
 IS_COMPONENT    = 1
 ifndef _MSC_VER
 FAIL_ON_WARNINGS = 1
 endif # !_MSC_VER
 
 # Uncomment for better debugging in opt builds
--- a/tools/profiler/moz.build
+++ b/tools/profiler/moz.build
@@ -1,16 +1,17 @@
 # -*- 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/.
 
 if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
     MODULE = 'profiler'
+    LIBRARY_NAME = 'profiler'
     XPIDL_SOURCES += [
         'nsIProfileSaveEvent.idl',
         'nsIProfiler.idl',
     ]
     EXPORTS += [
         'GeckoProfilerFunc.h',
         'GeckoProfilerImpl.h',
         'PseudoStack.h',