Bug 1366607: Refer explicitly to the top comm objdir, rather than using a relative depth. draft
authorTom Prince <mozilla@hocat.ca>
Mon, 16 Oct 2017 13:50:14 -0600
changeset 22839 43e59a6ad376a679af1b23c963e3577dfaa9ce2c
parent 22835 db6a991ed2ba008bd7f934591250a6079e478d2c
child 22842 19be5702da8462924ddb3143abc6f050276e8993
push id113
push userbmo:mozilla@hocat.ca
push dateMon, 16 Oct 2017 20:38:26 +0000
bugs1366607
Bug 1366607: Refer explicitly to the top comm objdir, rather than using a relative depth. MozReview-Commit-ID: 5VSSyAFsFNe
comm-confvars.sh
im/app-config.mk
mail/app-config.mk
mail/build.mk
mail/configure.in
mail/installer/Makefile.in
mail/locales/Makefile.in
mail/testsuite-targets.mk
suite/app-config.mk
suite/configure.in
--- a/comm-confvars.sh
+++ b/comm-confvars.sh
@@ -4,17 +4,21 @@ if [[ "$MOZ_BUILD_APP" == *comm* ]]
 then
   # we are building with comm/ as the subdirectory
   # $srcdir is the mozilla repo, comm is in the subdir
   moztopsrcdir=$srcdir
   commtopsrcdir=$srcdir/comm
 
   mozreltopsrcdir=.
   commreltopsrcdir=comm
+
+  commtopobjdir=$_objdir/comm
 else
   # we are building with mozilla/ as the subdirectory
   # $srcdir is still the mozilla repo, so use the parent for comm
   moztopsrcdir=$srcdir
   commtopsrcdir=$srcdir/..
 
   mozreltopsrcdir=mozilla
   commreltopsrcdir=.
+
+  commtopobjdir=$_objdir
 fi
deleted file mode 100644
--- a/im/app-config.mk
+++ /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/.
-
-ifeq ($(findstring comm,$(MOZ_BUILD_APP)),)
-COMMDEPTH = $(DEPTH)
-else
-COMMDEPTH = $(DEPTH)/comm
-endif
deleted file mode 100644
--- a/mail/app-config.mk
+++ /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/.
-
-ifeq ($(findstring comm,$(MOZ_BUILD_APP)),)
-COMMDEPTH = $(DEPTH)
-else
-COMMDEPTH = $(DEPTH)/comm
-endif
--- a/mail/build.mk
+++ b/mail/build.mk
@@ -1,51 +1,51 @@
 # 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/.
 
 ifndef COMM_BUILD
 installer:
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer installer
+	@$(MAKE) -C $(commtopobjdir)/mail/installer installer
 
 package:
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer
+	@$(MAKE) -C $(commtopobjdir)/mail/installer
 
 package-compare:
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer package-compare
+	@$(MAKE) -C $(commtopobjdir)/mail/installer package-compare
 
 stage-package:
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer stage-package
+	@$(MAKE) -C $(commtopobjdir)/mail/installer stage-package
 
 install::
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer install
+	@$(MAKE) -C $(commtopobjdir)/mail/installer install
 
 source-package::
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer source-package
+	@$(MAKE) -C $(commtopobjdir)/mail/installer source-package
 
 upload::
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer upload
+	@$(MAKE) -C $(commtopobjdir)/mail/installer upload
 ifdef MOZ_CALENDAR
-	@$(MAKE) -C $(COMMDEPTH)/calendar/lightning upload
-	@$(MAKE) -C $(COMMDEPTH)/calendar/providers/gdata upload
+	@$(MAKE) -C $(commtopobjdir)/calendar/lightning upload
+	@$(MAKE) -C $(commtopobjdir)/calendar/providers/gdata upload
 endif
 
 source-upload::
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer source-upload
+	@$(MAKE) -C $(commtopobjdir)/mail/installer source-upload
 
 hg-bundle::
-	@$(MAKE) -C $(COMMDEPTH)/mail/installer hg-bundle
+	@$(MAKE) -C $(commtopobjdir)/mail/installer hg-bundle
 
 l10n-check::
-	@$(MAKE) -C $(COMMDEPTH)/mail/locales l10n-check
+	@$(MAKE) -C $(commtopobjdir)/mail/locales l10n-check
 
 wget-en-US:
-	$(MAKE) -C $(COMMDEPTH)/mail/locales wget-en-US
+	$(MAKE) -C $(commtopobjdir)/mail/locales wget-en-US
 
 # make -j1 because dependencies in l10n build targets don't work
 # with parallel builds
 merge-% installers-% langpack-% chrome-%:
-	$(MAKE) -j1 -C $(COMMDEPTH)/mail/locales $@
+	$(MAKE) -j1 -C $(commtopobjdir)/mail/locales $@
 
 ifdef ENABLE_TESTS
 include $(commtopsrcdir)/mail/testsuite-targets.mk
 endif
 endif
--- a/mail/configure.in
+++ b/mail/configure.in
@@ -12,16 +12,17 @@ AC_SUBST(THUNDERBIRD_VERSION)
 AC_DEFINE(MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES)
 AC_SUBST(MOZ_BUNDLED_FONTS)
 
 dnl More things we need to carry from confvars.sh
 AC_SUBST(moztopsrcdir)
 AC_SUBST(commtopsrcdir)
 AC_SUBST(mozreltopsrcdir)
 AC_SUBST(commreltopsrcdir)
