Bug 955433 - Port |Bug 845089 - Convert build system to moz.build files on a CLOSED TREE|, r=florian.
authorPatrick Cloke <clokep@gmail.com>
Thu, 24 Oct 2013 22:07:16 -0400
changeset 19213 aecef621e18ac9ea1b72778ffa4f970f8bb23082
parent 19212 43618a31ce1b6bff61678f97f9e1227bb1c4d4f7
child 19214 22d9ead65ffe68c93164a89699f32fe88fb979cc
push idunknown
push userunknown
push dateunknown
reviewersflorian
bugs955433, 845089
Bug 955433 - Port |Bug 845089 - Convert build system to moz.build files on a CLOSED TREE|, r=florian.
chat/Makefile.in
chat/components/public/moz.build
chat/components/src/moz.build
chat/content/moz.build
chat/locales/moz.build
chat/makefiles.sh
chat/modules/moz.build
chat/moz.build
chat/protocols/facebook/moz.build
chat/protocols/gtalk/moz.build
chat/protocols/irc/moz.build
chat/protocols/jsTest/moz.build
chat/protocols/odnoklassniki/moz.build
chat/protocols/twitter/moz.build
chat/protocols/vkontakte/moz.build
chat/protocols/xmpp/moz.build
chat/protocols/yahoo/moz.build
chat/themes/moz.build
im/Makefile.in
im/app/Makefile.in
im/app/moz.build
im/app/profile/Makefile.in
im/app/profile/extensions/Makefile.in
im/app/profile/extensions/moz.build
im/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build
im/app/profile/moz.build
im/branding/halloween/Makefile.in
im/branding/halloween/locales/moz.build
im/branding/halloween/moz.build
im/branding/nightly/Makefile.in
im/branding/nightly/locales/moz.build
im/branding/nightly/moz.build
im/build.mk
im/components/Makefile.in
im/components/mintrayr/moz.build
im/components/moz.build
im/content/moz.build
im/installer/Makefile.in
im/installer/moz.build
im/installer/windows/moz.build
im/locales/moz.build
im/makefiles.sh
im/modules/moz.build
im/moz.build
im/themes/moz.build
other-licenses/branding/instantbird/Makefile.in
other-licenses/branding/instantbird/locales/moz.build
other-licenses/branding/instantbird/moz.build
--- a/chat/Makefile.in
+++ b/chat/Makefile.in
@@ -4,36 +4,11 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-PROTOCOLS = \
-		facebook \
-		gtalk \
-		irc \
-		odnoklassniki \
-		twitter \
-		vkontakte \
-		xmpp \
-		yahoo \
-		$(NULL)
-
-ifdef MOZ_DEBUG
-PROTOCOLS += jsTest
-endif
-
 PREF_JS_EXPORTS = $(srcdir)/chat-prefs.js
 
-PARALLEL_DIRS	= \
-		components/public \
-		components/src \
-		modules \
-		content \
-		themes \
-		locales \
-		$(foreach proto,$(PROTOCOLS),protocols/$(proto)) \
-		$(NULL)
-
 include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/chat/components/public/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/components/src/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/content/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/locales/moz.build
