Bug 1200065 - Split Mozilla specific code from extensions/spellcheck/hunspell directory to glue directory and adjusted moz.build files. r=glandium
rename from extensions/spellcheck/hunspell/src/PRemoteSpellcheckEngine.ipdl
rename to extensions/spellcheck/hunspell/glue/PRemoteSpellcheckEngine.ipdl
rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.cpp
rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.cpp
rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineChild.h
rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineChild.h
rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.cpp
rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.cpp
rename from extensions/spellcheck/hunspell/src/RemoteSpellCheckEngineParent.h
rename to extensions/spellcheck/hunspell/glue/RemoteSpellCheckEngineParent.h
rename from extensions/spellcheck/hunspell/src/hunspell_alloc_hooks.h
rename to extensions/spellcheck/hunspell/glue/hunspell_alloc_hooks.h
rename from extensions/spellcheck/hunspell/src/hunspell_fopen_hooks.h
rename to extensions/spellcheck/hunspell/glue/hunspell_fopen_hooks.h
copy from extensions/spellcheck/hunspell/src/moz.build
copy to extensions/spellcheck/hunspell/glue/moz.build
--- a/extensions/spellcheck/hunspell/src/moz.build
+++ b/extensions/spellcheck/hunspell/glue/moz.build
@@ -6,51 +6,30 @@
SOURCES += [
'mozHunspell.cpp',
'mozHunspellDirProvider.cpp',
'RemoteSpellCheckEngineChild.cpp',
'RemoteSpellCheckEngineParent.cpp',
]
-if not CONFIG['MOZ_NATIVE_HUNSPELL']:
- SOURCES += [
- 'affentry.cxx',
- 'affixmgr.cxx',
- 'csutil.cxx',
- 'dictmgr.cxx',
- 'filemgr.cxx',
- 'hashmgr.cxx',
- 'hunspell.cxx',
- 'hunzip.cxx',
- 'phonet.cxx',
- 'replist.cxx',
- 'suggestmgr.cxx',
- ]
- # This variable is referenced in configure.in. Make sure to change that file
- # too if you need to change this variable.
- DEFINES['HUNSPELL_STATIC'] = True
-else:
- CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
+CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
+ '../src',
'/dom/base',
'/editor/libeditor',
'/extensions/spellcheck/src',
]
-# XXX: This directory is a mix of Mozilla code and third-party code. We should
-# put the Mozilla code in a separate directory and disallow compiler warnings
-# there (bug 1200065). Until then, allow warnings for all of the code.
-ALLOW_COMPILER_WARNINGS = True
-
include('/ipc/chromium/chromium-config.mozbuild')
IPDL_SOURCES = [
'PRemoteSpellcheckEngine.ipdl',
]
EXPORTS.mozilla += [
'RemoteSpellCheckEngineChild.h',
'RemoteSpellCheckEngineParent.h',
]
+
rename from extensions/spellcheck/hunspell/src/mozHunspell.cpp
rename to extensions/spellcheck/hunspell/glue/mozHunspell.cpp
rename from extensions/spellcheck/hunspell/src/mozHunspell.h
rename to extensions/spellcheck/hunspell/glue/mozHunspell.h
rename from extensions/spellcheck/hunspell/src/mozHunspellAllocator.h
rename to extensions/spellcheck/hunspell/glue/mozHunspellAllocator.h
rename from extensions/spellcheck/hunspell/src/mozHunspellDirProvider.cpp
rename to extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.cpp
rename from extensions/spellcheck/hunspell/src/mozHunspellDirProvider.h
rename to extensions/spellcheck/hunspell/glue/mozHunspellDirProvider.h
--- a/extensions/spellcheck/hunspell/moz.build
+++ b/extensions/spellcheck/hunspell/moz.build
@@ -1,10 +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/.
-DIRS += ['src']
+DIRS += ['glue']
+if not CONFIG['MOZ_NATIVE_HUNSPELL']:
+ DIRS += ['src']
if CONFIG['ENABLE_TESTS']:
- XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
+ XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
--- a/extensions/spellcheck/hunspell/src/moz.build
+++ b/extensions/spellcheck/hunspell/src/moz.build
@@ -1,56 +1,34 @@
# -*- 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/.
SOURCES += [
- 'mozHunspell.cpp',
- 'mozHunspellDirProvider.cpp',
- 'RemoteSpellCheckEngineChild.cpp',
- 'RemoteSpellCheckEngineParent.cpp',
+ 'affentry.cxx',
+ 'affixmgr.cxx',
+ 'csutil.cxx',
+ 'dictmgr.cxx',
+ 'filemgr.cxx',
+ 'hashmgr.cxx',
+ 'hunspell.cxx',
+ 'hunzip.cxx',
+ 'phonet.cxx',
+ 'replist.cxx',
+ 'suggestmgr.cxx',
]
-if not CONFIG['MOZ_NATIVE_HUNSPELL']:
- SOURCES += [
- 'affentry.cxx',
- 'affixmgr.cxx',
- 'csutil.cxx',
- 'dictmgr.cxx',
- 'filemgr.cxx',
- 'hashmgr.cxx',
- 'hunspell.cxx',
- 'hunzip.cxx',
- 'phonet.cxx',
- 'replist.cxx',
- 'suggestmgr.cxx',
- ]
- # This variable is referenced in configure.in. Make sure to change that file
- # too if you need to change this variable.
- DEFINES['HUNSPELL_STATIC'] = True
-else:
- CXXFLAGS += CONFIG['MOZ_HUNSPELL_CFLAGS']
+# This variable is referenced in configure.in. Make sure to change that file
+# too if you need to change this variable.
+DEFINES['HUNSPELL_STATIC'] = True
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
- '/dom/base',
- '/editor/libeditor',
- '/extensions/spellcheck/src',
+ '../glue',
]
-# XXX: This directory is a mix of Mozilla code and third-party code. We should
-# put the Mozilla code in a separate directory and disallow compiler warnings
-# there (bug 1200065). Until then, allow warnings for all of the code.
ALLOW_COMPILER_WARNINGS = True
include('/ipc/chromium/chromium-config.mozbuild')
-IPDL_SOURCES = [
- 'PRemoteSpellcheckEngine.ipdl',
-]
-
-EXPORTS.mozilla += [
- 'RemoteSpellCheckEngineChild.h',
- 'RemoteSpellCheckEngineParent.h',
-]
--- a/extensions/spellcheck/src/moz.build
+++ b/extensions/spellcheck/src/moz.build
@@ -14,15 +14,16 @@ SOURCES += [
'mozSpellChecker.cpp',
'mozSpellCheckerFactory.cpp',
'mozSpellI18NManager.cpp',
]
FINAL_LIBRARY = 'xul'
LOCAL_INCLUDES += [
+ '../hunspell/glue',
'../hunspell/src',
'/dom/base',
'/editor/libeditor',
]
EXPORTS.mozilla += [
'mozSpellChecker.h',
]
--- a/tools/rewriting/ThirdPartyPaths.txt
+++ b/tools/rewriting/ThirdPartyPaths.txt
@@ -1,14 +1,13 @@
browser/components/translation/cld2/
build/stlport/
db/sqlite3/src/
dom/media/platforms/ffmpeg/libav
-extensions/spellcheck/hunspell/src/*.cxx
-extensions/spellcheck/hunspell/src/*.hxx
+extensions/spellcheck/hunspell/src/
gfx/2d/convolver
gfx/2d/image_operations
gfx/angle/
gfx/cairo/
gfx/graphite2/
gfx/harfbuzz/
gfx/ots/
gfx/qcms/