--- a/embedding/Makefile.in
+++ b/embedding/Makefile.in
@@ -8,22 +8,13 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = @relativesrcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = embed
-DIRS = base components browser
-
-TEST_DIRS += test
ifdef ENABLE_TESTS
XPCSHELL_TESTS = tests/unit
endif
-ifeq ($(MOZ_WIDGET_TOOLKIT),android)
-ifneq (,$(filter mobile/xul b2g,$(MOZ_BUILD_APP)))
-DIRS += android
-endif
-endif
-
include $(topsrcdir)/config/rules.mk
--- a/embedding/android/Makefile.in
+++ b/embedding/android/Makefile.in
@@ -5,18 +5,16 @@
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/ipc/app/defs.mk
-DIRS = locales
-
JAVAFILES = \
GeckoApp.java \
GeckoAppShell.java \
GeckoConnectivityReceiver.java \
GeckoEvent.java \
GeckoSurfaceView.java \
GeckoInputConnection.java \
AlertNotification.java \
new file mode 100644
--- /dev/null
+++ b/embedding/android/locales/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/android/moz.build
@@ -0,0 +1,6 @@
+# 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 += ['locales']
new file mode 100644
--- /dev/null
+++ b/embedding/base/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
--- a/embedding/browser/Makefile.in
+++ b/embedding/browser/Makefile.in
@@ -4,12 +4,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
-
-DIRS = webBrowser build
-
include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/embedding/browser/build/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/browser/moz.build
@@ -0,0 +1,6 @@
+# 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 += ['webBrowser', 'build']
new file mode 100644
--- /dev/null
+++ b/embedding/browser/webBrowser/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
--- a/embedding/components/Makefile.in
+++ b/embedding/components/Makefile.in
@@ -4,23 +4,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
-
-# You'd think we could skip building ui if XUL is disabled,
-# but we need to export interface headers from those directories.
-
-DIRS = windowwatcher appstartup/src find webbrowserpersist commandhandler
-
-ifdef MOZ_XUL
-ifdef NS_PRINTING
-DIRS += printingui/src
-endif
-endif
-
-DIRS += build
-
include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/embedding/components/appstartup/src/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/build/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
--- a/embedding/components/commandhandler/Makefile.in
+++ b/embedding/components/commandhandler/Makefile.in
@@ -6,11 +6,10 @@
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = commandhandler
-DIRS = public src
include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/embedding/components/commandhandler/moz.build
@@ -0,0 +1,6 @@
+# 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 += ['public', 'src']
new file mode 100644
--- /dev/null
+++ b/embedding/components/commandhandler/public/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/commandhandler/src/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
--- a/embedding/components/find/Makefile.in
+++ b/embedding/components/find/Makefile.in
@@ -6,11 +6,10 @@
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = find
-DIRS = public src
include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/embedding/components/find/moz.build
@@ -0,0 +1,6 @@
+# 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 += ['public', 'src']
new file mode 100644
--- /dev/null
+++ b/embedding/components/find/public/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/find/src/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/moz.build
@@ -0,0 +1,19 @@
+# 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/.
+
+# You'd think we could skip building ui if XUL is disabled,
+# but we need to export interface headers from those directories.
+DIRS += [
+ 'windowwatcher',
+ 'appstartup/src',
+ 'find',
+ 'webbrowserpersist',
+ 'commandhandler',
+]
+
+if CONFIG['MOZ_XUL'] and CONFIG['NS_PRINTING']:
+ DIRS += ['printingui/src']
+
+DIRS += ['build']
--- a/embedding/components/printingui/src/Makefile.in
+++ b/embedding/components/printingui/src/Makefile.in
@@ -4,28 +4,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
-
-ifdef MOZ_PDF_PRINTING
-PLATFORM_DIR += unixshared
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
-PLATFORM_DIR = os2
-endif
-
-ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
-PLATFORM_DIR = win
-endif
-
-ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
-PLATFORM_DIR = mac
-endif
-
-DIRS = $(PLATFORM_DIR)
-
include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/embedding/components/printingui/src/mac/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/printingui/src/moz.build
@@ -0,0 +1,15 @@
+# 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/.
+
+toolkit = CONFIG['MOZ_WIDGET_TOOLKIT']
+
+if toolkit == 'os2':
+ DIRS += ['os2']
+elif toolkit == 'windows':
+ DIRS += ['win']
+elif toolkit == 'cocoa':
+ DIRS += ['mac']
+elif CONFIG['MOZ_PDF_PRINTING']:
+ DIRS += ['unixshared']
new file mode 100644
--- /dev/null
+++ b/embedding/components/printingui/src/os2/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/printingui/src/unixshared/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/printingui/src/win/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
--- a/embedding/components/webbrowserpersist/Makefile.in
+++ b/embedding/components/webbrowserpersist/Makefile.in
@@ -6,11 +6,10 @@
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = webbrowserpersist
-DIRS = public src
include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/embedding/components/webbrowserpersist/moz.build
@@ -0,0 +1,6 @@
+# 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 += ['public', 'src']
new file mode 100644
--- /dev/null
+++ b/embedding/components/webbrowserpersist/public/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/webbrowserpersist/src/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
--- a/embedding/components/windowwatcher/Makefile.in
+++ b/embedding/components/windowwatcher/Makefile.in
@@ -4,12 +4,9 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
DEPTH = @DEPTH@
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
-
-DIRS = public src
-
include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/embedding/components/windowwatcher/moz.build
@@ -0,0 +1,6 @@
+# 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 += ['public', 'src']
new file mode 100644
--- /dev/null
+++ b/embedding/components/windowwatcher/public/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/components/windowwatcher/src/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/moz.build
@@ -0,0 +1,10 @@
+# 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 += ['base', 'components', 'browser']
+TEST_DIRS += ['test']
+
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android' and CONFIG['MOZ_BUILD_APP'] in 'mobile/xul':
+ DIRS += ['android']
new file mode 100644
--- /dev/null
+++ b/embedding/test/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+
new file mode 100644
--- /dev/null
+++ b/embedding/tests/winEmbed/moz.build
@@ -0,0 +1,5 @@
+# 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/.
+