mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Bug 977448 - add build support for a 'MOZ_MOZILLA_API_KEY'. r=khuey
This commit is contained in:
parent
334e9e6295
commit
4bd0419c77
10
configure.in
10
configure.in
@ -4050,6 +4050,16 @@ fi
|
|||||||
AC_DEFINE_UNQUOTED(MOZ_UPDATE_CHANNEL, $MOZ_UPDATE_CHANNEL)
|
AC_DEFINE_UNQUOTED(MOZ_UPDATE_CHANNEL, $MOZ_UPDATE_CHANNEL)
|
||||||
AC_SUBST(MOZ_UPDATE_CHANNEL)
|
AC_SUBST(MOZ_UPDATE_CHANNEL)
|
||||||
|
|
||||||
|
# Allow to specify a Mozilla API key file that contains the secret key to be
|
||||||
|
# used for various Mozilla API requests.
|
||||||
|
MOZ_ARG_WITH_STRING(mozilla-api-keyfile,
|
||||||
|
[ --with-mozilla-api-keyfile=file Use the secret key contained in the given keyfile for Mozilla API requests],
|
||||||
|
MOZ_MOZILLA_API_KEY=`cat $withval`)
|
||||||
|
if test -z "$MOZ_MOZILLA_API_KEY"; then
|
||||||
|
MOZ_MOZILLA_API_KEY=no-mozilla-api-key
|
||||||
|
fi
|
||||||
|
AC_SUBST(MOZ_MOZILLA_API_KEY)
|
||||||
|
|
||||||
# Allow to specify a Google API key file that contains the secret key to be
|
# Allow to specify a Google API key file that contains the secret key to be
|
||||||
# used for various Google API requests.
|
# used for various Google API requests.
|
||||||
MOZ_ARG_WITH_STRING(google-api-keyfile,
|
MOZ_ARG_WITH_STRING(google-api-keyfile,
|
||||||
|
@ -3,13 +3,16 @@
|
|||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
# 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/.
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
|
||||||
export:: google_api_key
|
export:: mozilla_api_key google_api_key
|
||||||
|
|
||||||
EXTRA_PP_COMPONENTS_FLAGS = -I google_api_key
|
EXTRA_PP_COMPONENTS_FLAGS = -I mozilla_api_key -I google_api_key
|
||||||
|
|
||||||
include $(topsrcdir)/config/rules.mk
|
include $(topsrcdir)/config/rules.mk
|
||||||
|
|
||||||
|
mozilla_api_key:
|
||||||
|
@echo '#define MOZ_MOZILLA_API_KEY $(MOZ_MOZILLA_API_KEY)' > $@
|
||||||
|
|
||||||
google_api_key:
|
google_api_key:
|
||||||
@echo '#define MOZ_GOOGLE_API_KEY $(MOZ_GOOGLE_API_KEY)' > $@
|
@echo '#define MOZ_GOOGLE_API_KEY $(MOZ_GOOGLE_API_KEY)' > $@
|
||||||
|
|
||||||
GARBAGE += google_api_key
|
GARBAGE += google_api_key moz_google_api_key
|
||||||
|
@ -103,6 +103,7 @@ nsURLFormatterService.prototype = {
|
|||||||
BUILD_TARGET: function() this.appInfo.OS + "_" + this.ABI,
|
BUILD_TARGET: function() this.appInfo.OS + "_" + this.ABI,
|
||||||
OS_VERSION: function() this.OSVersion,
|
OS_VERSION: function() this.OSVersion,
|
||||||
CHANNEL: function() UpdateChannel.get(),
|
CHANNEL: function() UpdateChannel.get(),
|
||||||
|
MOZILLA_API_KEY: function() "@MOZ_MOZILLA_API_KEY@",
|
||||||
GOOGLE_API_KEY: function() "@MOZ_GOOGLE_API_KEY@",
|
GOOGLE_API_KEY: function() "@MOZ_GOOGLE_API_KEY@",
|
||||||
DISTRIBUTION: function() this.distribution.id,
|
DISTRIBUTION: function() this.distribution.id,
|
||||||
DISTRIBUTION_VERSION: function() this.distribution.version
|
DISTRIBUTION_VERSION: function() this.distribution.version
|
||||||
|
Loading…
Reference in New Issue
Block a user