@@ -0,0 +1,4 @@
+# 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/.
deleted file mode 100644
--- a/chat/makefiles.sh
+++ /dev/null
@@ -1,22 +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/.
-
-add_makefiles "
-chat/Makefile
-chat/components/public/Makefile
-chat/components/src/Makefile
-chat/content/Makefile
-chat/locales/Makefile
-chat/modules/Makefile
-chat/protocols/facebook/Makefile
-chat/protocols/gtalk/Makefile
-chat/protocols/irc/Makefile
-chat/protocols/jsTest/Makefile
-chat/protocols/odnoklassniki/Makefile
-chat/protocols/twitter/Makefile
-chat/protocols/vkontakte/Makefile
-chat/protocols/xmpp/Makefile
-chat/protocols/yahoo/Makefile
-chat/themes/Makefile
-"
new file mode 100644
--- /dev/null
+++ b/chat/modules/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/moz.build
@@ -0,0 +1,24 @@
+# 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/.
+
+PARALLEL_DIRS += [
+    'components/public',
+    'components/src',
+    'modules',
+    'content',
+    'themes',
+    'locales',
+    'protocols/facebook',
+    'protocols/gtalk',
+    'protocols/irc',
+    'protocols/odnoklassniki',
+    'protocols/twitter',
+    'protocols/vkontakte',
+    'protocols/xmpp',
+    'protocols/yahoo',
+]
+
+if CONFIG['MOZ_DEBUG']:
+    PARALLEL_DIRS += ['protocols/jsTest']
new file mode 100644
--- /dev/null
+++ b/chat/protocols/facebook/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/gtalk/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/irc/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/jsTest/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/odnoklassniki/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/twitter/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/vkontakte/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/xmpp/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/protocols/yahoo/moz.build
@@ -0,0 +1,4 @@
+# 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/chat/themes/moz.build
@@ -0,0 +1,4 @@
+# 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/im/Makefile.in
+++ b/im/Makefile.in
@@ -5,32 +5,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(topsrcdir)/config/config.mk
 
-PARALLEL_DIRS	= \
-	content \
-	locales \
-	themes \
-	modules \
-	components \
-	$(NULL)
-
-DIRS = app
-
-ifeq ($(OS_ARCH),WINNT)
-ifdef MOZ_INSTALLER
-DIRS += installer/windows
-endif
-endif
-
 include $(topsrcdir)/config/rules.mk
 
 ifeq ($(OS_ARCH),WINNT)
 ifdef MOZ_INSTALLER
 
 # For Windows build the uninstaller during the application build since the
 # uninstaller is included with the application for mar file generation.
 libs::
