Bug 569948 - Remove NS_InitEmbedding because it was obsoleted long ago by XRE_InitEmbedding and it's a footgun, r=mfinkle sr=dougt
authorBenjamin Smedberg <benjamin@smedbergs.us>
Tue, 08 Jun 2010 11:34:30 -0400
changeset 43307 8b3af57c81e89499926ce1fbcdf5f9cb1a9a4c6f
parent 43306 3238b12396892ecd4e3c1f29e0a390ceaff8adc9
child 43308 92527a44edfb432b73d248125624b28a6b7510e3
push idunknown
push userunknown
push dateunknown
reviewersmfinkle, dougt
bugs569948
milestone1.9.3a5pre
Bug 569948 - Remove NS_InitEmbedding because it was obsoleted long ago by XRE_InitEmbedding and it's a footgun, r=mfinkle sr=dougt
embedding/base/Makefile.in
embedding/base/nsEmbedAPI.cpp
embedding/base/nsEmbedAPI.h
embedding/base/nsEmbedOS2.cpp
embedding/base/nsEmbedWin32.cpp
embedding/base/objs.mk
embedding/base/standalone/Makefile.in
--- a/embedding/base/Makefile.in
+++ b/embedding/base/Makefile.in
@@ -36,49 +36,31 @@
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH           = ../..
 topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 
-DIRS		= standalone
-
 MODULE          = embed_base
-LIBRARY_NAME    = embed_base_s
 XPIDL_MODULE	= embed_base
 
 include $(DEPTH)/config/autoconf.mk
 
 
 DEFINES += -DMOZILLA_STRICT_API
 
 SDK_HEADERS         = \
-                nsEmbedAPI.h \
                 nsEmbedCID.h \
                 $(NULL)
 
 SDK_XPIDLSRCS   = \
                 nsIWindowCreator.idl \
                 $(NULL)
 
 
-SDK_LIBRARY     =                        \
-		$(LIB_PREFIX)embed_base_s.$(LIB_SUFFIX) \
-		$(NULL)
-
 XPIDLSRCS	    = \
                 nsIWindowCreator2.idl \
                 nsIWindowProvider.idl \
                 $(NULL)
 
-include $(srcdir)/objs.mk
-
-CPPSRCS += $(EMBED_CPPSRCS)
-
-# we don't want the shared lib, but we want to force the creation of a
-# static lib.
-FORCE_STATIC_LIB = 1
-
 include $(topsrcdir)/config/rules.mk
