Bug 643704 - Allow to trigger PGO builds through mozconfig. r=ted

This commit is contained in:
Mike Hommey 2011-03-25 19:50:29 +01:00
parent 40c393b235
commit d7434901f4

View File

@ -171,9 +171,11 @@ CONFIGURES += $(TOPSRCDIR)/js/src/configure
# The default rule is build
build::
$(MAKE) -f $(TOPSRCDIR)/client.mk $(if $(MOZ_PGO),profiledbuild,realbuild)
# Print out any options loaded from mozconfig.
all build clean depend distclean export libs install realclean::
all realbuild clean depend distclean export libs install realclean::
@if test -f .mozconfig.out; then \
cat .mozconfig.out; \
rm -f .mozconfig.out; \
@ -207,11 +209,11 @@ else
endif
profiledbuild::
$(MAKE) -f $(TOPSRCDIR)/client.mk build MOZ_PROFILE_GENERATE=1
$(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_GENERATE=1
$(MAKE) -C $(PGO_OBJDIR) package
OBJDIR=${PGO_OBJDIR} $(PROFILE_GEN_SCRIPT)
$(MAKE) -f $(TOPSRCDIR)/client.mk maybe_clobber_profiledbuild
$(MAKE) -f $(TOPSRCDIR)/client.mk build MOZ_PROFILE_USE=1
$(MAKE) -f $(TOPSRCDIR)/client.mk realbuild MOZ_PROFILE_USE=1
#####################################################
# Build date unification
@ -228,7 +230,7 @@ endif
#####################################################
# Preflight, before building any project
build alldep preflight_all::
realbuild alldep preflight_all::
ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_PREFLIGHT_ALL),,1))
# Don't run preflight_all for individual projects in multi-project builds
# (when MOZ_CURRENT_PROJECT is set.)
@ -252,7 +254,7 @@ endif
# loop through them.
ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_BUILD_PROJECTS),,1))
configure depend build install export libs clean realclean distclean alldep preflight postflight maybe_clobber_profiledbuild upload sdk::
configure depend realbuild install export libs clean realclean distclean alldep preflight postflight maybe_clobber_profiledbuild upload sdk::
set -e; \
for app in $(MOZ_BUILD_PROJECTS); do \
$(MAKE) -f $(TOPSRCDIR)/client.mk $@ MOZ_CURRENT_PROJECT=$$app; \
@ -332,7 +334,7 @@ depend:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
####################################
# Preflight
build alldep preflight::
realbuild alldep preflight::
ifdef MOZ_PREFLIGHT
set -e; \
for mkfile in $(MOZ_PREFLIGHT); do \
@ -343,7 +345,7 @@ endif
####################################
# Build it
build:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
realbuild:: $(OBJDIR)/Makefile $(OBJDIR)/config.status
$(MOZ_MAKE)
####################################
@ -356,7 +358,7 @@ install export libs clean realclean distclean alldep maybe_clobber_profiledbuild
####################################
# Postflight
build alldep postflight::
realbuild alldep postflight::
ifdef MOZ_POSTFLIGHT
set -e; \
for mkfile in $(MOZ_POSTFLIGHT); do \
@ -369,7 +371,7 @@ endif # MOZ_CURRENT_PROJECT
####################################
# Postflight, after building all projects
build alldep postflight_all::
realbuild alldep postflight_all::
ifeq (,$(MOZ_CURRENT_PROJECT)$(if $(MOZ_POSTFLIGHT_ALL),,1))
# Don't run postflight_all for individual projects in multi-project builds
# (when MOZ_CURRENT_PROJECT is set.)
@ -409,4 +411,4 @@ echo-variable-%:
# in parallel.
.NOTPARALLEL:
.PHONY: checkout real_checkout depend build profiledbuild maybe_clobber_profiledbuild export libs alldep install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything configure preflight_all preflight postflight postflight_all upload sdk
.PHONY: checkout real_checkout depend realbuild build profiledbuild maybe_clobber_profiledbuild export libs alldep install clean realclean distclean cleansrcdir pull_all build_all clobber clobber_all pull_and_build_all everything configure preflight_all preflight postflight postflight_all upload sdk