Bug 870407 - Move final batch of CMMSRCS to moz.build and disallow it in makefiles; r=khuey
authorMs2ger <ms2ger@gmail.com>
Fri, 06 Sep 2013 08:40:41 +0200
changeset 145823 8beb34543e7b431c256dafc7356645f9f75d8028
parent 145822 511fbeed2a3b1d7e2b77b00f061ecc78555a7b8e
child 145824 dabe2b54a50b02864611bdea12bfa3ec2ffb0a0d
push id33402
push userMs2ger@gmail.com
push dateFri, 06 Sep 2013 10:32:21 +0000
treeherdermozilla-inbound@7884c58c28a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey
bugs870407
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 870407 - Move final batch of CMMSRCS to moz.build and disallow it in makefiles; r=khuey
config/rules.mk
js/src/config/rules.mk
tools/profiler/Makefile.in
tools/profiler/moz.build
uriloader/exthandler/Makefile.in
uriloader/exthandler/moz.build
webapprt/mac/Makefile.in
webapprt/mac/moz.build
widget/cocoa/Makefile.in
widget/cocoa/moz.build
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -16,16 +16,17 @@ ifdef INCLUDED_RULES_MK
 endif
 INCLUDED_RULES_MK = 1
 
 # Integrate with mozbuild-generated make files. We first verify that no
 # variables provided by the automatically generated .mk files are
 # present. If they are, this is a violation of the separation of
 # responsibility between Makefile.in and mozbuild files.
 _MOZBUILD_EXTERNAL_VARIABLES := \
+  CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
--- a/js/src/config/rules.mk
+++ b/js/src/config/rules.mk
@@ -16,16 +16,17 @@ ifdef INCLUDED_RULES_MK
 endif
 INCLUDED_RULES_MK = 1
 
 # Integrate with mozbuild-generated make files. We first verify that no
 # variables provided by the automatically generated .mk files are
 # present. If they are, this is a violation of the separation of
 # responsibility between Makefile.in and mozbuild files.
 _MOZBUILD_EXTERNAL_VARIABLES := \
+  CMMSRCS \
   CPP_UNIT_TESTS \
   DIRS \
   EXTRA_PP_COMPONENTS \
   EXTRA_PP_JS_MODULES \
   GTEST_CMMSRCS \
   GTEST_CPPSRCS \
   GTEST_CSRCS \
   HOST_CSRCS \
