bug 444686 - create/adapt build system for comm-central, mailnews changes, r=Standard8 r=Callek
authorRobert Kaiser <kairo@kairo.at>
Tue, 22 Jul 2008 14:28:40 +0200
changeset 2 c087100cf4cf306023db268640ada54ebb0d4e82
parent 1 66c9c3ea3cbed9214b524d4631cf7bc900e34b8b
child 3 451a80b01ba21724df0abd0171b43a82ca81befc
push idunknown
push userunknown
push dateunknown
reviewersStandard8, Callek
bugs444686
bug 444686 - create/adapt build system for comm-central, mailnews changes, r=Standard8 r=Callek
directory/makefiles.sh
mailnews/addrbook/build/Makefile.in
mailnews/addrbook/test/unit/head_addrbook.js
mailnews/addrbook/test/unit/test_cardForEmail.js
mailnews/addrbook/test/unit/test_mailList1.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch1.js
mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
mailnews/addrbook/test/unit/test_nsIAbCard.js
mailnews/base/build/Makefile.in
mailnews/base/test/unit/head_mailbase.js
mailnews/base/test/unit/test_bug366491.js
mailnews/base/test/unit/test_bug428427.js
mailnews/base/test/unit/test_nsIMsgFolderListenerLocal.js
mailnews/base/test/unit/test_searchAddressInAb.js
mailnews/base/test/unit/test_searchJunk.js
mailnews/base/test/unit/test_searchTag.js
mailnews/base/util/Makefile.in
mailnews/build/Makefile.in
mailnews/compose/build/Makefile.in
mailnews/compose/test/unit/head_compose.js
mailnews/compose/test/unit/test_nsMsgCompose1.js
mailnews/compose/test/unit/test_sendMailMessage.js
mailnews/db/msgdb/test/unit/head_maildb.js
mailnews/db/msgdb/test/unit/test_maildb.js
mailnews/extensions/bayesian-spam-filter/test/unit/head_bayes.js
mailnews/extensions/bayesian-spam-filter/test/unit/test_bug228675.js
mailnews/imap/build/Makefile.in
mailnews/imap/test/Makefile.in
mailnews/import/build/Makefile.in
mailnews/import/test/unit/head_import.js
mailnews/import/test/unit/test_bug_437556.js
mailnews/local/build/Makefile.in
mailnews/local/test/unit/head_maillocal.js
mailnews/news/build/Makefile.in
mailnews/news/test/unit/head_server_setup.js
mailnews/news/test/unit/test_server.js
mailnews/test/fakeserver/pop3d.js
new file mode 100644
--- /dev/null
+++ b/directory/makefiles.sh
@@ -0,0 +1,44 @@
+#! /bin/sh
+# ***** 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 the Mozilla build system
+#
+# The Initial Developer of the Original Code is
+# Ben Turner <mozilla@songbirdnest.com>
+#
+# Portions created by the Initial Developer are Copyright (C) 2007
+# 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 *****
+
+add_makefiles "
+directory/xpcom/Makefile
+directory/xpcom/base/Makefile
+directory/xpcom/base/public/Makefile
+directory/xpcom/base/src/Makefile
+"
--- a/mailnews/addrbook/build/Makefile.in
+++ b/mailnews/addrbook/build/Makefile.in
@@ -88,17 +88,17 @@ SHARED_LIBRARY_LIBS = \
 ifeq ($(USE_SHORT_LIBNAME),1)
 EXTRA_DSO_LIBS += msgbsutl
 else
 EXTRA_DSO_LIBS += msgbaseutil
 endif
 
 EXTRA_DSO_LDOPTS = \
 	$(LIBS_DIR) \
