Bug 935548 - Move A11Y_LOG to configure; r=glandium
authorEhsan Akhgari <ehsan@mozilla.com>
Wed, 19 Feb 2014 00:38:42 -0500
changeset 180450 eac78e505370807ac69e46a2f017ac5cfb9b583f
parent 180449 c0929b541062e360a4403c46c049bc1ce58810d7
child 180451 6ecd75aa9821453672929848a3451ce9537a31d6
push id5439
push userffxbld
push dateMon, 17 Mar 2014 23:08:15 +0000
treeherdermozilla-aurora@c0befb3c8038 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs935548
milestone30.0a1
Bug 935548 - Move A11Y_LOG to configure; r=glandium
accessible/src/atk/Makefile.in
accessible/src/base/Makefile.in
accessible/src/base/moz.build
accessible/src/defs.mk
accessible/src/generic/Makefile.in
accessible/src/html/Makefile.in
accessible/src/mac/Makefile.in
accessible/src/other/Makefile.in
accessible/src/shared.mozbuild
accessible/src/windows/Makefile.in
accessible/src/windows/ia2/Makefile.in
accessible/src/windows/msaa/Makefile.in
accessible/src/windows/uia/Makefile.in
accessible/src/xpcom/Makefile.in
accessible/src/xul/Makefile.in
configure.in
--- a/accessible/src/atk/Makefile.in
+++ b/accessible/src/atk/Makefile.in
@@ -7,12 +7,8 @@ include $(topsrcdir)/config/rules.mk
 ifdef MOZ_ENABLE_GTK
 CFLAGS      += $(TK_CFLAGS)
 CXXFLAGS    += $(TK_CFLAGS)
 endif
 
 ifdef MOZ_ENABLE_DBUS
 CXXFLAGS += $(MOZ_DBUS_CFLAGS)
 endif
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
--- a/accessible/src/base/Makefile.in
+++ b/accessible/src/base/Makefile.in
@@ -2,12 +2,8 @@
 # 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/.
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_ENABLE_GTK
 CXXFLAGS        += $(MOZ_CAIRO_CFLAGS)
 endif
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
--- a/accessible/src/base/moz.build
+++ b/accessible/src/base/moz.build
@@ -1,16 +1,14 @@
 # -*- 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/.
 
