Bug 568691 - build components.manifest instead of components.list, and switch the sample JS component to use standard EXTRA_COMPONENTS machinery.
authorBenjamin Smedberg <benjamin@smedbergs.us>
Mon, 21 Jun 2010 13:59:58 -0400
changeset 47011 5e71dd583552ec7f772dc6cca137273b12fe524c
parent 47010 de2fe50057e7e16ba29b297ea4de4c8304f5b0a0
child 47012 b9a87d218a736c1fd1be4a66a77d19f28299a669
push idunknown
push userunknown
push dateunknown
bugs568691
milestone1.9.3a6pre
Bug 568691 - build components.manifest instead of components.list, and switch the sample JS component to use standard EXTRA_COMPONENTS machinery.
browser/installer/package-manifest.in
config/rules.mk
xpcom/sample/Makefile.in
xpcom/sample/nsSample.manifest
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -100,17 +100,17 @@
 @BINPATH@/mozilla-xremote-client
 #endif
 #endif
 #ifdef MOZ_SPLASHSCREEN
 @BINPATH@/splash.bmp
 #endif
 
 ; [Components]
-@BINPATH@/components/components.list
+@BINPATH@/components/components.manifest
 @BINPATH@/components/alerts.xpt
 #ifdef ACCESSIBILITY
 #ifdef XP_WIN32
 @BINPATH@/AccessibleMarshal.dll
 @BINPATH@/components/accessibility-msaa.xpt
 #endif
 @BINPATH@/components/accessibility.xpt
 #endif
--- a/config/rules.mk
+++ b/config/rules.mk
@@ -878,17 +878,17 @@ 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)
+	@$(PYTHON) $(MOZILLA_DIR)/config/buildlist.py $(FINAL_TARGET)/components/components.manifest "binary-component $(SHARED_LIBRARY)"
 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
--- a/xpcom/sample/Makefile.in
+++ b/xpcom/sample/Makefile.in
@@ -78,17 +78,17 @@ CPPSRCS		=		   \
 # XPIDLSRCS specified IDL files. The build system runs the xpidl tool on these
 # files to generate C++ headers and .xpt typelib files.
 XPIDLSRCS	= nsISample.idl
 
 include $(topsrcdir)/config/config.mk
 
 # EXTRA_COMPONENTS installs components written JavaScript to
 # dist/bin/components
-EXTRA_COMPONENTS = nsSample.js
+EXTRA_COMPONENTS = nsSample.js nsSample.manifest
 
 # EXTRA_DSO_LDOPTS specifies linker flags when building a shared library
 # from this Makefile. We link against the "dependent glue" and against the
 # frozen XPCOM shared library.
 EXTRA_DSO_LDOPTS = \
 		$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
 		$(XPCOM_FROZEN_LDOPTS) \
 		$(NSPR_LIBS) \
@@ -103,14 +103,8 @@ endif
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(TARGETS)
 	$(INSTALL) $(srcdir)/xpconnect-sample.html $(DIST)/bin/res/samples
 
 install:: $(TARGETS)
 	$(SYSINSTALL) $(IFLAGS1) $(srcdir)/xpconnect-sample.html $(DESTDIR)$(mozappdir)/res/samples
-
-# XXX TEMPORARY DEMONSTRATION HACK
-libs::
-	$(PYTHON) $(topsrcdir)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(srcdir)/nsSample.manifest > $(DIST)/bin/components/nsSample.manifest
-
-DEFINES += -DSHARED_LIBRARY=$(SHARED_LIBRARY)
--- a/xpcom/sample/nsSample.manifest
+++ b/xpcom/sample/nsSample.manifest
@@ -1,3 +1,2 @@
 component dea98e50-1dd1-11b2-9344-8902b4805a2e nsSample.js
 contract @mozilla.org/jssample;1 dea98e50-1dd1-11b2-9344-8902b4805a2e
-binary-component @SHARED_LIBRARY@