Bug 820148 - Add a RELEASE_BUILD macro that can be used within pref js files. r=ted a=akeybl
☠☠ backed out by 66f742b26f32 ☠ ☠
authorCameron McCormack <cam@mcc.id.au>
Wed, 19 Dec 2012 10:10:22 +1100
changeset 204698 9841e712dda639886b3654c5098a3ddfcb6a1978
parent 204697 79ad9e9928ed9ebb5bbc8ebaf9b8dd44c1ac1237
child 204699 85d4b438e27d0e34c77853572bcf2c5b24f4cc35
push id27310
push usersku@mozilla.com
push dateThu, 14 Aug 2014 03:59:36 +0000
treeherdertry@ac9925c243e7 [default view] [failures only]
reviewersted, akeybl
bugs820148
milestone19.0a2
Bug 820148 - Add a RELEASE_BUILD macro that can be used within pref js files. r=ted a=akeybl
build/Makefile.in
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -52,16 +52,22 @@ GRE_MILESTONE = $(shell tail -n 1 $(tops
 APP_INI_DEPS = $(topsrcdir)/config/milestone.txt
 endif
 
 APP_BUILDID := $(shell cat $(DEPTH)/config/buildid)
 APP_INI_DEPS += $(DEPTH)/config/buildid
 
 DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DAPP_BUILDID=$(APP_BUILDID)
 
+# Set a flag that can be used in pref files to disable features if
+# we are not building for Aurora or Nightly.
+ifeq (,$(findstring a,$(GRE_MILESTONE)))
+PREF_PPFLAGS += -DRELEASE_BUILD
+endif
+
 DEFINES += -DMOZ_APP_VERSION="$(MOZ_APP_VERSION)"
 APP_INI_DEPS += $(DEPTH)/config/autoconf.mk
 
 MOZ_SOURCE_STAMP := $(firstword $(shell cd $(topsrcdir)/$(MOZ_BUILD_APP)/.. && hg parent --template="{node|short}\n" 2>/dev/null))
 ifdef MOZ_SOURCE_STAMP
 DEFINES += -DMOZ_SOURCE_STAMP="$(MOZ_SOURCE_STAMP)"
 endif