-	$(DEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+	$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 	$(EXTRA_DSO_LIBS) \
 	$(MOZ_UNICHARUTIL_LIBS) \
 	$(MOZ_COMPONENT_LIBS) \
 	$(NULL)
 
 ifeq ($(OS_ARCH),Darwin)
 EXTRA_DSO_LDOPTS += \
     $(TK_LIBS) \
--- a/mailnews/addrbook/test/unit/head_addrbook.js
+++ b/mailnews/addrbook/test/unit/head_addrbook.js
@@ -1,5 +1,5 @@
 // Import the main scripts that mailnews tests need to set up and tear down
-do_import_script("mailnews/test/resources/mailDirService.js");
+do_import_script("../mailnews/test/resources/mailDirService.js");
 
 // Import the required setup scripts.
-do_import_script("mailnews/addrbook/test/resources/abSetup.js");
+do_import_script("../mailnews/addrbook/test/resources/abSetup.js");
--- a/mailnews/addrbook/test/unit/test_cardForEmail.js
+++ b/mailnews/addrbook/test/unit/test_cardForEmail.js
@@ -5,17 +5,17 @@
  * - checks correct return when no matching email address supplied
  * - checks correct return when matching email address supplied.
  *
  * Uses: cardForEmail.mab
  */
 
 function run_test() {
   // Test setup - copy the data file into place
-  var testAB = do_get_file("mailnews/addrbook/test/unit/data/cardForEmail.mab");
+  var testAB = do_get_file("../mailnews/addrbook/test/unit/data/cardForEmail.mab");
 
   // Copy the file to the profile directory for a PAB
   testAB.copyTo(gProfileDir, kPABData.fileName);
 
   // Test - Get the directory
   var abManager = Components.classes["@mozilla.org/abmanager;1"]
                             .getService(Components.interfaces.nsIAbManager);
 
--- a/mailnews/addrbook/test/unit/test_mailList1.js
+++ b/mailnews/addrbook/test/unit/test_mailList1.js
@@ -27,17 +27,17 @@ function checkLists(childNodes, number) 
   }
 
   mailListArray.forEach(function (value) { do_check_neq(value, null); });
 }
 
 function run_test() {
   // Create a new card
   // Test setup - copy the data file into place
-  var testAB = do_get_file("mailnews/addrbook/test/resources/abLists1.mab");
+  var testAB = do_get_file("../mailnews/addrbook/test/resources/abLists1.mab");
 
   // Copy the file to the profile directory for a PAB
   testAB.copyTo(gProfileDir, kPABData.fileName);
 
   // Test - Get the directory.
 
   var abManager = Components.classes["@mozilla.org/abmanager;1"]
                             .getService(Components.interfaces.nsIAbManager);
--- a/mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch1.js
+++ b/mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch1.js
@@ -86,21 +86,21 @@ acObserver.prototype = {
   onSearchResult: function (aSearch, aResult) {
     this._search = aSearch;
     this._result = aResult;
   }
 };
 
 function run_test() {
   // Copy the data files into place
-  var testAB = do_get_file("mailnews/addrbook/test/unit/data/autocomplete.mab");
+  var testAB = do_get_file("../mailnews/addrbook/test/unit/data/autocomplete.mab");
 
   testAB.copyTo(gProfileDir, kPABData.fileName);
 
-  testAB = do_get_file("mailnews/addrbook/test/unit/data/cardForEmail.mab");
+  testAB = do_get_file("../mailnews/addrbook/test/unit/data/cardForEmail.mab");
 
   testAB.copyTo(gProfileDir, kCABData.fileName);
 
   // Test - Create a new search component
 
   var acs = Components.classes["@mozilla.org/autocomplete/search;1?name=addrbook"]
     .getService(Components.interfaces.nsIAutoCompleteSearch);
 
--- a/mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
+++ b/mailnews/addrbook/test/unit/test_nsAbAutoCompleteSearch2.js
@@ -4,17 +4,17 @@
  * a previous search.
  *
  * We run this test without address books, constructing manually ourselves,
  * so that we can ensure that we're not getting the data out of the address
  * books.
  */
 
 // We import this to allow us to reuse the code of the results object.
-do_import_script("mailnews/addrbook/src/nsAbAutoCompleteSearch.js");
+do_import_script("../mailnews/addrbook/src/nsAbAutoCompleteSearch.js");
 
 function createCard(chars, popularity) {
   var card = Components.classes["@mozilla.org/addressbook/cardproperty;1"]
                        .createInstance(Components.interfaces.nsIAbCard);
 
   card.firstName = "firstName".slice(0, chars);
   card.lastName = "lastName".slice(0, chars);
   card.displayName = "displayName".slice(0, chars);
--- a/mailnews/addrbook/test/unit/test_nsIAbCard.js
+++ b/mailnews/addrbook/test/unit/test_nsIAbCard.js
@@ -6,17 +6,17 @@
  * up all the parameters correctly. We'll have to extend them as we develop
  * the address book more, especially looking towards standards etc.
  */
 
 // Main function for the this test so we can check both personal and
 // collected books work correctly in an easy manner.
 function run_test() {
   // Test setup - copy the data file into place
-  var testAB = do_get_file("mailnews/addrbook/test/unit/data/cardForEmail.mab");
+  var testAB = do_get_file("../mailnews/addrbook/test/unit/data/cardForEmail.mab");
 
   // Copy the file to the profile directory for a PAB
   testAB.copyTo(gProfileDir, kPABData.fileName);
 
   // Test - Get the directory
   var abManager = Components.classes["@mozilla.org/abmanager;1"]
                             .getService(Components.interfaces.nsIAbManager);
 
--- a/mailnews/base/build/Makefile.in
+++ b/mailnews/base/build/Makefile.in
@@ -94,17 +94,17 @@ SHARED_LIBRARY_LIBS = \
 
 ifeq ($(USE_SHORT_LIBNAME),1)
 EXTRA_DSO_LIBS = msgbsutl
 else
 EXTRA_DSO_LIBS = msgbaseutil
 endif
 
 EXTRA_DSO_LDOPTS = \
-		$(DEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 		$(LIBS_DIR) \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_JS_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
 
 LOCAL_INCLUDES += -I$(srcdir) \
--- a/mailnews/base/test/unit/head_mailbase.js
+++ b/mailnews/base/test/unit/head_mailbase.js
@@ -1,3 +1,3 @@
 // Import the main scripts that mailnews tests need to set up and tear down
-do_import_script("mailnews/test/resources/mailDirService.js");
-do_import_script("mailnews/test/resources/mailTestUtils.js");
+do_import_script("../mailnews/test/resources/mailDirService.js");
+do_import_script("../mailnews/test/resources/mailTestUtils.js");
--- a/mailnews/base/test/unit/test_bug366491.js
+++ b/mailnews/base/test/unit/test_bug366491.js
@@ -118,13 +118,13 @@ var doTestingListener =
       do_test_finished();
   }
 };
 
 // helper functions
 
 function getSpec(aFileName)
 {
-  var file = do_get_file("mailnews/extensions/bayesian-spam-filter/test/resources/" + aFileName);
+  var file = do_get_file("../mailnews/extensions/bayesian-spam-filter/test/resources/" + aFileName);
   var uri = nsIIOService.newFileURI(file).QueryInterface(Ci.nsIURL);
   uri.query = "type=application/x-message-display";
   return uri.spec;
 }
--- a/mailnews/base/test/unit/test_bug428427.js
+++ b/mailnews/base/test/unit/test_bug428427.js
@@ -37,17 +37,17 @@
 // Test of message count changes in virtual folder views
 
 const copyService = Cc["@mozilla.org/messenger/messagecopyservice;1"]
                       .getService(Ci.nsIMsgCopyService);
 const tagService = Cc["@mozilla.org/messenger/tagservice;1"]
                      .getService(Ci.nsIMsgTagService);
 const dbviewContractId = "@mozilla.org/messenger/msgdbview;1?type=" + "quicksearch";
 const dbView = Cc[dbviewContractId].createInstance(Ci.nsIMsgDBView);
-const bugmail1 = do_get_file("mailnews/test/data/bugmail1");
+const bugmail1 = do_get_file("../mailnews/test/data/bugmail1");
 // I'm only loading msgDBService to help load symbols for debugging
 //const msgDBService = Cc["@mozilla.org/msgDatabase/msgDBService;1"]
 //                     .getService(Ci.nsIMsgDBService);
                      
 // main test
 
 // the headers for the test messages. All messages are identical, but
 // have different properties set on them.
--- a/mailnews/base/test/unit/test_nsIMsgFolderListenerLocal.js
+++ b/mailnews/base/test/unit/test_nsIMsgFolderListenerLocal.js
@@ -13,17 +13,17 @@
   * Currently tested:
   * - Copy messages from files into the db
   * - Moving and copying one or more messages from one local folder to another
   * - Moving folders, with and without subfolders
   * - Renaming folders
   * - Deleting messages and folders, to trash and from trash (permanently)
   */
 
-do_import_script("mailnews/base/test/resources/msgFolderListenerSetup.js");
+do_import_script("../mailnews/base/test/resources/msgFolderListenerSetup.js");
 
 // Globals
 var gMsgFile1, gMsgFile2, gMsgFile3;
 var gLocalFolder2;
 var gLocalFolder3;
 var gLocalTrashFolder;
 
 function copyFileMessage(file, destFolder, isDraftOrTemplate)
@@ -185,19 +185,19 @@ const gTestArray =
 function run_test()
 {
   // Add a listener.
   gMFNService.addListener(gMFListener);
 
   loadLocalMailAccount();
 
   // Load up some messages so that we can copy them in later.
-  gMsgFile1 = do_get_file("mailnews/test/data/bugmail10");
-  gMsgFile2 = do_get_file("mailnews/test/data/bugmail11");
-  gMsgFile3 = do_get_file("mailnews/test/data/draft1");
+  gMsgFile1 = do_get_file("../mailnews/test/data/bugmail10");
+  gMsgFile2 = do_get_file("../mailnews/test/data/bugmail11");
+  gMsgFile3 = do_get_file("../mailnews/test/data/draft1");
 
   // Create another folder to move and copy messages around, and force initialization.
   var rootFolder = gLocalIncomingServer.rootMsgFolder;
   gLocalFolder2 = rootFolder.addSubfolder("folder2");
   var folderName = gLocalFolder2.prettiestName;
 
   // Create a third folder for more testing.
   gLocalFolder3 = rootFolder.addSubfolder("folder3");
--- a/mailnews/base/test/unit/test_searchAddressInAb.js
+++ b/mailnews/base/test/unit/test_searchAddressInAb.js
@@ -31,20 +31,20 @@
  * 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 ***** */
 
 // Testing of to, cc, toorcc in addressbook search features added in bug 187768
 
-do_import_script("mailnews/test/resources/searchTestUtils.js");
+do_import_script("../mailnews/test/resources/searchTestUtils.js");
 
 // add address book setup
-do_import_script("mailnews/addrbook/test/resources/abSetup.js");
+do_import_script("../mailnews/addrbook/test/resources/abSetup.js");
 
 const ABUri = kPABData.URI;
 
 const copyService = Cc["@mozilla.org/messenger/messagecopyservice;1"].
                       getService(Ci.nsIMsgCopyService);
 
 const nsMsgSearchScope = Ci.nsMsgSearchScope;
 const nsMsgSearchAttrib = Ci.nsMsgSearchAttrib;
@@ -115,34 +115,34 @@ var Tests =
   { value: ABUri,
     attrib: CCopy,
     op: IsntInAB,
     count: 3 },
 ];
 
 var Files = 
 [
-  "mailnews/test/data/bugmail2",
-  "mailnews/test/data/bugmail3",
-  "mailnews/test/data/bugmail4",
-  "mailnews/test/data/bugmail5",
-  "mailnews/test/data/bugmail6",
-  "mailnews/test/data/bugmail7"
+  "../mailnews/test/data/bugmail2",
+  "../mailnews/test/data/bugmail3",
+  "../mailnews/test/data/bugmail4",
+  "../mailnews/test/data/bugmail5",
+  "../mailnews/test/data/bugmail6",
+  "../mailnews/test/data/bugmail7"
 ]
 
 var messageKey, hdr;
 
 function run_test()
 {
   // Setup local mail accounts.
 
   loadLocalMailAccount();
     
     // Test setup - copy the data file into place
-  var testAB = do_get_file("mailnews/addrbook/test/unit/data/cardForEmail.mab");
+  var testAB = do_get_file("../mailnews/addrbook/test/unit/data/cardForEmail.mab");
 
   // Copy the file to the profile directory for a PAB
   testAB.copyTo(gProfileDir, kPABData.fileName);
 
   // test that validity table terms are valid
 
   // offline mail table
   testValidityTable(offlineMail, IsInAB, Sender, true);
--- a/mailnews/base/test/unit/test_searchJunk.js
+++ b/mailnews/base/test/unit/test_searchJunk.js
@@ -31,17 +31,17 @@
  * 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 ***** */
 
 // Testing of search by junk percent and junk score origin
 
-do_import_script("mailnews/test/resources/searchTestUtils.js");
+do_import_script("../mailnews/test/resources/searchTestUtils.js");
 
 const copyService = Cc["@mozilla.org/messenger/messagecopyservice;1"]
                       .getService(Ci.nsIMsgCopyService);
 
 const nsMsgSearchScope = Ci.nsMsgSearchScope;
 const nsMsgSearchAttrib = Ci.nsMsgSearchAttrib;
 const nsMsgSearchOp = Ci.nsMsgSearchOp;
 
@@ -50,17 +50,17 @@ const IsLessThan = nsMsgSearchOp.IsLessT
 const Is = nsMsgSearchOp.Is;
 const Isnt = nsMsgSearchOp.Isnt;
 
 const offlineMail = nsMsgSearchScope.offlineMail;
 
 const JunkScoreOrigin = nsMsgSearchAttrib.JunkScoreOrigin;
 const JunkPercent = nsMsgSearchAttrib.JunkPercent;
 
-const fileName = "mailnews/test/data/bugmail1";
+const fileName = "../mailnews/test/data/bugmail1";
 
 /*
  * The search for junkpercent is defined as the effective value,
  * while the "junkpercent" database term is always the result
  * from the bayes filter. This is optimized to make views that
  * rely on junk percent search work with the best value for junk
  * percent, while allowing junk percent from the bayes filter
  * to be saved for analysis.
--- a/mailnews/base/test/unit/test_searchTag.js
+++ b/mailnews/base/test/unit/test_searchTag.js
@@ -36,17 +36,17 @@
 
 /*
  * Testing of tag search features.
  *
  * Specifically tests changes implemented in bug 217034
  * Does not do comprehensive testing.
  *
  */
-do_import_script("mailnews/test/resources/searchTestUtils.js");
+do_import_script("../mailnews/test/resources/searchTestUtils.js");
 
 const tagService = Cc["@mozilla.org/messenger/tagservice;1"]
                      .getService(Ci.nsIMsgTagService);
 const copyService = Cc["@mozilla.org/messenger/messagecopyservice;1"]
                       .getService(Ci.nsIMsgCopyService);
 
 const nsMsgSearchScope = Ci.nsMsgSearchScope;
 const nsMsgSearchAttrib = Ci.nsMsgSearchAttrib;
@@ -336,17 +336,17 @@ function run_test()
     OnStartCopy: function() {},
     OnProgress: function(aProgress, aProgressMax) {},
     SetMessageKey: function(aKey) { hdr = gLocalInboxFolder.GetMessageHeader(aKey);},
     SetMessageId: function(aMessageId) {},
     OnStopCopy: function(aStatus) { testKeywordSearch();}
   };
 
   // Get a message into the local filestore. function testKeywordSearch() continues the testing after the copy.
-  var bugmail1 = do_get_file("mailnews/test/data/bugmail1");
+  var bugmail1 = do_get_file("../mailnews/test/data/bugmail1");
   do_test_pending();
   copyService.CopyFileMessage(bugmail1, gLocalInboxFolder, null, false, 0,
                               copyListener, null);
 }
 
 // process each test from queue, calls itself upon completion of each search
 var testObject;
 function testKeywordSearch()
--- a/mailnews/base/util/Makefile.in
+++ b/mailnews/base/util/Makefile.in
@@ -117,17 +117,17 @@ EXPORTS		= \
 		nsMsgI18N.h \
 		nsImapMoveCoalescer.h \
 		$(NULL)
 
 ifndef MOZ_STATIC_MAIL_BUILD
 
 EXTRA_DSO_LDOPTS = \
 	$(LIBS_DIR) \
-	$(DEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+	$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 	$(MOZ_UNICHARUTIL_LIBS) \
 	$(MOZ_COMPONENT_LIBS) \
 	$(NULL)
 
 else
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 FORCE_STATIC_LIB = 1
--- a/mailnews/build/Makefile.in
+++ b/mailnews/build/Makefile.in
@@ -121,18 +121,18 @@ SHARED_LIBRARY_LIBS = \
 	        ../extensions/bayesian-spam-filter/src/$(LIB_PREFIX)bayesflt_s.$(LIB_SUFFIX) \
 	        ../extensions/mailviews/src/$(LIB_PREFIX)mailview_s.$(LIB_SUFFIX) \
                 ../extensions/mdn/src/$(LIB_PREFIX)msgmdn_s.$(LIB_SUFFIX) \
                 ../mime/cthandlers/vcard/$(LIB_PREFIX)vcard_s.$(LIB_SUFFIX) \
                 ../mime/cthandlers/glue/$(LIB_PREFIX)mimecthglue_s.$(LIB_SUFFIX) \
                 $(NULL)
 
 EXTRA_DSO_LDOPTS = \
-		$(DEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
-		$(DEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
+		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+		$(MOZDEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
 		$(MOZ_JS_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 EXTRA_DSO_LDOPTS += \
   $(TK_LIBS) \
--- a/mailnews/compose/build/Makefile.in
+++ b/mailnews/compose/build/Makefile.in
@@ -97,13 +97,13 @@ EXTRA_DSO_LDOPTS = \
 		$(MOZ_JS_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
 
 ifneq (,$(filter cocoa mac, $(MOZ_WIDGET_TOOLKIT)))
 EXTRA_DSO_LDOPTS += $(TK_LIBS)
 SHARED_LIBRARY_LIBS += \
-		$(DEPTH)/xpcom/MoreFiles/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
+		$(MOZDEPTH)/xpcom/MoreFiles/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/mailnews/compose/test/unit/head_compose.js
+++ b/mailnews/compose/test/unit/head_compose.js
@@ -1,15 +1,15 @@
 // Import the main scripts that mailnews tests need to set up and tear down
-do_import_script("mailnews/test/resources/mailDirService.js");
-do_import_script("mailnews/test/resources/mailTestUtils.js");
+do_import_script("../mailnews/test/resources/mailDirService.js");
+do_import_script("../mailnews/test/resources/mailTestUtils.js");
 
 // Import the smtp server scripts
-do_import_script("mailnews/test/fakeserver/maild.js")
-do_import_script("mailnews/test/fakeserver/smtpd.js")
+do_import_script("../mailnews/test/fakeserver/maild.js")
+do_import_script("../mailnews/test/fakeserver/smtpd.js")
 
 const SMTP_PORT = 1024+120;
 
 // Setup the daemon and server
 function setupServerDaemon() {
   var daemon = new smtpDaemon();
   var handler = new SMTP_RFC2822_handler(daemon);
   var server = new nsMailServer(handler);
--- a/mailnews/compose/test/unit/test_nsMsgCompose1.js
+++ b/mailnews/compose/test/unit/test_nsMsgCompose1.js
@@ -1,15 +1,15 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /*
  * Test suite for nsMsgCompose functions relating to listeners.
  */
 
 // We need the address book details for this test
-do_import_script("mailnews/addrbook/test/resources/abSetup.js");
+do_import_script("../mailnews/addrbook/test/resources/abSetup.js");
 
 const MsgComposeContractID = "@mozilla.org/messengercompose/compose;1";
 const MsgComposeParamsContractID = "@mozilla.org/messengercompose/composeparams;1";
 const MsgComposeFieldsContractID = "@mozilla.org/messengercompose/composefields;1";
 const nsIMsgCompose = Components.interfaces.nsIMsgCompose;
 const nsIMsgComposeParams = Components.interfaces.nsIMsgComposeParams;
 const nsIMsgCompFields = Components.interfaces.nsIMsgCompFields;
 const nsIAbPreferMailFormat = Components.interfaces.nsIAbPreferMailFormat;
@@ -41,22 +41,22 @@ function checkPopulate(aTo, aNonHTMLReci
 
   do_check_eq(fields.to, aCheckTo);
 
   do_check_eq(nonHTMLRecipients.value, aNonHTMLRecipients);
 }
 
 function run_test() {
   // Test setup - copy the data files into place
-  var testAB = do_get_file("mailnews/addrbook/test/resources/abLists1.mab");
+  var testAB = do_get_file("../mailnews/addrbook/test/resources/abLists1.mab");
 
   // Copy the file to the profile directory for a PAB
   testAB.copyTo(gProfileDir, kPABData.fileName);
 
-  testAB = do_get_file("mailnews/addrbook/test/resources/abLists2.mab");
+  testAB = do_get_file("../mailnews/addrbook/test/resources/abLists2.mab");
 
   // Copy the file to the profile directory for a CAB
   testAB.copyTo(gProfileDir, kCABData.fileName);
 
   // Test - Check we can initalize with fewest specified
   // parameters and don't fail/crash like we did in bug 411646.
 
   var msgCompose = Components.classes[MsgComposeContractID]
--- a/mailnews/compose/test/unit/test_sendMailMessage.js
+++ b/mailnews/compose/test/unit/test_sendMailMessage.js
@@ -12,17 +12,17 @@ var server;
 
 const kSender = "from@invalid.com";
 const kTo = "to@invalid.com";
 
 function test_RFC2822() {
   type = "RFC 2822";
 
   // Test file
-  var testFile = do_get_file("mailnews/compose/test/unit/data/message1.eml");
+  var testFile = do_get_file("../mailnews/compose/test/unit/data/message1.eml");
 
   // Ensure we have at least one mail account
   loadLocalMailAccount();
 
   var smtpServer = getBasicSmtpServer();
   var identity = getSmtpIdentity(kSender, smtpServer);
 
   var smtpService = Cc["@mozilla.org/messengercompose/smtp;1"]
--- a/mailnews/db/msgdb/test/unit/head_maildb.js
+++ b/mailnews/db/msgdb/test/unit/head_maildb.js
@@ -1,2 +1,2 @@
 // Import the main scripts that mailnews tests need to set up and tear down
-do_import_script("mailnews/test/resources/mailDirService.js");
+do_import_script("../mailnews/test/resources/mailDirService.js");
--- a/mailnews/db/msgdb/test/unit/test_maildb.js
+++ b/mailnews/db/msgdb/test/unit/test_maildb.js
@@ -1,14 +1,14 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /*
  * Test suite for msg database functions.
  */
 
-do_import_script("mailnews/test/resources/mailTestUtils.js");
+do_import_script("../mailnews/test/resources/mailTestUtils.js");
 
 function run_test() {
   loadLocalMailAccount();
   // Get the root folder
   var root = gLocalIncomingServer.rootFolder;
 
   root.createSubfolder("dbTest", null);
   var dbService = Components.classes["@mozilla.org/msgDatabase/msgDBService;1"]
--- a/mailnews/extensions/bayesian-spam-filter/test/unit/head_bayes.js
+++ b/mailnews/extensions/bayesian-spam-filter/test/unit/head_bayes.js
@@ -1,3 +1,3 @@
 // Import the main scripts that mailnews tests need to set up and tear down
-do_import_script("mailnews/test/resources/mailDirService.js");
-do_import_script("mailnews/test/resources/mailTestUtils.js");
+do_import_script("../mailnews/test/resources/mailDirService.js");
+do_import_script("../mailnews/test/resources/mailTestUtils.js");
--- a/mailnews/extensions/bayesian-spam-filter/test/unit/test_bug228675.js
+++ b/mailnews/extensions/bayesian-spam-filter/test/unit/test_bug228675.js
@@ -33,17 +33,17 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 // tests reduction in size of training.dat
 
 // main setup
 
-do_import_script("mailnews/extensions/bayesian-spam-filter/test/resources/trainingfile.js");
+do_import_script("../mailnews/extensions/bayesian-spam-filter/test/resources/trainingfile.js");
 
 const nsIPrefBranch = Cc["@mozilla.org/preferences-service;1"]
                         .getService(Ci.nsIPrefBranch);
 
 // before shrink, the trained messages have 84 tokens. Force shrink.
 nsIPrefBranch.setIntPref("mailnews.bayesian_spam_filter.junk_maxtokens", 83);
 
 const nsIJunkMailPlugin = Cc["@mozilla.org/messenger/filter-plugin;1?name=bayesianfilter"]
@@ -147,13 +147,13 @@ function checkToken(aToken, aGoodCount, 
   if (!goodCount) goodCount = 0;
   if (!junkCount) junkCount = 0;
   do_check_eq(goodCount, aGoodCount);
   do_check_eq(junkCount, aJunkCount);
 }
 
 function getSpec(aFileName)
 {
-  var file = do_get_file("mailnews/extensions/bayesian-spam-filter/test/resources/" + aFileName);
+  var file = do_get_file("../mailnews/extensions/bayesian-spam-filter/test/resources/" + aFileName);
   var uri = nsIIOService.newFileURI(file).QueryInterface(Ci.nsIURL);
   uri.query = "type=application/x-message-display";
   return uri.spec;
 }
--- a/mailnews/imap/build/Makefile.in
+++ b/mailnews/imap/build/Makefile.in
@@ -80,16 +80,16 @@ endif
 CPPSRCS		= nsImapFactory.cpp
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)msgimap_s.$(LIB_SUFFIX) \
 		$(NULL)
 
 EXTRA_DSO_LDOPTS = \
 		$(LIBS_DIR) \
-		$(DEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/mailnews/imap/test/Makefile.in
+++ b/mailnews/imap/test/Makefile.in
@@ -70,17 +70,17 @@ SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_S
 
 include $(topsrcdir)/config/config.mk
 
 #XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES = \
-		-I$(topsrcdir)/xpcom/tests \
+		-I$(MOZILLA_SRCDIR)/xpcom/tests \
 		-I$(topsrcdir)/mailnews/base/util \
 		-I$(srcdir)/../src \
 		$(NULL)
 
 ifndef MOZILLA_INTERNAL_API
 LIBS += $(XPCOM_GLUE_LDOPTS)
 endif
 
--- a/mailnews/import/build/Makefile.in
+++ b/mailnews/import/build/Makefile.in
@@ -125,17 +125,17 @@ else
 EXTRA_DSO_LIBS = msgbaseutil
 endif # ifeq
 endif # MOZ_STATIC_MAIL_BUILD
 
 EXTRA_DSO_LDOPTS += \
 	$(LIBS_DIR) \
 	$(EXTRA_DSO_LIBS) \
 	$(MOZ_UNICHARUTIL_LIBS) \
-	$(DEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
+	$(MOZDEPTH)/modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
 	$(MOZ_COMPONENT_LIBS) \
 	$(NULL)
 
 ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
 EXTRA_DSO_LDOPTS += -framework Cocoa  \
 										$(TK_LIBS) \
 										$(NULL)
 endif
--- a/mailnews/import/test/unit/head_import.js
+++ b/mailnews/import/test/unit/head_import.js
@@ -1,4 +1,4 @@
 // Set up the profile directory for verifying the success of imports
-do_import_script("mailnews/test/resources/mailDirService.js");
+do_import_script("../mailnews/test/resources/mailDirService.js");
 // Import the script with basic import functions
-do_import_script("mailnews/import/test/resources/import_helper.js");
+do_import_script("../mailnews/import/test/resources/import_helper.js");
--- a/mailnews/import/test/unit/test_bug_437556.js
+++ b/mailnews/import/test/unit/test_bug_437556.js
@@ -1,15 +1,15 @@
 /**
  * Test for a regression of bug 437556: mailnews crashes while importing an 
  * address book if a field map is required but not set
  */
 function run_test()
 {
-  var file = do_get_file("mailnews/import/test/resources/basic_addressbook.csv");
+  var file = do_get_file("../mailnews/import/test/resources/basic_addressbook.csv");
   var errorStr = Cc["@mozilla.org/supports-string;1"]
                      .createInstance(Ci.nsISupportsString);
   // get the text Address Book import interface and make sure it succeeded
   var abInterface = getImportInterface("addressbook", ".csv");
   do_check_neq(abInterface, null);
   abInterface.SetData("addressLocation", file);
   do_check_true(abInterface.WantsProgress());
 
--- a/mailnews/local/build/Makefile.in
+++ b/mailnews/local/build/Makefile.in
@@ -79,17 +79,17 @@ endif
 CPPSRCS		= nsMsgLocalFactory.cpp
 
 SHARED_LIBRARY_LIBS = \
 		../src/$(LIB_PREFIX)msglocal_s.$(LIB_SUFFIX) \
 		$(NULL)
 
 EXTRA_DSO_LDOPTS = \
 		$(LIBS_DIR) \
-		$(DEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef MOZ_MOVEMAIL
--- a/mailnews/local/test/unit/head_maillocal.js
+++ b/mailnews/local/test/unit/head_maillocal.js
@@ -1,15 +1,15 @@
 // Import the main scripts that mailnews tests need to set up and tear down
-do_import_script("mailnews/test/resources/mailDirService.js");
-do_import_script("mailnews/test/resources/mailTestUtils.js");
+do_import_script("../mailnews/test/resources/mailDirService.js");
+do_import_script("../mailnews/test/resources/mailTestUtils.js");
 
 // Import the pop3 server scripts
-do_import_script("mailnews/test/fakeserver/maild.js")
-do_import_script("mailnews/test/fakeserver/pop3d.js")
+do_import_script("../mailnews/test/fakeserver/maild.js")
+do_import_script("../mailnews/test/fakeserver/pop3d.js")
 
 const POP3_PORT = 1024+110;
 
 // Setup the daemon and server
 function setupServerDaemon() {
   var daemon = new pop3Daemon();
   var handler = new POP3_RFC1939_handler(daemon);
   var server = new nsMailServer(handler);
--- a/mailnews/news/build/Makefile.in
+++ b/mailnews/news/build/Makefile.in
@@ -82,17 +82,17 @@ ifeq ($(USE_SHORT_LIBNAME),1)
 EXTRA_DSO_LIBS += msgbsutl
 else
 EXTRA_DSO_LIBS += msgbaseutil
 endif
 
 EXTRA_DSO_LDOPTS = \
 		-L$(DIST)/bin \
 		-L$(DIST)/lib \
-		$(DEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
+		$(MOZDEPTH)/rdf/util/src/internal/$(LIB_PREFIX)rdfutil_s.$(LIB_SUFFIX) \
 		$(EXTRA_DSO_LIBS) \
 		$(MOZ_JS_LIBS) \
 		$(MOZ_COMPONENT_LIBS) \
 		$(MOZ_UNICHARUTIL_LIBS) \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/mailnews/news/test/unit/head_server_setup.js
+++ b/mailnews/news/test/unit/head_server_setup.js
@@ -1,14 +1,14 @@
 // Import the servers
-do_import_script("mailnews/test/fakeserver/maild.js")
-do_import_script("mailnews/test/fakeserver/nntpd.js")
+do_import_script("../mailnews/test/fakeserver/maild.js")
+do_import_script("../mailnews/test/fakeserver/nntpd.js")
 
 // Generic mailnews resource scripts
-do_import_script("mailnews/test/resources/mailDirService.js")
+do_import_script("../mailnews/test/resources/mailDirService.js")
 
 // The groups to set up on the fake server.
 // It is an array of tuples, where the first element is the group name and the
 // second element is whether or not we should subscribe to it.
 var groups = [
   ["test.empty", false],
   ["test.subscribe.empty", true],
   ["test.subscribe.simple", true]
--- a/mailnews/news/test/unit/test_server.js
+++ b/mailnews/news/test/unit/test_server.js
@@ -96,17 +96,17 @@ function testRFC977() {
     server.performTest();
     transaction = server.playTransaction();
     do_check_transaction(transaction, ["MODE READER",
         "LISTGROUP test.subscribe.empty"]);*/
 
     // Test - posting
     test = "news with post";
     server.resetTest();
-    var url = create_post(prefix, "mailnews/news/test/postings/post1.eml");
+    var url = create_post(prefix, "../mailnews/news/test/postings/post1.eml");
     setupProtocolTest(NNTP_PORT, url);
     server.performTest();
     transaction = server.playTransaction();
     do_check_transaction(transaction, ["MODE READER", "POST"]);
   } catch (e) {
     dump("NNTP Protocol test "+test+" failed for type RFC 977:\n");
     try {
       var trans = server.playTransaction();
--- a/mailnews/test/fakeserver/pop3d.js
+++ b/mailnews/test/fakeserver/pop3d.js
@@ -1,13 +1,13 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 // This file implements test POP3 servers
 
 function readFile(fileName) {
-  var file = do_get_file("mailnews/local/test/unit/data/" + fileName);
+  var file = do_get_file("../mailnews/local/test/unit/data/" + fileName);
 
   // If these fail, there is a problem with the test
   do_check_neq(file, null);
   do_check_true(file.exists());
 
   var ioService = Cc["@mozilla.org/network/io-service;1"]
                     .getService(Ci.nsIIOService);