From 644de1744137c0ec1db4e26ae6394ab8671a75e6 Mon Sep 17 00:00:00 2001 From: Robert Kaiser Date: Tue, 22 Jul 2008 14:31:43 +0200 Subject: [PATCH] bug 444686 - create/adapt build system for comm-central, Thunderbird changes, r=ted r=Standard8 r=Callek --- mail/app-config.mk | 39 +++++++++++++++++++ mail/app/Makefile.in | 19 +++++---- mail/base/content/mailWindowOverlay.xul | 2 +- mail/build.mk | 26 +++++++++++-- .../addrbook/content/addressbook.xul | 2 +- .../compose/content/messengercompose.xul | 2 +- mail/confvars.sh | 7 +++- mail/installer/Makefile.in | 4 +- mail/installer/windows/Makefile.in | 22 +++++------ mail/locales/Makefile.in | 4 +- mail/makefiles.sh | 3 +- 11 files changed, 98 insertions(+), 32 deletions(-) create mode 100644 mail/app-config.mk diff --git a/mail/app-config.mk b/mail/app-config.mk new file mode 100644 index 0000000000..6d4eb944d5 --- /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 . +# Portions created by the Initial Developer are Copyright (C) 2008 +# the Initial Developer. All Rights Reserved. +# +# Contributor(s): +# Robert Kaiser (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 diff --git a/mail/app/Makefile.in b/mail/app/Makefile.in index e87f29df40..3cfad2b76c 100644 --- a/mail/app/Makefile.in +++ b/mail/app/Makefile.in @@ -44,10 +44,10 @@ 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 @@ -92,15 +92,15 @@ 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 @@ -111,6 +111,9 @@ 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 @@ -244,7 +247,7 @@ 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))) diff --git a/mail/base/content/mailWindowOverlay.xul b/mail/base/content/mailWindowOverlay.xul index e8fb829b64..d1c5cc5663 100644 --- a/mail/base/content/mailWindowOverlay.xul +++ b/mail/base/content/mailWindowOverlay.xul @@ -1407,7 +1407,7 @@ #ifdef XP_MACOSX -#include ../../../toolkit/content/macWindowMenu.inc +#include ../../../mozilla/toolkit/content/macWindowMenu.inc #endif diff --git a/mail/build.mk b/mail/build.mk index e806ad2492..d8fee3d5b8 100644 --- a/mail/build.mk +++ b/mail/build.mk @@ -35,12 +35,30 @@ # # ***** 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) @@ -49,18 +67,20 @@ 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 diff --git a/mail/components/addrbook/content/addressbook.xul b/mail/components/addrbook/content/addressbook.xul index dcd50077fe..65734c39fc 100644 --- a/mail/components/addrbook/content/addressbook.xul +++ b/mail/components/addrbook/content/addressbook.xul @@ -508,7 +508,7 @@ #ifdef XP_MACOSX -#include ../../../../toolkit/content/macWindowMenu.inc +#include ../../../../mozilla/toolkit/content/macWindowMenu.inc #endif diff --git a/mail/components/compose/content/messengercompose.xul b/mail/components/compose/content/messengercompose.xul index ba115e0480..a219e39827 100644 --- a/mail/components/compose/content/messengercompose.xul +++ b/mail/components/compose/content/messengercompose.xul @@ -507,7 +507,7 @@ #ifdef XP_MACOSX -#include ../../../../toolkit/content/macWindowMenu.inc +#include ../../../../mozilla/toolkit/content/macWindowMenu.inc #endif diff --git a/mail/confvars.sh b/mail/confvars.sh index 045f981fca..d180e1ae84 100755 --- a/mail/confvars.sh +++ b/mail/confvars.sh @@ -47,10 +47,13 @@ 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 diff --git a/mail/installer/Makefile.in b/mail/installer/Makefile.in index fe161a96f8..427c6e97b4 100644 --- a/mail/installer/Makefile.in +++ b/mail/installer/Makefile.in @@ -110,7 +110,7 @@ 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))) @@ -124,7 +124,7 @@ 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 diff --git a/mail/installer/windows/Makefile.in b/mail/installer/windows/Makefile.in index e5177cce4f..e7b54857b7 100644 --- a/mail/installer/windows/Makefile.in +++ b/mail/installer/windows/Makefile.in @@ -43,10 +43,10 @@ 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 \ @@ -75,7 +75,7 @@ DEFINES += \ $(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 @@ -89,11 +89,11 @@ uninstaller:: $(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) @@ -104,18 +104,18 @@ $(CONFIG_DIR)/setup.exe:: 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 diff --git a/mail/locales/Makefile.in b/mail/locales/Makefile.in index 72e2144b8d..b30c258c69 100644 --- a/mail/locales/Makefile.in +++ b/mail/locales/Makefile.in @@ -132,8 +132,8 @@ 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) diff --git a/mail/makefiles.sh b/mail/makefiles.sh index 12b175021f..f531e1006e 100644 --- a/mail/makefiles.sh +++ b/mail/makefiles.sh @@ -35,6 +35,7 @@ # # ***** END LICENSE BLOCK ***** +if [ "$COMM_BUILD" ]; then add_makefiles " mail/Makefile mail/app/Makefile @@ -63,4 +64,4 @@ mail/themes/qute/mail/Makefile mail/themes/qute/editor/Makefile mail/themes/qute/Makefile " - +fi