bug 444686 - create/adapt build system for comm-central, Thunderbird changes, r=ted r=Standard8 r=Callek
authorRobert Kaiser <kairo@kairo.at>
Tue, 22 Jul 2008 14:31:43 +0200
changeset 4 201855946b54aa8dd10e5a289b12c622f44d372d
parent 3 451a80b01ba21724df0abd0171b43a82ca81befc
child 5 6cb90fe969331423b5189dfa2ada51a8d8e65241
child 12 f1cac7bc0e1defff68c7cb7b6febe939bd26aa02
push idunknown
push userunknown
push dateunknown
reviewersted, Standard8, Callek
bugs444686
bug 444686 - create/adapt build system for comm-central, Thunderbird changes, r=ted r=Standard8 r=Callek
mail/app-config.mk
mail/app/Makefile.in
mail/base/content/mailWindowOverlay.xul
mail/build.mk
mail/components/addrbook/content/addressbook.xul
mail/components/compose/content/messengercompose.xul
mail/confvars.sh
mail/installer/Makefile.in
mail/installer/windows/Makefile.in
mail/locales/Makefile.in
mail/makefiles.sh
new file mode 100644
--- /dev/null
+++ b/mail/app-config.mk
@@ -0,0 +1,39 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is the Mozilla build system.
+#
+# The Initial Developer of the Original Code is
+# the Mozilla Foundation <http://www.mozilla.org/>.
+# Portions created by the Initial Developer are Copyright (C) 2008
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Robert Kaiser <kairo@kairo.at> (Initial Code)
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+MOZ_THUNDERBIRD = 1
+DEFINES += -DMOZ_THUNDERBIRD=1
--- a/mail/app/Makefile.in
+++ b/mail/app/Makefile.in
@@ -39,20 +39,20 @@ DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 AB_CD = $(MOZ_UI_LOCALE) 
 
-GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
-GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
+GRE_MILESTONE = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
+GRE_BUILDID = $(shell $(PYTHON) $(MOZILLA_SRCDIR)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
 
-PLATFORM_LICENSE_FILE = $(topsrcdir)/toolkit/content/license.html
+PLATFORM_LICENSE_FILE = $(MOZILLA_SRCDIR)/toolkit/content/license.html
 MAIL_LICENSE_HTML_FILE = ../license.html
 MAIL_LICENSE_TXT_FILE = $(topsrcdir)/mail/LICENSE.txt
 MAIL_APP_LICENSE_FILE = $(srcdir)/app-license.html
 
 DEFINES += \
   -DTHUNDERBIRD_ICO=\"$(DIST)/branding/thunderbird.ico\" \
   -DAB_CD=$(AB_CD) \
   -DGRE_MILESTONE=$(GRE_MILESTONE) \
@@ -87,35 +87,38 @@ REQUIRES = \
 	string \
 	xulapp \
 	$(NULL)
 
 CPPSRCS = nsMailApp.cpp
 
 DIST_FILES = application.ini
 
-LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
+LOCAL_INCLUDES += -I$(MOZILLA_SRCDIR)/toolkit/xre
 
 ifdef BUILD_STATIC_LIBS
 ifdef _MSC_VER
-STATIC_COMPONENTS_LINKER_PATH = -LIBPATH:$(DEPTH)/staticlib
+STATIC_COMPONENTS_LINKER_PATH = -LIBPATH:$(MOZDEPTH)/staticlib
 else
-STATIC_COMPONENTS_LINKER_PATH = -L$(DEPTH)/staticlib
+STATIC_COMPONENTS_LINKER_PATH = -L$(MOZDEPTH)/staticlib
 endif
-LIBS += $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
+LIBS += $(MOZDEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
 else
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 LIBS += $(DIST)/bin/XUL
 else
 EXTRA_DSO_LIBS += xul
 endif
 endif
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 TK_LIBS := -framework Cocoa $(TK_LIBS)
+ifdef BUILD_STATIC_LIBS
+TK_LIBS := -framework SystemConfiguration $(TK_LIBS)
+endif
 endif
 
 ifdef MOZ_ENABLE_LIBXUL
 APP_XPCOM_LIBS = $(XPCOM_GLUE_LDOPTS)
 else
 MOZILLA_INTERNAL_API = 1
 APP_XPCOM_LIBS = $(XPCOM_LIBS)
 endif
@@ -239,17 +242,17 @@ ifeq ($(OS_ARCH),WINNT)
 #
 # Set it to 256k.  See bug 127069.
 #
 ifndef GNU_CC
 LDFLAGS += /HEAP:0x40000
 endif
 endif
 
-$(PROGRAM): $(DEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
+$(PROGRAM): $(MOZDEPTH)/toolkit/xre/$(LIB_PREFIX)xulapp_s.$(LIB_SUFFIX)
 
 ifneq (,$(filter windows os2 gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
 ifneq (,$(filter windows os2,$(MOZ_WIDGET_TOOLKIT)))
 ICON_SUFFIX=.ico
 else
 ICON_SUFFIX=.xpm
 endif
 
--- a/mail/base/content/mailWindowOverlay.xul
+++ b/mail/base/content/mailWindowOverlay.xul
@@ -1402,17 +1402,17 @@
         <menuitem id="menu_mac_show_all" label="&showAllAppsCmdMac.label;"/>
 #endif
 #endif
        </menupopup>
       </menu>
 
 #ifdef XP_MACOSX
 <!-- Mac window menu -->
-#include ../../../toolkit/content/macWindowMenu.inc
+#include ../../../mozilla/toolkit/content/macWindowMenu.inc
 #endif
 
       <!-- Help -->
       <menu id="helpMenu"/>
 
       <spacer id="menubar_spacer" flex="100%"/>
       </menubar>
     </toolbaritem>
--- a/mail/build.mk
+++ b/mail/build.mk
@@ -30,42 +30,62 @@
 # use your version of this file under the terms of the MPL, indicate your
 # decision by deleting the provisions above and replace them with the notice
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
+ifndef COMM_BUILD # Mozilla Makefile
+
 ifndef LIBXUL_SDK
 include $(topsrcdir)/toolkit/toolkit-tiers.mk
 endif
 
 TIERS += app
 
+ifdef MOZ_CALENDAR
+MOZ_EXTENSIONS += webdav
+endif
+
+ifdef MOZ_EXTENSIONS
+tier_app_dirs += extensions
+endif
+
+else # toplevel Makefile
+
+TIERS += app
+
+ifdef MOZ_LDAP_XPCOM
+tier_app_staticdirs += directory/c-sdk
+tier_app_dirs += directory/xpcom
+endif
 
 ifdef MOZ_BRANDING_DIRECTORY
 tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
 else
 tier_app_dirs += mail/branding/nightly
 endif
 
 tier_app_dirs += \
-	editor/ui \
+	mozilla/editor/ui \
 	mailnews \
 	$(NULL)
 
-ifdef MOZ_EXTENSIONS
-tier_app_dirs += extensions
+ifdef MOZ_CALENDAR
+tier_app_dirs += calendar/lightning
 endif
 
 tier_app_dirs += \
 	mail \
 	$(NULL)
 
+endif # COMM_BUILD
+
 installer:
 	@$(MAKE) -C mail/installer installer
 
 package:
 	@$(MAKE) -C mail/installer
 
 install::
 	@$(MAKE) -C mail/installer install
--- a/mail/components/addrbook/content/addressbook.xul
+++ b/mail/components/addrbook/content/addressbook.xul
@@ -503,17 +503,17 @@
                   oncommand="openOptionsDialog()"/>
 #endif
 #endif
           </menupopup>
         </menu>
 
 #ifdef XP_MACOSX
 <!-- Mac window menu -->
-#include ../../../../toolkit/content/macWindowMenu.inc
+#include ../../../../mozilla/toolkit/content/macWindowMenu.inc
 #endif
 
       <!-- Help -->
       <menu id="helpMenu"/>
     </menubar>
    </toolbaritem>
   </toolbar>
   
--- a/mail/components/compose/content/messengercompose.xul
+++ b/mail/components/compose/content/messengercompose.xul
@@ -502,17 +502,17 @@
                       oncommand="openOptionsDialog('paneCompose');"/>
 #endif
 #endif
          </menupopup>
       </menu>
 
 #ifdef XP_MACOSX
 <!-- Mac window menu -->
-#include ../../../../toolkit/content/macWindowMenu.inc
+#include ../../../../mozilla/toolkit/content/macWindowMenu.inc
 #endif
 
       <!-- Help -->
       <menu id="helpMenu"/>
     </menubar>
    </toolbaritem>
   </toolbar>
 
--- a/mail/confvars.sh
+++ b/mail/confvars.sh
@@ -42,15 +42,18 @@ MOZ_THUNDERBIRD=1
 MOZ_MATHML=
 MOZ_NO_ACTIVEX_SUPPORT=1
 MOZ_ACTIVEX_SCRIPTING_SUPPORT=
 MOZ_OJI=
 NECKO_DISK_CACHE=
 NECKO_PROTOCOLS_DEFAULT="data file ftp http res viewsource"
 MOZ_IMG_DECODERS_DEFAULT=`echo "$MOZ_IMG_DECODERS_DEFAULT" | sed "s/ xbm//"`
 MOZ_MAIL_NEWS=1
-MOZ_LDAP_XPCOM=1
+if [ "$COMM_BUILD" ]; then
+  MOZ_LDAP_XPCOM=1
+fi
 MOZ_STATIC_MAIL_BUILD=1
 MOZ_COMPOSER=1
 MOZ_SAFE_BROWSING=1
-MOZ_APP_VERSION=$THUNDERBIRD_VERSION
+MOZ_APP_VERSION=`cat $topsrcdir/$MOZ_BUILD_APP/config/version.txt`
+THUNDERBIRD_VERSION=$MOZ_APP_VERSION
 MOZ_EXTENSIONS_DEFAULT=" wallet"
 MOZ_NO_XPCOM_OBSOLETE=1
--- a/mail/installer/Makefile.in
+++ b/mail/installer/Makefile.in
@@ -105,28 +105,28 @@ MOZ_NONLOCALIZED_PKG_LIST = \
 MOZ_LOCALIZED_PKG_LIST = $(AB_CD)
 
 DEFINES += -DAB_CD=$(AB_CD)
 
 ifdef MOZ_PKG_MANIFEST_P
 MOZ_PKG_MANIFEST = packages-static
 
 $(MOZ_PKG_MANIFEST): $(MOZ_PKG_MANIFEST_P)
-	$(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
+	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $< > $@
 endif
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 MOZ_PKG_MAC_DSSTORE=branding/dsstore
 MOZ_PKG_MAC_BACKGROUND=branding/background.png
 MOZ_PKG_MAC_ICON=branding/disk.icns
 MOZ_PKG_MAC_RSRC=branding/license.r
 # Disabled for release until we have updated images
 ifndef MOZ_BRANDING_DIRECTORY
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 endif
 
-include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
+include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/packager.mk
 
 installer: removed-files
 ifdef INSTALLER_DIR
 	$(MAKE) -C $(INSTALLER_DIR)
 endif
--- a/mail/installer/windows/Makefile.in
+++ b/mail/installer/windows/Makefile.in
@@ -38,20 +38,20 @@
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-include $(topsrcdir)/toolkit/mozapps/installer/package-name.mk
+include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/package-name.mk
 
 CONFIG_DIR = instgen
-SFX_MODULE = $(topsrcdir)/other-licenses/7zstub/thunderbird/7zSD.sfx
+SFX_MODULE = $(MOZILLA_SRCDIR)/other-licenses/7zstub/thunderbird/7zSD.sfx
 
 PP_LOCALIZED_FILES = \
 	packages-static \
 	$(NULL)
 
 INSTALLER_FILES = \
 	app.tag \
 	nsis/installer.nsi \
@@ -70,57 +70,57 @@ DEFINES += \
 	-DAB_CD=$(AB_CD) \
 	-DPKG_BASENAME=$(PKG_BASENAME) \
 	-DMOZ_APP_VERSION=$(MOZ_APP_VERSION) \
 	-DMOZ_APP_DISPLAYNAME=${MOZ_APP_DISPLAYNAME} \
 	-DMOZILLA_VERSION=${MOZILLA_VERSION} \
 	$(NULL)
 
 include $(topsrcdir)/config/config.mk
-include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
+include $(call EXPAND_MOZLOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
 
 installer::
 	$(MAKE) -C .. installer-stage
 	$(MAKE) $(CONFIG_DIR)/setup.exe
 
 # For building the uninstaller during the application build so it can be
 # included for mar file generation.
 uninstaller::
 	$(RM) -rf $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
 	$(EXIT_ON_ERROR) \
 	for i in $(PP_LOCALIZED_FILES); do \
-	  $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
+	  $(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
 	done
-	$(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
+	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
 	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
-	$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
+	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
 	  $(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer $(AB_CD) \
 	  $(WIN_INSTALLER_CHARSET) $(CONFIG_DIR)
 
 $(CONFIG_DIR)/setup.exe::
 	$(RM) -rf $(CONFIG_DIR) && mkdir $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(srcdir)/,$(INSTALLER_FILES)) $(CONFIG_DIR)
 	$(INSTALL) $(addprefix $(DIST)/branding/,$(BRANDING_FILES)) $(CONFIG_DIR)
 	cp $(topsrcdir)/mail/EULA.rtf $(CONFIG_DIR)/license.rtf
 	$(EXIT_ON_ERROR) \
 	for i in $(PP_LOCALIZED_FILES); do \
-	  $(PERL) $(topsrcdir)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
+	  $(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl $(DEFINES) $(ACDEFINES) $(srcdir)/$$i > $(CONFIG_DIR)/$$i; \
 	done
-	$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
+	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/make-installremoves.pl \
 	  ../removed-files > $(CONFIG_DIR)/removed-files.log
-	$(PERL) $(topsrcdir)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
+	$(PERL) $(MOZILLA_SRCDIR)/config/preprocessor.pl -Fsubstitution $(DEFINES) $(ACDEFINES) \
 	  $(srcdir)/nsis/defines.nsi.in > $(CONFIG_DIR)/defines.nsi
-	$(PERL) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
+	$(PERL) $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.pl \
 	  $(topsrcdir) $(call EXPAND_LOCALE_SRCDIR,mail/locales)/installer $(AB_CD) \
 	  $(WIN_INSTALLER_CHARSET) $(CONFIG_DIR)
 
 include $(topsrcdir)/config/rules.mk
-include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk
+include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/windows/nsis/makensis.mk
 
 export::
 ifndef MOZ_BRANDING_DIRECTORY
 	$(NSINSTALL) -D $(DIST)/branding
 	cp $(srcdir)/nsis/branding.nsi $(DIST)/branding/branding.nsi
 	cp $(srcdir)/wizHeader.bmp     $(DIST)/branding/wizHeader.bmp
 	cp $(srcdir)/wizHeaderRTL.bmp  $(DIST)/branding/wizHeaderRTL.bmp
 	cp $(srcdir)/wizWatermark.bmp  $(DIST)/branding/wizWatermark.bmp
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -127,18 +127,18 @@ MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/d
 MOZ_PKG_MAC_RSRC=$(_ABS_DIST)/branding/license.r
 # Disabled for official branding until we have updated images
 ifndef MOZ_BRANDING_DIRECTORY
 MOZ_PKG_MAC_EXTRA=--symlink "/Applications:/ "
 endif
 endif
 
 PACKAGER_NO_LIBS = 1
-include $(topsrcdir)/toolkit/mozapps/installer/packager.mk
-include $(call EXPAND_LOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
+include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/packager.mk
+include $(call EXPAND_MOZLOCALE_SRCDIR,toolkit/locales)/installer/windows/charset.mk
 
 repackage-win32-installer: WIN32_INSTALLER_OUT=$(_ABS_DIST)/install/sea/$(PKG_BASENAME).installer.exe
 repackage-win32-installer: $(WIN32_INSTALLER_IN) $(SUBMAKEFILES)
 	@echo "Repackaging $(WIN32_INSTALLER_IN) into $(WIN32_INSTALLER_OUT)."
 ifdef MOZ_BRANDING_DIRECTORY
 	$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY) export
 else
 	$(MAKE) -C ../installer/windows export
--- a/mail/makefiles.sh
+++ b/mail/makefiles.sh
@@ -30,16 +30,17 @@
 # use your version of this file under the terms of the MPL, indicate your
 # decision by deleting the provisions above and replace them with the notice
 # and other provisions required by the GPL or the LGPL. If you do not delete
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
+if [ "$COMM_BUILD" ]; then
 add_makefiles "
 mail/Makefile
 mail/app/Makefile
 mail/app/profile/Makefile
 mail/base/Makefile
 mail/branding/nightly/Makefile
 mail/branding/nightly/locales/Makefile
 mail/locales/Makefile
@@ -58,9 +59,9 @@ mail/installer/windows/Makefile
 mail/themes/Makefile
 mail/themes/pinstripe/mail/Makefile
 mail/themes/pinstripe/editor/Makefile
 mail/themes/pinstripe/Makefile
 mail/themes/qute/mail/Makefile
 mail/themes/qute/editor/Makefile
 mail/themes/qute/Makefile
 "
-
+fi