-
-CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
deleted file mode 100644
--- a/embedding/base/nsEmbedAPI.cpp
+++ /dev/null
@@ -1,220 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Mozilla browser.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications, Inc.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsIServiceManager.h"
-#include "nsIComponentManager.h"
-#include "nsIComponentRegistrar.h"
-#include "nsIAppStartupNotifier.h"
-#include "nsIStringBundle.h"
-
-#include "nsIDirectoryService.h"
-#include "nsDirectoryServiceDefs.h"
-
-#include "nsXPCOM.h"
-#include "nsEmbedAPI.h"
-
-static nsIServiceManager *sServiceManager = nsnull;
-static PRBool             sRegistryInitializedFlag = PR_FALSE;
-static PRUint32           sInitCounter = 0;
-
-#define HACK_AROUND_THREADING_ISSUES
-//#define HACK_AROUND_NONREENTRANT_INITXPCOM
-
-#ifdef HACK_AROUND_NONREENTRANT_INITXPCOM
-// XXX hack class to clean up XPCOM when this module is unloaded
-class XPCOMCleanupHack
-{
-public:
-    PRBool mCleanOnExit;
-
-    XPCOMCleanupHack() : mCleanOnExit(PR_FALSE) {}
-    ~XPCOMCleanupHack()
-    {
-        if (mCleanOnExit)
-        {
-            if (sInitCounter > 0)
-            {
-                sInitCounter = 1;
-                NS_TermEmbedding();
-            }
-            // XXX Global destructors and NS_ShutdownXPCOM don't seem to mix
-//          NS_ShutdownXPCOM(sServiceManager);
-        }
-    }
-};
-static PRBool sXPCOMInitializedFlag = PR_FALSE;
-static XPCOMCleanupHack sXPCOMCleanupHack;
-#endif
-
-
-NS_METHOD
-NS_InitEmbedding(nsILocalFile *mozBinDirectory,
-                 nsIDirectoryServiceProvider *appFileLocProvider,
-                 nsStaticModuleInfo const *aStaticComponents,
-                 PRUint32 aStaticComponentCount)
-{
-    nsresult rv;
-
-    // Reentrant calls to this method do nothing except increment a counter
-    sInitCounter++;
-    if (sInitCounter > 1)
-        return NS_OK;
-
-    // Initialise XPCOM
-#ifdef HACK_AROUND_NONREENTRANT_INITXPCOM
-    // Can't call NS_InitXPCom more than once or things go boom!
-    if (!sXPCOMInitializedFlag)
-#endif
-    {
-        // Initialise XPCOM
-        rv = NS_InitXPCOM3(&sServiceManager, mozBinDirectory, appFileLocProvider,
-                           aStaticComponents, aStaticComponentCount);
-        NS_ENSURE_SUCCESS(rv, rv);
-                
-#ifdef HACK_AROUND_NONREENTRANT_INITXPCOM
-        sXPCOMInitializedFlag = PR_TRUE;
-        sXPCOMCleanupHack.mCleanOnExit = PR_TRUE;
-#endif
-    }
-    // Register components
-    if (!sRegistryInitializedFlag)
-    {
-#ifdef DEBUG
-        nsIComponentRegistrar *registrar;
-        rv = sServiceManager->QueryInterface(NS_GET_IID(nsIComponentRegistrar),
-                                             (void **) &registrar);
-        if (NS_FAILED(rv))
-        {
-            NS_WARNING("Could not QI to registrar");
-            return rv;
-        }
-        rv = registrar->AutoRegister(nsnull);
-        if (NS_FAILED(rv))
-        {
-            NS_WARNING("Could not AutoRegister");
-        }
-        else
-        {
-            // If the application is using an GRE, then, auto register components
-            // in the GRE directory as well.
-            //
-            // The application indicates that it's using an GRE by returning a
-            // valid nsIFile when queried (via appFileLocProvider) for the
-            // NS_GRE_DIR atom as shown below
-
-            if (appFileLocProvider)
-            {
-                nsIFile *greDir = nsnull;
-                PRBool persistent = PR_TRUE;
-
-                appFileLocProvider->GetFile(NS_GRE_DIR, &persistent,
-                                            &greDir);
-                if (greDir)
-                {
-                    rv = registrar->AutoRegister(greDir);
-                    if (NS_FAILED(rv))
-                        NS_WARNING("Could not AutoRegister GRE components");
-                    NS_RELEASE(greDir);
-                }
-            }
-        }
-        NS_RELEASE(registrar);
-        if (NS_FAILED(rv))
-            return rv;
-#endif
-        sRegistryInitializedFlag = PR_TRUE;
-    }
-
-    nsIComponentManager *compMgr;
-    rv = sServiceManager->QueryInterface(NS_GET_IID(nsIComponentManager),
-                                         (void **) &compMgr);
-    if (NS_FAILED(rv))
-        return rv;
-
-    nsIObserver *startupNotifier;
-    rv = compMgr->CreateInstanceByContractID(NS_APPSTARTUPNOTIFIER_CONTRACTID,
-                                             NULL,
-                                             NS_GET_IID(nsIObserver),
-                                             (void **) &startupNotifier);
-    NS_RELEASE(compMgr);
-    if (NS_FAILED(rv))
-        return rv;
-
-	  startupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull);
-    NS_RELEASE(startupNotifier);
-
-#ifdef HACK_AROUND_THREADING_ISSUES
-    // XXX force certain objects to be created on the main thread
-    nsIStringBundleService *bundleService;
-    rv = sServiceManager->GetServiceByContractID(NS_STRINGBUNDLE_CONTRACTID,
-                                                 NS_GET_IID(nsIStringBundleService),
-                                                 (void **) &bundleService);
-    if (NS_SUCCEEDED(rv))
-    {
-        nsIStringBundle *stringBundle;
-        const char propertyURL[] = "chrome://necko/locale/necko.properties";
-        rv = bundleService->CreateBundle(propertyURL, &stringBundle);
-        NS_RELEASE(stringBundle);
-        NS_RELEASE(bundleService);
-    }
-#endif
-
-    return NS_OK;
-}
-
-NS_METHOD
-NS_TermEmbedding()
-{
-    // Reentrant calls to this method do nothing except decrement a counter
-    if (sInitCounter > 1)
-    {
-        sInitCounter--;
-        return NS_OK;
-    }
-    sInitCounter = 0;
-
-    NS_IF_RELEASE(sServiceManager);
-
-    // Terminate XPCOM & cleanup
-#ifndef HACK_AROUND_NONREENTRANT_INITXPCOM
-    nsresult rv = NS_ShutdownXPCOM(sServiceManager);
-    NS_ENSURE_SUCCESS(rv, rv);
-#endif
-
-    return NS_OK;
-}
deleted file mode 100644
--- a/embedding/base/nsEmbedAPI.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Mozilla browser.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications, Inc.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Adam Lock <adamlock@netscape.com>
- *   Benjamin Smedberg <benjamin@smedbergs.us>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#ifndef NSEMBEDAPI_H
-#define NSEMBEDAPI_H
-
-#include "nscore.h"
-#include "nsXPCOM.h"
-#include "nsILocalFile.h"
-#include "nsIDirectoryService.h"
-
-/**
- * @file
- * @brief The Gecko embedding API functions, structures and definitions.
- */
-
-/**
- * Initialises the Gecko embedding layer. You <I>must</I>
- * call this method before proceeding to use Gecko. This function ensures
- * XPCOM is started, creates the component registry if necessary and
- * starts global services.
- *
- * @status FROZEN
- *
- * @note Use <CODE>NS_NewLocalFile</CODE> to create the file object you
- *       supply as the bin directory path in this call. The function
- *       may be safely called before the rest of XPCOM or embedding has
- *       been initialised.
- *
- * @param aMozBinDirectory The Gecko directory containing the component
- *                         registry and runtime libraries;
- *                         or use <CODE>nsnull</CODE> to use the working
- *                         directory.
- * @param aAppFileLocProvider The object to be used by Gecko that specifies
- *                         to Gecko where to find profiles, the component
- *                         registry preferences and so on; or use
- *                         <CODE>nsnull</CODE> for the default behaviour.
- * @param aStaticComponents An array of static components (see NS_InitXPCOM3).
- *                         may be null.
- * @param aStaticComponentCount Number of static components in the
- *                              aStaticComponents array.
- *
- * @see NS_NewLocalFile
- * @see nsILocalFile
- * @see nsIDirectoryServiceProvider
- *
- * @return NS_OK for success;
- *         other error codes indicate a failure during initialisation.
- *
- */
-extern "C" NS_HIDDEN NS_METHOD
-NS_InitEmbedding(nsILocalFile *aMozBinDirectory,
-                 nsIDirectoryServiceProvider *aAppFileLocProvider,
-                 nsStaticModuleInfo const *aStaticComponents = nsnull,
-                 PRUint32 aStaticComponentCount = 0);
-
-
-/**
- * Terminates the Gecko embedding layer. Call this function during shutdown to
- * ensure that global services are unloaded, files are closed and
- * XPCOM is shutdown.
- *
- * @status FROZEN
- *
- * @note Release any XPCOM objects within Gecko that you may be holding a
- *       reference to before calling this function.
- *
- * @return NS_OK
- */
-extern "C" NS_HIDDEN NS_METHOD
-NS_TermEmbedding();
-
-/*---------------------------------------------------------------------------*/
-/* Event processing APIs. The native OS dependencies mean you must be        */
-/* building on a supported platform to get the functions below.              */
-/*---------------------------------------------------------------------------*/
-
-#undef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
-
-/* Win32 specific stuff */
-#if defined (WIN32) || defined (WINCE)
-#include "windows.h"
-/**
- * @var typedef MSG nsEmbedNativeEvent
- * 
- * Embedding events are native <CODE>MSG</CODE> structs on Win32.
- */
-typedef MSG nsEmbedNativeEvent;
-#define MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
-#endif
-
-/* OS/2 specific stuff */
-#ifdef XP_OS2
-#include "os2.h"
-
-/**
- * @var typedef MSG nsEmbedNativeEvent
- * 
- * Embedding events are native <CODE>QMSG</CODE> structs on OS/2.
- */
-typedef QMSG nsEmbedNativeEvent;
-#define MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
-#endif
-
-/* Mac specific stuff */
-/* TODO implementation left as an exercise for the reader */
-
-/* GTK specific stuff */
-/* TODO implementation left as an exercise for the reader */
-
-
-#ifdef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
-
-/**
- * @fn nsresult NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled)
- *
- * This function gives Gecko the chance to process a native window events.
- * Call this function from your message processing loop.
- *
- * @status UNDER_REVIEW
- *
- * @param aEvent The native UI event
- * @param aWasHandled Returns with <CODE>PR_TRUE</CODE> if the end was
- *                    handled; in which case it should not be handled by your
- *                    application.
- *
- * @return NS_OK
- */
-extern "C" NS_HIDDEN NS_METHOD
-NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled);
-
-#endif /* MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING */
-
-#endif /* NSEMBEDAPI_H */
-
deleted file mode 100644
--- a/embedding/base/nsEmbedOS2.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Mozilla browser.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications, Inc.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Adam Lock <adamlock@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsEmbedAPI.h"
-
-#ifndef OS2
-#error This file is for OS/2!
-#endif
-
-#ifdef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
-
-NS_METHOD NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled)
-{
-    aWasHandled = PR_FALSE;
-    return NS_OK;
-}
-
-#endif /* MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING */
deleted file mode 100644
--- a/embedding/base/nsEmbedWin32.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- *
- * ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Mozilla browser.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications, Inc.
- * Portions created by the Initial Developer are Copyright (C) 1999
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Adam Lock <adamlock@netscape.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsEmbedAPI.h"
-
-#ifndef WIN32
-#error This file is for Win32!
-#endif
-
-#ifdef MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING
-
-NS_METHOD NS_HandleEmbeddingEvent(nsEmbedNativeEvent &aEvent, PRBool &aWasHandled)
-{
-    aWasHandled = PR_FALSE;
-    return NS_OK;
-}
-
-#endif /* MOZ_SUPPORTS_EMBEDDING_EVENT_PROCESSING */
deleted file mode 100644
--- a/embedding/base/objs.mk
+++ /dev/null
@@ -1,47 +0,0 @@
-# vim:set ts=8 sw=8 sts=8 noet:
-# 
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is the Mozilla browser.
-#
-# The Initial Developer of the Original Code is
-# Christopher Blizzard.
-# Portions created by the Initial Developer are Copyright (C) 2001
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-EMBED_CPPSRCS = nsEmbedAPI.cpp
-
-ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
-EMBED_CPPSRCS += nsEmbedWin32.cpp
-endif
-
-ifeq ($(OS_ARCH),OS2)
-EMBED_CPPSRCS += nsEmbedOS2.cpp
-endif
deleted file mode 100644
--- a/embedding/base/standalone/Makefile.in
+++ /dev/null
@@ -1,72 +0,0 @@
-# vim:set ts=8 sw=8 sts=8 noet:
-# 
-# ***** BEGIN LICENSE BLOCK *****
-# Version: MPL 1.1/GPL 2.0/LGPL 2.1
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-# http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# The Original Code is the Mozilla browser.
-#
-# The Initial Developer of the Original Code is
-# Christopher Blizzard.
-# Portions created by the Initial Developer are Copyright (C) 2001
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 2 or later (the "GPL"), or
-# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
-# in which case the provisions of the GPL or the LGPL are applicable instead
-# of those above. If you wish to allow use of your version of this file only
-# under the terms of either the GPL or the LGPL, and not to allow others to
-# use your version of this file under the terms of the MPL, indicate your
-# decision by deleting the provisions above and replace them with the notice
-# and other provisions required by the GPL or the LGPL. If you do not delete
-# the provisions above, a recipient may use your version of this file under
-# the terms of any one of the MPL, the GPL or the LGPL.
-#
-# ***** END LICENSE BLOCK *****
-
-DEPTH           = ../../..
-topsrcdir       = @top_srcdir@
-srcdir          = @srcdir@
-VPATH           = @srcdir@
-
-MODULE          = embed_base
-LIBRARY_NAME    = embed_base_standalone
-XPIDL_MODULE	= embed_base
-
-include $(DEPTH)/config/autoconf.mk
-
-
-DEFINES += -DMOZILLA_STRICT_API -DXPCOM_GLUE
-
-SDK_LIBRARY     =                        \
-		$(LIB_PREFIX)embed_base_standalone.$(LIB_SUFFIX) \
-		$(NULL)
-
-include $(srcdir)/../objs.mk
-
-CPPSRCS += $(EMBED_CPPSRCS)
-
-# we don't want the shared lib, but we want to force the creation of a
-# static lib.
-FORCE_STATIC_LIB = 1
-
-include $(topsrcdir)/config/rules.mk
-
-CXXFLAGS += $(MOZ_TOOLKIT_REGISTRY_CFLAGS)
-
-export::
-	$(INSTALL) $(addprefix $(srcdir)/../,$(EMBED_CPPSRCS)) .
-
-GARBAGE += $(EMBED_CPPSRCS)