Bug 514519 - make --enable-official-branding app-agnostic; (Cv2a-CC) Port it to comm-central.
r=standard8.
--- a/calendar/build.mk
+++ b/calendar/build.mk
@@ -46,19 +46,17 @@ TIERS += app
ifdef MOZ_EXTENSIONS
tier_app_dirs += extensions
endif
else # toplevel Makefile
TIERS += app
-ifdef MOZ_BRANDING_DIRECTORY
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
-endif
tier_app_dirs += \
calendar \
calendar/sunbird \
$(NULL)
ifdef MOZ_CALENDAR
tier_app_dirs += calendar/lightning
--- a/calendar/confvars.sh
+++ b/calendar/confvars.sh
@@ -65,12 +65,13 @@ if test "$MOZILLA_BRANCH_VERSION" = "1.9
MOZ_OJI=
else
MOZ_APP_VERSION_TXT=$topsrcdir/$MOZ_BUILD_APP/sunbird/config/version.txt
fi
MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TXT`
SUNBIRD_VERSION=$MOZ_APP_VERSION
+MOZ_OFFICIAL_BRANDING_DIRECTORY=other-licenses/branding/sunbird
# Until we can build with libxul, we can't have ipc either
MOZ_ENABLE_LIBXUL=
MOZ_IPC=
--- a/calendar/locales/Makefile.in
+++ b/calendar/locales/Makefile.in
@@ -102,38 +102,32 @@ clobber-%:
libs-%:
$(NSINSTALL) -D $(DIST)/install
@$(MAKE) -C ../../mozilla/toolkit/locales libs-$* BOTH_MANIFESTS=1
ifdef MOZ_SUNBIRD
@$(MAKE) -C ../sunbird/locales libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
endif
@$(MAKE) libs AB_CD=$* XPI_NAME=locale-$* PREF_DIR=defaults/pref BOTH_MANIFESTS=1
-ifdef MOZ_BRANDING_DIRECTORY
@$(MAKE) -C $(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales AB_CD=$* XPI_NAME=locale-$* BOTH_MANIFESTS=1
-endif
@$(MAKE) tests AB_CD=$*
ifneq (,$(filter cocoa,$(MOZ_WIDGET_TOOLKIT)))
MOZ_PKG_MAC_DSSTORE=$(_ABS_DIST)/branding/dsstore
MOZ_PKG_MAC_BACKGROUND=$(_ABS_DIST)/branding/background.png
MOZ_PKG_MAC_ICON=$(_ABS_DIST)/branding/disk.icns
endif
PACKAGER_NO_LIBS = 1
include $(MOZILLA_SRCDIR)/toolkit/mozapps/installer/packager.mk
repackage-win32-installer: WIN32_INSTALLER_OUT="$(_ABS_DIST)/$(PKG_INST_PATH)$(PKG_INST_BASENAME).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
-endif
if test ! -d $(_ABS_DIST)/$(PKG_INST_PATH); then \
$(NSINSTALL) -D $(_ABS_DIST)/$(PKG_INST_PATH); \
fi
$(RM) -rf l10n-stage
$(NSINSTALL) -D l10n-stage
$(CYGWIN_WRAPPER) 7z x -ol10n-stage $(WIN32_INSTALLER_IN)
$(RM) -r l10n-stage/localized
$(RM) l10n-stage/setup.exe
--- a/configure.in
+++ b/configure.in
@@ -4976,29 +4976,23 @@ dnl ====================================
dnl = Trademarked Branding
dnl ========================================================
MOZ_ARG_ENABLE_BOOL(official-branding,
[ --enable-official-branding Enable Official mozilla.org Branding
Do not distribute builds with
--enable-official-branding unless you have
permission to use trademarks per
http://www.mozilla.org/foundation/trademarks/ .],
-[case "$MOZ_BUILD_APP" in
-calendar)
- MOZ_BRANDING_DIRECTORY=other-licenses/branding/sunbird
- ;;
-
-mail)
- MOZ_BRANDING_DIRECTORY=other-licenses/branding/thunderbird
- ;;
-
-*)]
- AC_MSG_ERROR([Official branding is only available for Sunbird and Thunderbird.])
-esac
-)
+[
+ if test -z "$MOZ_OFFICIAL_BRANDING_DIRECTORY"; then
+ AC_MSG_ERROR([You must specify MOZ_OFFICIAL_BRANDING_DIRECTORY to use --enable-official-branding.])
+ else
+ MOZ_BRANDING_DIRECTORY=${MOZ_OFFICIAL_BRANDING_DIRECTORY}
+ fi
+])
MOZ_ARG_WITH_STRING(branding,
[ --with-branding=dir Use branding from the specified directory.],
MOZ_BRANDING_DIRECTORY=$withval)
REAL_BRANDING_DIRECTORY="${MOZ_BRANDING_DIRECTORY}"
if test -z "$REAL_BRANDING_DIRECTORY"; then
REAL_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
--- a/mail/build.mk
+++ b/mail/build.mk
@@ -62,21 +62,17 @@ ifdef MOZ_LDAP_XPCOM
tier_app_staticdirs += directory/c-sdk
tier_app_dirs += directory/xpcom
endif
ifdef MOZ_COMPOSER
tier_app_dirs += editor/ui
endif
-ifdef MOZ_BRANDING_DIRECTORY
tier_app_dirs += $(MOZ_BRANDING_DIRECTORY)
-else
-tier_app_dirs += mail/branding/nightly
-endif
tier_app_dirs += \
mailnews/base \
mailnews/mime/public \
mailnews \
$(NULL)
ifdef MOZ_CALENDAR
--- a/mail/confvars.sh
+++ b/mail/confvars.sh
@@ -59,17 +59,19 @@ if test "$MOZILLA_BRANCH_VERSION" = "1.9
MOZ_APP_VERSION_TXT=$topsrcdir/$MOZ_BUILD_APP/config/version-192.txt
# Use unofficial branding for the 1.9.2 branch
MOZ_BRANDING_DIRECTORY=mail/branding/unofficial
MOZ_NO_XPCOM_OBSOLETE=1
# MOZ_OJI is only required to be cleared for MOZILLA_1_9_2_BRANCH (OS X).
MOZ_OJI=
else
MOZ_APP_VERSION_TXT=$topsrcdir/$MOZ_BUILD_APP/config/version.txt
+ MOZ_BRANDING_DIRECTORY=mail/branding/nightly
fi
MOZ_APP_VERSION=`cat $MOZ_APP_VERSION_TXT`
THUNDERBIRD_VERSION=$MOZ_APP_VERSION
+MOZ_OFFICIAL_BRANDING_DIRECTORY=other-licenses/branding/thunderbird
# Until we can build with libxul, we can't have ipc either
MOZ_ENABLE_LIBXUL=
MOZ_IPC=
--- a/mail/locales/Makefile.in
+++ b/mail/locales/Makefile.in
@@ -42,20 +42,16 @@ relativesrcdir = mail/locales
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/config.mk
run_for_effects := $(shell if test ! -d $(DIST); then $(NSINSTALL) -D $(DIST); fi; if test ! -d $(DIST)/branding; then $(NSINSTALL) -D $(DIST)/branding; fi)
_ABS_DIST := $(call core_abspath,$(DIST))
-ifndef MOZ_BRANDING_DIRECTORY
-MOZ_BRANDING_DIRECTORY = mail/branding/nightly
-endif
-
SUBMAKEFILES += \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/Makefile \
$(DEPTH)/$(MOZ_BRANDING_DIRECTORY)/locales/Makefile \
$(NULL)
# This makefile uses variable overrides from the libs-% target to
# build non-default locales to non-default dist/ locations. Be aware!
--- a/mail/makefiles.sh
+++ b/mail/makefiles.sh
@@ -36,48 +36,40 @@
# ***** 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
mail/components/Makefile
+mail/components/addrbook/Makefile
+mail/components/build/Makefile
mail/components/compose/Makefile
-mail/components/addrbook/Makefile
+mail/components/phishing/Makefile
mail/components/preferences/Makefile
-mail/components/build/Makefile
mail/components/shell/Makefile
mail/components/shell/public/Makefile
-mail/components/phishing/Makefile
mail/extensions/Makefile
mail/extensions/mailviews/Makefile
mail/extensions/smime/Makefile
mail/installer/Makefile
mail/installer/windows/Makefile
+mail/locales/Makefile
+mail/test/mozmill/Makefile
mail/themes/Makefile
+mail/themes/gnomestripe/Makefile
mail/themes/pinstripe/Makefile
mail/themes/qute/Makefile
-mail/themes/gnomestripe/Makefile
-mail/test/mozmill/Makefile
+$MOZ_BRANDING_DIRECTORY/Makefile
+$MOZ_BRANDING_DIRECTORY/locales/Makefile
"
# storage-backport stuff
add_makefiles "
storage-backport/Makefile
storage-backport/public/Makefile
storage-backport/src/Makefile
storage-backport/build/Makefile
storage-backport/test/Makefile
"
-
-if test -n "$MOZ_BRANDING_DIRECTORY"; then
- add_makefiles "
- $MOZ_BRANDING_DIRECTORY/Makefile
- $MOZ_BRANDING_DIRECTORY/locales/Makefile
- "
fi
-
-fi