Bug 820148 - Add RELEASE_BUILD macro available in pref js files. r=ted

This commit is contained in:
Cameron McCormack 2012-12-22 16:35:51 +11:00
parent f4cd4d86ee
commit 186baf5f18
4 changed files with 21 additions and 2 deletions

View File

@ -45,10 +45,8 @@ endif
endif
ifdef LIBXUL_SDK
GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
APP_INI_DEPS = $(LIBXUL_DIST)/bin/platform.ini
else
GRE_MILESTONE = $(shell tail -n 1 $(topsrcdir)/config/milestone.txt 2>/dev/null || tail -1 $(topsrcdir)/config/milestone.txt)
APP_INI_DEPS = $(topsrcdir)/config/milestone.txt
endif

View File

@ -1203,6 +1203,12 @@ PP_TARGETS += PREF_JS_EXPORTS
endif
endif
# 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
################################################################################
# Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig

View File

@ -3946,6 +3946,15 @@ else
fi
fi
dnl set GRE_MILESTONE
dnl ========================================================
if test -n "$LIBXUL_SDK"; then
GRE_MILESTONE=`$PYTHON "$_topsrcdir"/config/printconfigsetting.py "$LIBXUL_DIST"/bin/platform.ini Build Milestone`
else
GRE_MILESTONE=`tail -n 1 "$_topsrcdir"/config/milestone.txt 2>/dev/null || tail -1 "$_topsrcdir"/config/milestone.txt`
fi
AC_SUBST(GRE_MILESTONE)
dnl system libevent Support
dnl ========================================================
MOZ_ARG_WITH_STRING(system-libevent,

View File

@ -1203,6 +1203,12 @@ PP_TARGETS += PREF_JS_EXPORTS
endif
endif
# 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
################################################################################
# Copy each element of AUTOCFG_JS_EXPORTS to $(FINAL_TARGET)/defaults/autoconfig