--- a/tools/profiler/Makefile.in
+++ b/tools/profiler/Makefile.in
@@ -16,14 +16,9 @@ ifneq (,$(filter armeabi,$(ANDROID_CPU_A
 DEFINES += -DARCH_ARMV6
 endif
 
 EXPORT_LIBRARY  = 1
 
 # Uncomment for better debugging in opt builds
 #MOZ_OPTIMIZE_FLAGS += -O0 -g
 
-ifeq ($(OS_TARGET),Darwin)
-CMMSRCS += \
-  shim_mac_dump_syms.mm
 endif
-
-endif
--- a/tools/profiler/moz.build
+++ b/tools/profiler/moz.build
@@ -47,16 +47,19 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
             'shared-libraries-linux.cc',
             'platform-linux.cc',
         ]
     elif CONFIG['OS_TARGET'] == 'Darwin':
         CPP_SOURCES += [
             'shared-libraries-macos.cc',
             'platform-macos.cc',
         ]
+        CMMSRCS += [
+            'shim_mac_dump_syms.mm',
+        ]
     elif CONFIG['OS_TARGET'] == 'WINNT':
         CPP_SOURCES += [
             'shared-libraries-win32.cc',
             'platform-win32.cc',
         ]
 
 EXPORTS += [
     'GeckoProfiler.h',
--- a/uriloader/exthandler/Makefile.in
+++ b/uriloader/exthandler/Makefile.in
@@ -22,23 +22,16 @@ OSDIR		= unix
 endif
 endif
 endif
 endif
 endif
 
 VPATH		:= $(srcdir) $(srcdir)/$(OSDIR)
 
-ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-
-CMMSRCS	= nsOSHelperAppService.mm \
-			nsMIMEInfoMac.mm \
-			nsLocalHandlerAppMac.mm \
-			$(NULL)
-endif
 
 LOCAL_INCLUDES = -I$(srcdir)
 
 LOCAL_INCLUDES += -I$(topsrcdir)/dom/base \
             -I$(topsrcdir)/dom/ipc \
             -I$(topsrcdir)/content/base/src \
             -I$(topsrcdir)/content/events/src \
             -I$(topsrcdir)/netwerk/base/src \
--- a/uriloader/exthandler/moz.build
+++ b/uriloader/exthandler/moz.build
@@ -61,18 +61,21 @@ CPP_SOURCES += [
     'ExternalHelperAppParent.cpp',
     'nsExternalHelperAppService.cpp',
     'nsExternalProtocolHandler.cpp',
     'nsLocalHandlerApp.cpp',
     'nsMIMEInfoImpl.cpp',
 ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
-    # TODO: CMMSRCS go here
-    pass
+    CMMSRCS += [
+        'nsLocalHandlerAppMac.mm',
+        'nsMIMEInfoMac.mm',
+        'nsOSHelperAppService.mm',
+    ]
 else:
     CPP_SOURCES += [
         'nsOSHelperAppService.cpp',
     ]
 
 if CONFIG['MOZ_ENABLE_GTK']:
     CPP_SOURCES += [
         'nsGNOMERegistry.cpp',
--- a/webapprt/mac/Makefile.in
+++ b/webapprt/mac/Makefile.in
@@ -1,18 +1,16 @@
 # 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/.
 
 # This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
 # shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
 NSDISTMODE = copy
 
-CMMSRCS = webapprt.mm
-
 # Don't create a dependency on mozglue, which is impossible (difficult?)
 # to dynamically link into our executable, as we copy it to arbitrary locations.
 MOZ_GLUE_LDFLAGS =
 MOZ_GLUE_PROGRAM_LDFLAGS =
 
 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/base
 LOCAL_INCLUDES += -I$(topsrcdir)/xpcom/build
--- a/webapprt/mac/moz.build
+++ b/webapprt/mac/moz.build
@@ -1,8 +1,12 @@
 # -*- 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/.
 
 PROGRAM = 'webapprt-stub'
 
+CMMSRCS += [
+    'webapprt.mm',
+]
+
--- a/widget/cocoa/Makefile.in
+++ b/widget/cocoa/Makefile.in
@@ -1,58 +1,14 @@
 #
 # 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/.
 
 EXPORT_LIBRARY	= 1
-CMMSRCS = \
-  nsBidiKeyboard.mm \
-  nsClipboard.mm \
-  nsMenuX.mm \
-  nsMenuBarX.mm \
-  nsMenuItemX.mm \
-  nsMenuItemIconX.mm \
-  nsMenuUtilsX.mm \
-  nsMenuGroupOwnerX.mm \
-  nsFilePicker.mm \
-  nsDragService.mm \
-  nsToolkit.mm \
-  nsAppShell.mm \
-  nsCocoaFeatures.mm \
-  nsCocoaUtils.mm \
-  nsCocoaWindow.mm \
-  nsChildView.mm \
-  nsWindowMap.mm \
-  nsWidgetFactory.mm \
-  nsCursorManager.mm \
-  nsMacCursor.mm \
-  nsScreenCocoa.mm \
-  nsScreenManagerCocoa.mm \
-  nsSound.mm \
-  nsLookAndFeel.mm \
-  nsNativeThemeCocoa.mm \
-  nsDeviceContextSpecX.mm \
-  nsPrintDialogX.mm \
-  nsPrintOptionsX.mm \
-  nsPrintSettingsX.mm \
-  nsIdleServiceX.mm \
-  TextInputHandler.mm \
-  nsMacDockSupport.mm \
-  nsStandaloneNativeMenu.mm \
-  nsMacWebAppUtils.mm \
-  GfxInfo.mm \
-  WidgetTraceEvent.mm \
-  NativeKeyBindings.mm \
-  nsColorPicker.mm \
-  $(NULL)
-
-ifeq (x86_64,$(TARGET_CPU))
-CMMSRCS += ComplexTextInputPanel.mm
-endif
 
 SHARED_LIBRARY_LIBS = ../xpwidgets/libxpwidgets_s.a
 
 include $(topsrcdir)/config/rules.mk
 
 NIB_FILES = \
 	classes.nib \
 	info.nib \
--- a/widget/cocoa/moz.build
+++ b/widget/cocoa/moz.build
@@ -18,8 +18,53 @@ EXPORTS += [
     'nsCocoaFeatures.h',
     'nsCocoaUtils.h',
 ]
 
 LIBRARY_NAME = 'widget_mac'
 
 LIBXUL_LIBRARY = True
 
+CMMSRCS += [
+    'GfxInfo.mm',
+    'NativeKeyBindings.mm',
+    'TextInputHandler.mm',
+    'WidgetTraceEvent.mm',
+    'nsAppShell.mm',
+    'nsBidiKeyboard.mm',
+    'nsChildView.mm',
+    'nsClipboard.mm',
+    'nsCocoaFeatures.mm',
+    'nsCocoaUtils.mm',
+    'nsCocoaWindow.mm',
+    'nsColorPicker.mm',
+    'nsCursorManager.mm',
+    'nsDeviceContextSpecX.mm',
+    'nsDragService.mm',
+    'nsFilePicker.mm',
+    'nsIdleServiceX.mm',
+    'nsLookAndFeel.mm',
+    'nsMacCursor.mm',
+    'nsMacDockSupport.mm',
+    'nsMacWebAppUtils.mm',
+    'nsMenuBarX.mm',
+    'nsMenuGroupOwnerX.mm',
+    'nsMenuItemIconX.mm',
+    'nsMenuItemX.mm',
+    'nsMenuUtilsX.mm',
+    'nsMenuX.mm',
+    'nsNativeThemeCocoa.mm',
+    'nsPrintDialogX.mm',
+    'nsPrintOptionsX.mm',
+    'nsPrintSettingsX.mm',
+    'nsScreenCocoa.mm',
+    'nsScreenManagerCocoa.mm',
+    'nsSound.mm',
+    'nsStandaloneNativeMenu.mm',
+    'nsToolkit.mm',
+    'nsWidgetFactory.mm',
+    'nsWindowMap.mm',
+]
+
+if CONFIG['TARGET_CPU'] == 'x86_64':
+    CMMSRCS += [
+        'ComplexTextInputPanel.mm',
+    ]