Bug 514519 - make --enable-official-branding app-agnostic. r=ted
authorGavin Sharp <gavin.sharp@gmail.com>
Fri, 04 Sep 2009 14:27:49 +0200
changeset 32235 53c42b6f8311e896a236cbece75563b4733745e9
parent 32234 0925624977a2d9917ed29a3de8c4777d61f03073
child 32236 64da35bd0d16d81866c7c777bf8afc6268847a7a
push idunknown
push userunknown
push dateunknown
reviewersted
bugs514519
milestone1.9.3a1pre
Bug 514519 - make --enable-official-branding app-agnostic. r=ted
browser/confvars.sh
configure.in
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -44,8 +44,10 @@ MOZ_ENABLE_LIBXUL=1
 MOZ_STATIC_BUILD_UNSUPPORTED=1
 MOZ_PLACES=1
 # always enabled for form history
 MOZ_MORKREADER=1
 MOZ_SAFE_BROWSING=1
 MOZ_APP_VERSION=$FIREFOX_VERSION
 MOZ_EXTENSIONS_DEFAULT=" gnomevfs reporter"
 # MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
+MOZ_BRANDING_DIRECTORY=browser/branding/nightly
+MOZ_OFFICIAL_BRANDING_DIRECTORY=other-licenses/branding/firefox
--- a/configure.in
+++ b/configure.in
@@ -5024,39 +5024,28 @@ 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
-browser)
-    MOZ_BRANDING_DIRECTORY=other-licenses/branding/firefox
-    MOZ_APP_DISPLAYNAME=Firefox
-    ;;
-
-*)]
-    AC_MSG_ERROR([Official branding is only available for Firefox.])
-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)
 
-dnl For Firefox, we always want MOZ_BRANDING_DIRECTORY to point somewhere, so
-dnl if it's not set make it point to the default branding location now. Other
-dnl products need MOZ_BRANDING_DIRECTORY to NOT be set, in order to use their
-dnl default branding (ie, only set it when using non-default branding).
-if test "$MOZ_BUILD_APP" = "browser" -a -z "$MOZ_BRANDING_DIRECTORY"; then
-  MOZ_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
-fi
-
 REAL_BRANDING_DIRECTORY="${MOZ_BRANDING_DIRECTORY}"
 if test -z "$REAL_BRANDING_DIRECTORY"; then
   REAL_BRANDING_DIRECTORY=${MOZ_BUILD_APP}/branding/nightly
 fi
 
 if test -f "$topsrcdir/$REAL_BRANDING_DIRECTORY/configure.sh"; then
   . "$topsrcdir/$REAL_BRANDING_DIRECTORY/configure.sh"
 fi