From f7fab44c9e1dfeb1c52d5e9a86844b65124ff865 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 19 Jul 2011 08:51:54 +0200 Subject: [PATCH] Bug 655678 - Move startupcache precompilation to the common packaging rules, and opt-in in browser and xulrunner. r=khuey --HG-- rename : browser/installer/precompile_cache.js => toolkit/mozapps/installer/precompile_cache.js --- browser/installer/Makefile.in | 13 +------------ toolkit/mozapps/installer/packager.mk | 18 +++++++++++++++++- .../mozapps}/installer/precompile_cache.js | 0 xulrunner/installer/Makefile.in | 1 + 4 files changed, 19 insertions(+), 13 deletions(-) rename {browser => toolkit/mozapps}/installer/precompile_cache.js (100%) diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in index ab5a84c4869d..f726f152619d 100644 --- a/browser/installer/Makefile.in +++ b/browser/installer/Makefile.in @@ -116,18 +116,7 @@ ifndef LIBXUL_SDK INSTALL_SDK = 1 endif -ifneq (1_,$(if $(CROSS_COMPILE),1,0)_$(UNIVERSAL_BINARY)) -ifdef RUN_TEST_PROGRAM -_ABS_RUN_TEST_PROGRAM = $(call core_abspath,$(RUN_TEST_PROGRAM)) -endif - -GENERATE_CACHE = \ - $(_ABS_RUN_TEST_PROGRAM) $(LIBXUL_DIST)/bin/xpcshell$(BIN_SUFFIX) -g "$$PWD" -a "$$PWD" -f $(topsrcdir)/browser/installer/precompile_cache.js -e 'populate_startupcache("omni.jar", "startupCache.zip");' && \ - rm -rf jsloader && \ - $(UNZIP) startupCache.zip && \ - rm startupCache.zip && \ - $(ZIP) -r9m omni.jar jsloader -endif +GENERATE_CACHE = 1 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk diff --git a/toolkit/mozapps/installer/packager.mk b/toolkit/mozapps/installer/packager.mk index 37a70ed65b38..1f61c27e6299 100644 --- a/toolkit/mozapps/installer/packager.mk +++ b/toolkit/mozapps/installer/packager.mk @@ -383,7 +383,23 @@ MAKE_SDK = $(CREATE_FINAL_TAR) - $(MOZ_APP_NAME)-sdk | bzip2 -vf > $(SDK) endif ifdef MOZ_OMNIJAR -GENERATE_CACHE ?= true + +ifdef GENERATE_CACHE +ifneq (1_,$(if $(CROSS_COMPILE),1,0)_$(UNIVERSAL_BINARY)) +ifdef RUN_TEST_PROGRAM +_ABS_RUN_TEST_PROGRAM = $(call core_abspath,$(RUN_TEST_PROGRAM)) +endif + +GENERATE_CACHE = \ + $(_ABS_RUN_TEST_PROGRAM) $(LIBXUL_DIST)/bin/xpcshell$(BIN_SUFFIX) -g "$$PWD" -a "$$PWD" -f $(topsrcdir)/toolkit/mozapps/installer/precompile_cache.js -e 'populate_startupcache("omni.jar", "startupCache.zip");' && \ + rm -rf jsloader && \ + $(UNZIP) startupCache.zip && \ + rm startupCache.zip && \ + $(ZIP) -r9m omni.jar jsloader +endif +else +GENERATE_CACHE = true +endif OMNIJAR_FILES = \ chrome \ diff --git a/browser/installer/precompile_cache.js b/toolkit/mozapps/installer/precompile_cache.js similarity index 100% rename from browser/installer/precompile_cache.js rename to toolkit/mozapps/installer/precompile_cache.js diff --git a/xulrunner/installer/Makefile.in b/xulrunner/installer/Makefile.in index 026bd9ce9f62..35febf9c4a8a 100644 --- a/xulrunner/installer/Makefile.in +++ b/xulrunner/installer/Makefile.in @@ -65,6 +65,7 @@ endif include $(topsrcdir)/config/rules.mk INSTALL_SDK = 1 +GENERATE_CACHE = 1 include $(topsrcdir)/toolkit/mozapps/installer/packager.mk