--- a/im/app/Makefile.in
+++ b/im/app/Makefile.in
@@ -32,18 +32,16 @@ SOURCE_REPO := $(shell hg -R $(topsrcdir
 ifdef SOURCE_REPO
 DEFINES += -DMOZ_SOURCE_REPO="$(SOURCE_REPO)"
 endif
 
 ifdef MOZILLA_OFFICIAL
 DEFINES += -DOFFICIAL_BUILD=1
 endif
 
-DIRS		= profile
-
 PREF_JS_EXPORTS = \
     $(srcdir)/profile/all-instantbird.js \
     $(srcdir)/profile/channel-prefs.js \
     $(NULL)
 
 ifndef LIBXUL_SDK
 
 ifneq (,$(filter OS2 WINNT,$(OS_ARCH)))
new file mode 100644
--- /dev/null
+++ b/im/app/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 += ['profile']
--- a/im/app/profile/Makefile.in
+++ b/im/app/profile/Makefile.in
@@ -5,18 +5,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = extensions
-
 include $(topsrcdir)/config/rules.mk
 
 FILES := \
 	mimeTypes.rdf \
     localstore.rdf \
 	$(NULL)
 
 libs:: $(FILES)
--- a/im/app/profile/extensions/Makefile.in
+++ b/im/app/profile/extensions/Makefile.in
@@ -1,15 +1,12 @@
-#
 # 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/.
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = {972ce4c6-7e08-4474-a285-3208198ce6fd}
-
 include $(topsrcdir)/config/rules.mk
new file mode 100644
--- /dev/null
+++ b/im/app/profile/extensions/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 += ['{972ce4c6-7e08-4474-a285-3208198ce6fd}']
new file mode 100644
--- /dev/null
+++ b/im/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/moz.build
@@ -0,0 +1,4 @@
+# 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/im/app/profile/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 += ['extensions']
--- a/im/branding/halloween/Makefile.in
+++ b/im/branding/halloween/Makefile.in
@@ -6,20 +6,16 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = \
-	locales \
-	$(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
 ifeq ($(OS_ARCH),WINNT)
 	cp $(srcdir)/instantbird.ico   $(DIST)/branding/instantbird.ico
 	cp $(srcdir)/instantbird.ico   $(DIST)/branding/app.ico
 	cp $(srcdir)/branding.nsi      $(DIST)/branding/branding.nsi
new file mode 100644
--- /dev/null
+++ b/im/branding/halloween/locales/moz.build
@@ -0,0 +1,4 @@
+# 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/im/branding/halloween/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']
--- a/im/branding/nightly/Makefile.in
+++ b/im/branding/nightly/Makefile.in
@@ -6,20 +6,16 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = \
-	locales \
-	$(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
 ifeq ($(OS_ARCH),WINNT)
 	cp $(srcdir)/instantbird.ico   $(DIST)/branding/instantbird.ico
 	cp $(srcdir)/instantbird.ico   $(DIST)/branding/app.ico
 	cp $(srcdir)/branding.nsi      $(DIST)/branding/branding.nsi
new file mode 100644
--- /dev/null
+++ b/im/branding/nightly/locales/moz.build
@@ -0,0 +1,4 @@
+# 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/im/branding/nightly/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']
--- a/im/build.mk
+++ b/im/build.mk
@@ -1,35 +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/.
 
 ifdef COMM_BUILD
 
-ifndef MOZILLA_DIR
-MOZILLA_DIR = $(MOZILLA_SRCDIR)
-endif
-include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/package-name.mk
-
-TIERS += app
-
-ifdef MOZ_BRANDING_DIRECTORY
-tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
-else
-tier_app_dirs += instantbird/branding/nightly
-endif
-
-tier_app_dirs += \
-  chat \
-  purple \
-  instantbird \
-  $(NULL)
-
-endif
-
 BUILD_YEAR := $(shell echo $(BUILDID) | cut -c 1-4)
 BUILD_MONTH := $(shell echo $(BUILDID) | cut -c 5-6)
 BUILD_DAY := $(shell echo $(BUILDID) | cut -c 7-8)
 BUILD_HOUR := $(shell echo $(BUILDID) | cut -c 9-10)
 
 ifndef PKG_SUFFIX
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 PKG_SUFFIX = .dmg
@@ -120,31 +99,33 @@ endif
 endif
 ifdef SYMBOL_SERVER_HOST
 	@$(MAKE) uploadsymbols
 endif
 ifdef UPLOAD_CMD
 	$(MAKE) upload
 endif
 
-upload:
-ifdef UPLOAD_CMD
-	$(PRE_UPLOAD_CMD)
-	$(UPLOAD_CMD)
-	$(POST_UPLOAD_CMD)
-endif
-
 installer:
 	@$(MAKE) -C instantbird/installer installer
 
 SHIPPED_LOCALES_FILE = $(topsrcdir)/instantbird/locales/shipped-locales
 SHIPPED_LOCALES := $(shell if test -f $(SHIPPED_LOCALES_FILE); then cat $(SHIPPED_LOCALES_FILE); fi)
 
 package:
 	@$(MAKE) -C instantbird/installer
 
 install::
 	@$(MAKE) -C instantbird/installer install
 
+upload:
+ifdef UPLOAD_CMD
+	$(PRE_UPLOAD_CMD)
+	$(UPLOAD_CMD)
+	$(POST_UPLOAD_CMD)
+endif
+
 ib::
 	@$(MAKE) -C chat export libs
 	@$(MAKE) -C purple export libs
 	@$(MAKE) -C instantbird libs
+
+endif # COMM_BUILD
--- a/im/components/Makefile.in
+++ b/im/components/Makefile.in
@@ -4,20 +4,16 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-ifneq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-DIRS = mintrayr
-endif
-
 EXTRA_COMPONENTS = \
 	contentHandler.js contentHandler.manifest \
 	ibCommandLineHandler.manifest \
 	ibConvStatsService.js ibConvStatsService.manifest \
 	ibStatusCommandLineHandler.js ibStatusCommandLineHandler.manifest \
 	$(NULL)
 
 EXTRA_PP_COMPONENTS = \
new file mode 100644
--- /dev/null
+++ b/im/components/mintrayr/moz.build
@@ -0,0 +1,4 @@
+# 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/im/components/moz.build
@@ -0,0 +1,7 @@
+# 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_WIDGET_TOOLKIT'] in ('windows', 'gtk2'):
+    DIRS += ['mintrayr']
new file mode 100644
--- /dev/null
+++ b/im/content/moz.build
@@ -0,0 +1,4 @@
+# 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/im/installer/Makefile.in
+++ b/im/installer/Makefile.in
@@ -4,16 +4,18 @@
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
+STANDALONE_MAKEFILE := 1
+
 include $(topsrcdir)/config/rules.mk
 
 MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
 
 MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
 
 MOZ_NONLOCALIZED_PKG_LIST = \
 	xpcom \
new file mode 100644
--- /dev/null
+++ b/im/installer/moz.build
@@ -0,0 +1,4 @@
+# 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/im/installer/windows/moz.build
@@ -0,0 +1,4 @@
+# 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/im/locales/moz.build
@@ -0,0 +1,4 @@
+# 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/.
deleted file mode 100644
--- a/im/makefiles.sh
+++ /dev/null
@@ -1,26 +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/.
-
-if [ "$COMM_BUILD" ]; then
-add_makefiles "
-instantbird/Makefile
-instantbird/app/Makefile
-instantbird/app/profile/Makefile
-instantbird/app/profile/extensions/Makefile
-instantbird/branding/nightly/Makefile
-instantbird/branding/nightly/locales/Makefile
-instantbird/branding/halloween/Makefile
-instantbird/branding/halloween/locales/Makefile
-instantbird/branding/release/Makefile
-instantbird/branding/release/locales/Makefile
-instantbird/content/Makefile
-instantbird/components/Makefile
-instantbird/components/mintrayr/Makefile
-instantbird/locales/Makefile
-instantbird/modules/Makefile
-instantbird/themes/Makefile
-instantbird/installer/Makefile
-instantbird/installer/windows/Makefile
-"
-fi
new file mode 100644
--- /dev/null
+++ b/im/modules/moz.build
@@ -0,0 +1,4 @@
+# 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/im/moz.build
@@ -0,0 +1,24 @@
+# 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/.
+
+CONFIGURE_SUBST_FILES += ['installer/Makefile']
+
+# app is always last as it packages up the built files on mac.
+DIRS += ['app']
+
+# Add components for external linkage build
+if CONFIG['MOZ_INCOMPLETE_EXTERNAL_LINKAGE']:
+    DIRS += ['components']
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    DIRS += ['installer/windows']
+
+PARALLEL_DIRS += [
+    'content',
+    'locales',
+    'themes',
+    'modules',
+    'components'
+]
new file mode 100644
--- /dev/null
+++ b/im/themes/moz.build
@@ -0,0 +1,4 @@
+# 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/other-licenses/branding/instantbird/Makefile.in
+++ b/other-licenses/branding/instantbird/Makefile.in
@@ -6,20 +6,16 @@
 
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = \
-	locales \
-	$(NULL)
-
 include $(topsrcdir)/config/rules.mk
 
 export::
 	$(NSINSTALL) -D $(DIST)/branding
 ifeq ($(OS_ARCH),WINNT)
 	cp $(srcdir)/instantbird.ico   $(DIST)/branding/instantbird.ico
 	cp $(srcdir)/instantbird.ico   $(DIST)/branding/app.ico
 	cp $(srcdir)/branding.nsi      $(DIST)/branding/branding.nsi
new file mode 100644
--- /dev/null
+++ b/other-licenses/branding/instantbird/locales/moz.build
@@ -0,0 +1,4 @@
+# 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/other-licenses/branding/instantbird/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']