Port build config changes for component manager changes, part of bug 575740. r=Callek. Part of bustage fix for CLOSED TREE
authorMark Banner <bugzilla@standard8.plus.com>
Sun, 04 Jul 2010 13:37:13 +0100
changeset 5923 55c6c096789842d5cb4b2ace0ab0c3f8342f2463
parent 5922 5a05b7a2e639476e51052ef7a721626ec0f4e0f3
child 5924 0a4a9ee1fd80563c1a7673c79894f8c6a76dbf4d
push idunknown
push userunknown
push dateunknown
reviewersCallek
bugs575740
Port build config changes for component manager changes, part of bug 575740. r=Callek. Part of bustage fix for CLOSED TREE
config/config.mk
config/rules.mk
mail/installer/package-manifest.in
mail/installer/removed-files.in
suite/installer/package-manifest.in
suite/installer/removed-files.in
--- a/config/config.mk
+++ b/config/config.mk
@@ -87,16 +87,20 @@ core_abspath = $(if $(findstring :,$(1))
 
 # FINAL_TARGET specifies the location into which we copy end-user-shipped
 # build products (typelibs, components, chrome).
 #
 # It will usually be the well-loved $(DIST)/bin, today, but can also be an
 # XPI-contents staging directory for ambitious and right-thinking extensions.
 FINAL_TARGET = $(if $(XPI_NAME),$(DIST)/xpi-stage/$(XPI_NAME),$(DIST)/bin)
 
+ifdef XPI_NAME
+DEFINES += -DXPI_NAME=$(XPI_NAME)
+endif
+
 # MAKE_JARS_TARGET is a staging area for make-jars.pl.  When packaging in
 # the jar format, make-jars leaves behind a directory structure that's not
 # needed in $(FINAL_TARGET).  For both, flat, and symlink, the directory
 # structure contains the chrome, so leave it in $(FINAL_TARGET).
 ifeq (jar,$(MOZ_CHROME_FILE_FORMAT))
 MAKE_JARS_TARGET = $(if $(XPI_NAME),$(FINAL_TARGET).stage,$(DIST)/chrome-stage)
 else
 MAKE_JARS_TARGET = $(FINAL_TARGET)
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -868,17 +868,19 @@ else
 	$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib
 endif
 endif # DIST_INSTALL
 endif # LIBRARY
 ifdef SHARED_LIBRARY
 ifdef IS_COMPONENT
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
 	$(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
-	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $(SHARED_LIBRARY)
+ifndef NO_COMPONENTS_MANIFEST
+	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.manifest "binary-component $(SHARED_LIBRARY)"
+endif
 ifdef BEOS_ADDON_WORKAROUND
 	( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
 endif
 else # ! IS_COMPONENT
 ifneq (,$(filter OS2 WINNT WINCE,$(OS_ARCH)))
 	$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib
 else
 	$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib
@@ -1646,16 +1648,19 @@ ifndef NO_GEN_XPT
 ifneq ($(XPIDL_MODULE).idl,$(strip $(XPIDLSRCS)))
 $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS)) $(GLOBAL_DEPS) $(XPIDL_LINK)
 	$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(XPIDLSRCS))
 endif # XPIDL_MODULE.xpt != XPIDLSRCS
 
 libs:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
 ifndef NO_DIST_INSTALL
 	$(INSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(FINAL_TARGET)/components
+ifndef NO_INTERFACES_MANIFEST
+	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/interfaces.manifest "interfaces $(XPIDL_MODULE).xpt"
+endif
 endif
 
 endif # NO_GEN_XPT
 
 GARBAGE_DIRS		+= $(XPIDL_GEN_DIR)
 
 endif # XPIDLSRCS
 
@@ -1692,37 +1697,42 @@ export-idl:: $(XPIDLSRCS) $(IDL_DIR)
 endif
 endif
 	$(LOOP_OVER_PARALLEL_DIRS)
 	$(LOOP_OVER_DIRS)
 	$(LOOP_OVER_TOOL_DIRS)
 
 ################################################################################
 # Copy each element of EXTRA_COMPONENTS to $(FINAL_TARGET)/components
+ifneq (,$(filter %.js,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
+ifeq (,$(filter %.manifest,$(EXTRA_COMPONENTS) $(EXTRA_PP_COMPONENTS)))
+ifndef NO_JS_MANIFEST
+#$(error .js component without matching .manifest)
+endif
+endif
+endif
+
 ifdef EXTRA_COMPONENTS
 libs:: $(EXTRA_COMPONENTS)
 ifndef NO_DIST_INSTALL
 	$(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
-	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $(notdir $^)
-
 endif
 
 endif
 
 ifdef EXTRA_PP_COMPONENTS
 libs:: $(EXTRA_PP_COMPONENTS)
 ifndef NO_DIST_INSTALL
 	$(EXIT_ON_ERROR) \
 	$(NSINSTALL) -D $(FINAL_TARGET)/components; \
 	for i in $^; do \
           fname=`basename $$i`; \
 	  dest=$(FINAL_TARGET)/components/$${fname}; \
 	  $(RM) -f $$dest; \
 	  $(PYTHON) $(MOZILLA_SRCDIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) $(XULPPFLAGS) $$i > $$dest; \
-	  $(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.list $$fname; \
 	done
 endif
 
 endif
 
 ################################################################################
 # Copy each element of EXTRA_JS_MODULES to $(FINAL_TARGET)/modules
 ifdef EXTRA_JS_MODULES
--- a/mail/installer/package-manifest.in
+++ b/mail/installer/package-manifest.in
@@ -109,17 +109,17 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 @BINPATH@/defaults/messenger/mailViews.dat
 @BINPATH@/defaults/profile/localstore.rdf
 @BINPATH@/defaults/profile/prefs.js
 @BINPATH@/defaults/profile/mimeTypes.rdf
 
 @BINPATH@/isp/*
 
-@BINPATH@/components/components.list
+@BINPATH@/components/components.manifest
 @BINPATH@/components/aboutRights.js
 @BINPATH@/components/activity.xpt
 @BINPATH@/components/addrbook.xpt
 @BINPATH@/components/fts3tok.xpt
 @BINPATH@/components/mime.xpt
 @BINPATH@/components/steel.xpt
 @BINPATH@/components/msgAsyncPrompter.js
 @BINPATH@/components/msgbase.xpt
--- a/mail/installer/removed-files.in
+++ b/mail/installer/removed-files.in
@@ -38,16 +38,17 @@ chrome/US.jar
     components/accessibility.xpt
   #endif
 #endif
 components/accessibility-atk.xpt
 components/airbag.xpt
 components/bookmarks.xpt
 components/downloadmanager.xpt
 components/compreg.dat
+components/components.list
 components/history.xpt
 components/jsconsole.xpt
 components/mailnews.xpt
 components/mozgnome.xpt
 components/@DLL_PREFIX@myspell@DLL_SUFFIX@
 components/necko_data.xpt
 components/nsBackgroundUpdateService.js
 components/nsCloseAllWindows.js
--- a/suite/installer/package-manifest.in
+++ b/suite/installer/package-manifest.in
@@ -251,17 +251,17 @@
 #ifdef XP_OS2
 @BINPATH@/components/@DLL_PREFIX@zipwrite@DLL_SUFFIX@
 #else
 @BINPATH@/components/@DLL_PREFIX@zipwriter@DLL_SUFFIX@
 #endif
 ; ! MOZ_STATIC_BUILD
 #endif
 
-@BINPATH@/components/components.list
+@BINPATH@/components/components.manifest
 #ifdef ACCESSIBILITY
 #ifdef XP_WIN32
 @BINPATH@/AccessibleMarshal.dll
 @BINPATH@/components/accessibility-msaa.xpt
 #endif
 @BINPATH@/components/accessibility.xpt
 #endif
 #ifdef XP_MACOSX
--- a/suite/installer/removed-files.in
+++ b/suite/installer/removed-files.in
@@ -44,16 +44,17 @@ chrome/installed-chrome.txt
 chrome/reporter.jar
 chrome/reporter.manifest
 chrome/venkman.jar
 components/airbag.xpt
 components/@DLL_PREFIX@bookmark@DLL_SUFFIX@
 components/bookmarks.xpt
 components/@DLL_PREFIX@caps@DLL_SUFFIX@
 components/chatzilla-service.js
+components/components.list
 components/crashreporter.xpt
 components/downloadmanager.xpt
 components/@DLL_PREFIX@intlapp@DLL_SUFFIX@
 components/mozbrwsr.xpt
 components/@DLL_PREFIX@mozfind@DLL_SUFFIX@
 components/@DLL_PREFIX@myspell@DLL_SUFFIX@
 components/nsCloseAllWindows.js
 components/nsDictionary.js