From 35a96dbcba50998cc56f26ced4b27ea44df39bab Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Wed, 25 Jun 2008 21:12:25 -0400 Subject: [PATCH] Bug 440932 - toolkit dlmgr should be buildable by suite; r=ted, sr=NeilAway --- toolkit/components/Makefile.in | 5 ++--- toolkit/components/build/Makefile.in | 3 +-- toolkit/components/build/nsToolkitCompsModule.cpp | 15 ++++++--------- toolkit/mozapps/downloads/Makefile.in | 3 +-- xpfe/components/Makefile.in | 4 +++- xpfe/components/build/Makefile.in | 7 +++++-- xpfe/components/build/nsModule.cpp | 6 ++++++ 7 files changed, 24 insertions(+), 19 deletions(-) diff --git a/toolkit/components/Makefile.in b/toolkit/components/Makefile.in index 75fcb0fe09e..8a4721daec4 100644 --- a/toolkit/components/Makefile.in +++ b/toolkit/components/Makefile.in @@ -115,12 +115,11 @@ endif # MOZ_PLACES endif # MOZ_SUITE endif # MOZ_THUNDERBIRD -ifndef MOZ_SUITE -# XXX Suite doesn't want these just yet +ifndef SUITE_USING_XPFE_DM ifdef MOZ_RDF DIRS += downloads endif -endif # MOZ_SUITE +endif # SUITE_USING_XPFE_DM ifdef MOZ_URL_CLASSIFIER DIRS += url-classifier diff --git a/toolkit/components/build/Makefile.in b/toolkit/components/build/Makefile.in index a8e5406712b..86748c5ed2d 100644 --- a/toolkit/components/build/Makefile.in +++ b/toolkit/components/build/Makefile.in @@ -121,8 +121,7 @@ REQUIRES += parentalcontrols endif endif -ifndef MOZ_SUITE -# XXX Suite isn't ready to build this just yet +ifndef SUITE_USING_XPFE_DM ifdef MOZ_RDF SHARED_LIBRARY_LIBS += ../downloads/src/$(LIB_PREFIX)download_s.$(LIB_SUFFIX) endif diff --git a/toolkit/components/build/nsToolkitCompsModule.cpp b/toolkit/components/build/nsToolkitCompsModule.cpp index 92b592eb4c3..81c98037d6c 100644 --- a/toolkit/components/build/nsToolkitCompsModule.cpp +++ b/toolkit/components/build/nsToolkitCompsModule.cpp @@ -49,13 +49,12 @@ #include "nsAlertsService.h" #endif -#ifndef MOZ_SUITE -// XXX Suite isn't ready to include this just yet +#ifndef SUITE_USING_XPFE_DM #ifdef MOZ_RDF #include "nsDownloadManager.h" #include "nsDownloadProxy.h" #endif -#endif // MOZ_SUITE +#endif #include "nsTypeAheadFind.h" @@ -84,14 +83,13 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsParentalControlsServiceWin) NS_GENERIC_FACTORY_CONSTRUCTOR(nsAlertsService) #endif -#ifndef MOZ_SUITE -// XXX Suite isn't ready to include this just yet +#ifndef SUITE_USING_XPFE_DM #ifdef MOZ_RDF NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsDownloadManager, nsDownloadManager::GetSingleton) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy) #endif -#endif // MOZ_SUITE +#endif NS_GENERIC_FACTORY_CONSTRUCTOR(nsTypeAheadFind) @@ -149,8 +147,7 @@ static const nsModuleComponentInfo components[] = NS_PARENTALCONTROLSSERVICE_CONTRACTID, nsParentalControlsServiceWinConstructor }, #endif -#ifndef MOZ_SUITE -// XXX Suite isn't ready to include this just yet +#ifndef SUITE_USING_XPFE_DM #ifdef MOZ_RDF { "Download Manager", NS_DOWNLOADMANAGER_CID, @@ -161,7 +158,7 @@ static const nsModuleComponentInfo components[] = NS_TRANSFER_CONTRACTID, nsDownloadProxyConstructor }, #endif -#endif // MOZ_SUITE +#endif { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID, NS_TYPEAHEADFIND_CONTRACTID, diff --git a/toolkit/mozapps/downloads/Makefile.in b/toolkit/mozapps/downloads/Makefile.in index a8dce719c46..5e2bb2943f6 100755 --- a/toolkit/mozapps/downloads/Makefile.in +++ b/toolkit/mozapps/downloads/Makefile.in @@ -42,8 +42,7 @@ VPATH = @srcdir@ include $(DEPTH)/config/autoconf.mk -ifndef MOZ_SUITE -# XXX Suite doesn't want these just yet +ifndef SUITE_USING_XPFE_DM DIRS = src tests endif diff --git a/xpfe/components/Makefile.in b/xpfe/components/Makefile.in index 765ea8cdb7a..82a44b5f1c3 100644 --- a/xpfe/components/Makefile.in +++ b/xpfe/components/Makefile.in @@ -88,9 +88,11 @@ DIRS += \ related \ autocomplete \ $(NULL) -ifneq ($(MOZ_BUILD_APP),camino) + +ifdef SUITE_USING_XPFE_DM DIRS += download-manager endif + ifndef MOZ_XUL_APP DIRS += startup endif diff --git a/xpfe/components/build/Makefile.in b/xpfe/components/build/Makefile.in index af0cb3f3609..aeb789504bc 100644 --- a/xpfe/components/build/Makefile.in +++ b/xpfe/components/build/Makefile.in @@ -90,14 +90,17 @@ REQUIRES += \ $(NULL) SHARED_LIBRARY_LIBS += \ - ../download-manager/src/$(LIB_PREFIX)downloadmanager_s.$(LIB_SUFFIX) \ ../related/src/$(LIB_PREFIX)related_s.$(LIB_SUFFIX) \ $(NULL) LOCAL_INCLUDES += \ - -I$(srcdir)/../download-manager/src \ -I$(srcdir)/../related/src \ $(NULL) +ifdef SUITE_USING_XPFE_DM +SHARED_LIBRARY_LIBS += ../download-manager/src/$(LIB_PREFIX)downloadmanager_s.$(LIB_SUFFIX) +LOCAL_INCLUDES += -I$(srcdir)/../download-manager/src +endif + ifndef MOZ_PLACES REQUIRES += history SHARED_LIBRARY_LIBS += \ diff --git a/xpfe/components/build/nsModule.cpp b/xpfe/components/build/nsModule.cpp index 5e5c987142f..e5605c1a78b 100644 --- a/xpfe/components/build/nsModule.cpp +++ b/xpfe/components/build/nsModule.cpp @@ -48,8 +48,10 @@ #ifdef MOZ_SUITE #include "nsRelatedLinksHandlerImpl.h" #include "nsDocShellCID.h" +#ifdef SUITE_USING_XPFE_DM #include "nsDownloadManager.h" #include "nsDownloadProxy.h" +#endif #if !defined(MOZ_PLACES) #include "nsGlobalHistory.h" @@ -90,8 +92,10 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserInstance) #ifdef MOZ_SUITE NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(RelatedLinksHandlerImpl, Init) +#ifdef SUITE_USING_XPFE_DM NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsDownloadManager, Init) NS_GENERIC_FACTORY_CONSTRUCTOR(nsDownloadProxy) +#endif #if !defined(MOZ_PLACES) NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsGlobalHistory, Init) @@ -154,10 +158,12 @@ static const nsModuleComponentInfo components[] = { #endif #ifdef MOZ_SUITE +#ifdef SUITE_USING_XPFE_DM { "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID, nsDownloadManagerConstructor }, { "Download", NS_DOWNLOAD_CID, NS_TRANSFER_CONTRACTID, nsDownloadProxyConstructor }, +#endif { "Related Links Handler", NS_RELATEDLINKSHANDLER_CID, NS_RELATEDLINKSHANDLER_CONTRACTID, RelatedLinksHandlerImplConstructor},