+AC_SUBST(commtopobjdir)
 
 dnl Optional parts of the build.
 AC_SUBST(MOZ_MORK)
 if test "$MOZ_MORK"; then
   AC_DEFINE(MOZ_MORK)
 fi
 if test "$OS_ARCH" != "WINNT"; then
   MOZ_MOVEMAIL=1
--- a/mail/installer/Makefile.in
+++ b/mail/installer/Makefile.in
@@ -1,18 +1,15 @@
 # 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/.
 
 STANDALONE_MAKEFILE := 1
 # DIST_SUBDIR := mail  # Not sure why TB is not using this
 
-# Since STANDALONE_MAKEFILE is defined we need to manually include our config
-include $(commtopsrcdir)/mail/app-config.mk
-
 include $(moztopsrcdir)/config/rules.mk
 
 MOZ_PKG_REMOVALS = $(srcdir)/removed-files.in
 
 MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
 # Some files have been already bundled with xulrunner
 ifndef SYSTEM_LIBXUL
 MOZ_PKG_FATAL_WARNINGS = 1
@@ -174,17 +171,17 @@ DEFINES += -DICU_DATA_FILE=$(ICU_DATA_FI
 ifdef CLANG_CXX
 DEFINES += -DCLANG_CXX
 endif
 ifdef CLANG_CL
 DEFINES += -DCLANG_CL
 endif
 
 libs::
-	$(MAKE) -C $(COMMDEPTH)/mail/locales langpack
+	$(MAKE) -C $(commtopobjdir)/mail/locales langpack
 
 ifeq (WINNT,$(OS_ARCH))
 PKGCOMP_FIND_OPTS =
 else
 PKGCOMP_FIND_OPTS = -L
 endif
 ifeq (Darwin, $(OS_ARCH))
 FINDPATH = $(_APPNAME)/Contents/MacOS
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -194,18 +194,18 @@ endif
 # try to repack x-test, with just toolkit/defines.inc being there
 l10n-check::
 	$(RM) -rf x-test
 	$(NSINSTALL) -D x-test/toolkit
 	echo '#define MOZ_LANG_TITLE Just testing' > x-test/toolkit/defines.inc
 	$(MAKE) installers-x-test L10NBASEDIR='$(PWD)'
 
 ifdef MOZ_CALENDAR
-LIGHTNING_PATH=$(COMMDEPTH)/calendar/lightning
-GDATA_PATH=$(COMMDEPTH)/calendar/providers/gdata
+LIGHTNING_PATH=$(commtopobjdir)/calendar/lightning
+GDATA_PATH=$(commtopobjdir)/calendar/providers/gdata
 
 define run-calendar-rule
 $(MAKE) -C $(LIGHTNING_PATH) $(subst calendar-,,$@) AB_CD=$(AB_CD)
 $(MAKE) -C $(GDATA_PATH) $(subst calendar-,,$@) AB_CD=$(AB_CD)
 endef
 
 # Add calendar targets for pattern rules. Unfortunately multiple pattern rules
 # on the left hand side do something different with make, therefore we need to
--- a/mail/testsuite-targets.mk
+++ b/mail/testsuite-targets.mk
@@ -52,15 +52,15 @@ mozmill-one:
 # If Lightning is enabled, also stage the lightning extension
 ifdef MOZ_CALENDAR
 package-tests: stage-mozmill stage-calendar
 else
 package-tests: stage-mozmill
 endif
 
 stage-mozmill: make-stage-dir
-	$(MAKE) -C $(COMMDEPTH)/mail/test/mozmill stage-package
+	$(MAKE) -C $(commtopobjdir)/mail/test/mozmill stage-package
 
 stage-calendar: make-stage-dir
-	$(MAKE) -C $(COMMDEPTH)/calendar/lightning stage-package
-	$(MAKE) -C $(COMMDEPTH)/calendar/providers/gdata stage-package
+	$(MAKE) -C $(commtopobjdir)/calendar/lightning stage-package
+	$(MAKE) -C $(commtopobjdir)/calendar/providers/gdata stage-package
 
 .PHONY: stage-mozmill stage-calendar
deleted file mode 100644
--- a/suite/app-config.mk
+++ /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/.
-
-ifeq ($(findstring comm,$(MOZ_BUILD_APP)),)
-COMMDEPTH = $(DEPTH)
-else
-COMMDEPTH = $(DEPTH)/comm
-endif
--- a/suite/configure.in
+++ b/suite/configure.in
@@ -12,16 +12,17 @@ AC_SUBST(SEAMONKEY_VERSION)
 AC_DEFINE(MOZ_SEPARATE_MANIFEST_FOR_THEME_OVERRIDES)
 AC_SUBST(MOZ_BUNDLED_FONTS)
 
 dnl More things we need to carry from confvars.sh
 AC_SUBST(moztopsrcdir)
 AC_SUBST(commtopsrcdir)
 AC_SUBST(mozreltopsrcdir)
 AC_SUBST(commreltopsrcdir)
+AC_SUBST(commtopobjdir)
 
 dnl Optional parts of the build.
 AC_SUBST(MOZ_MORK)
 if test "$MOZ_MORK"; then
   AC_DEFINE(MOZ_MORK)
 fi
 if test "$OS_ARCH" != "WINNT"; then
   MOZ_MOVEMAIL=1