-include('../shared.mozbuild')
-
 EXPORTS += [
     'AccEvent.h',
     'nsAccessibilityService.h'
 ]
 
 EXPORTS.mozilla.a11y += [
     'AccTypes.h',
     'DocManager.h',
@@ -48,17 +46,17 @@ UNIFIED_SOURCES += [
     'nsTextEquivUtils.cpp',
     'SelectionManager.cpp',
     'StyleInfo.cpp',
     'TextAttrs.cpp',
     'TextUpdater.cpp',
     'TreeWalker.cpp',
 ]
 
-if a11y_log:
+if CONFIG['A11Y_LOG']:
     UNIFIED_SOURCES += [
         'Logging.cpp',
     ]
 
 LOCAL_INCLUDES += [
     '../generic',
     '../html',
     '../xpcom',
deleted file mode 100644
--- a/accessible/src/defs.mk
+++ /dev/null
@@ -1,11 +0,0 @@
-# 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/.
-
-A11Y_LOG = 0
-ifdef MOZ_DEBUG
-  A11Y_LOG = 1
-endif
-ifeq (,$(filter aurora beta release esr,$(MOZ_UPDATE_CHANNEL)))
-  A11Y_LOG = 1
-endif
deleted file mode 100644
--- a/accessible/src/generic/Makefile.in
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
deleted file mode 100644
--- a/accessible/src/html/Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
deleted file mode 100644
--- a/accessible/src/mac/Makefile.in
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
deleted file mode 100644
--- a/accessible/src/other/Makefile.in
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
deleted file mode 100644
--- a/accessible/src/shared.mozbuild
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- 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/.
-
-a11y_log = 0
-if CONFIG['MOZ_DEBUG']:
-    a11y_log = 1
-
-if CONFIG['MOZ_UPDATE_CHANNEL'] not in ('aurora', 'beta', 'release', 'esr'):
-    a11y_log = 1
deleted file mode 100644
--- a/accessible/src/windows/Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
--- a/accessible/src/windows/ia2/Makefile.in
+++ b/accessible/src/windows/ia2/Makefile.in
@@ -2,12 +2,8 @@
 # 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/.
 
 # The midl generated code include Windows headers which defines min and max
 # macros which conflicts with std::min/max.  Suppress the macros:
 OS_CXXFLAGS += -DNOMINMAX
 
 include $(topsrcdir)/config/rules.mk
-
-ifdef A11Y_LOG
-  DEFINES += -DA11Y_LOG
-endif
deleted file mode 100644
--- a/accessible/src/windows/msaa/Makefile.in
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
--- a/accessible/src/windows/uia/Makefile.in
+++ b/accessible/src/windows/uia/Makefile.in
@@ -2,12 +2,8 @@
 # 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/.
 
 # The midl generated code include Windows headers which defines min and max
 # macros which conflicts with std::min/max.  Suppress the macros:
 OS_CXXFLAGS += -DNOMINMAX
 
 include $(topsrcdir)/config/rules.mk
-
-ifdef A11Y_LOG
-  DEFINES += -DA11Y_LOG
-endif
--- a/accessible/src/xpcom/Makefile.in
+++ b/accessible/src/xpcom/Makefile.in
@@ -6,20 +6,16 @@ EXTRA_MDDEPEND_FILES = xpcAccEvents.pp
 
 INSTALL_TARGETS += xpcaccevents
 xpcaccevents_FILES := xpcAccEvents.h
 xpcaccevents_DEST = $(DIST)/include
 xpcaccevents_TARGET := export
 
 include $(topsrcdir)/config/rules.mk
 
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
-
 xpcAccEvents.cpp: $(srcdir)/AccEvents.conf \
                      $(srcdir)/AccEventGen.py \
                      $(LIBXUL_DIST)/sdk/bin/header.py \
                      $(LIBXUL_DIST)/sdk/bin/xpidl.py
 	$(PYTHON) $(topsrcdir)/config/pythonpath.py \
 	  -I$(LIBXUL_DIST)/sdk/bin \
 	  $(srcdir)/AccEventGen.py \
 	  -I $(DEPTH)/dist/idl \
deleted file mode 100644
--- a/accessible/src/xul/Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
-#
-# 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/.
-
-include $(topsrcdir)/config/rules.mk
-
-ifneq ($(A11Y_LOG),0)
-  DEFINES += -DA11Y_LOG
-endif
--- a/configure.in
+++ b/configure.in
@@ -8693,16 +8693,31 @@ if test "$ACCESSIBILITY" -a "$MOZ_ENABLE
     ATK_MAJOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $1 }'`
     ATK_MINOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $2 }'`
     ATK_REV_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $3 }'`
     AC_DEFINE_UNQUOTED(ATK_MAJOR_VERSION, $ATK_MAJOR_VERSION)
     AC_DEFINE_UNQUOTED(ATK_MINOR_VERSION, $ATK_MINOR_VERSION)
     AC_DEFINE_UNQUOTED(ATK_REV_VERSION, $ATK_REV_VERSION)
 fi
 
+if test "$MOZ_DEBUG"; then
+    A11Y_LOG=1
+fi
+case "$MOZ_UPDATE_CHANNEL" in
+aurora|beta|release|esr)
+    ;;
+*)
+    A11Y_LOG=1
+    ;;
+esac
+AC_SUBST(A11Y_LOG)
+if test -n "$A11Y_LOG"; then
+    AC_DEFINE(A11Y_LOG)
+fi
+
 AC_SUBST(MOZILLA_VERSION)
 
 AC_SUBST(ac_configure_args)
 
 dnl Spit out some output
 dnl ========================================================
 
 dnl The following defines are used by xpcom