bug 533542 - don't build readstrings.cpp in source dir r=ted
authorBrad Lassey <blassey@mozilla.com>
Tue, 12 Jan 2010 10:47:04 -0500
changeset 37106 e0fae6222746a460a5ba26ce3603786e8b84a9df
parent 37105 16e05af6610d5d6546053f927f0fab0dd69a5fa8
child 37107 e63c419af6673cdb7617be014b0da4b6c1890772
push idunknown
push userunknown
push dateunknown
reviewersted
bugs533542
milestone1.9.3a1pre
bug 533542 - don't build readstrings.cpp in source dir r=ted
toolkit/mozapps/Makefile.in
toolkit/mozapps/installer/wince/Makefile.in
toolkit/mozapps/installer/wince/uninstall/Makefile.in
toolkit/mozapps/readstrings/Makefile.in
toolkit/mozapps/readstrings/errors.h
toolkit/mozapps/readstrings/readstrings.cpp
toolkit/mozapps/readstrings/readstrings.h
toolkit/mozapps/update/src/Makefile.in
toolkit/mozapps/update/src/updater/Makefile.in
toolkit/mozapps/update/src/updater/errors.h
toolkit/mozapps/update/src/updater/readstrings.cpp
toolkit/mozapps/update/src/updater/readstrings.h
toolkit/mozapps/update/test/Makefile.in
toolkit/mozapps/update/test/TestAUSReadStrings.cpp
--- a/toolkit/mozapps/Makefile.in
+++ b/toolkit/mozapps/Makefile.in
@@ -50,13 +50,14 @@ PARALLEL_DIRS = \
   plugins \
   shared \
   update \
   xpinstall \
   $(NULL)
  
 ifeq ($(OS_ARCH),WINCE)
 ifdef WINCE_WINDOWS_MOBILE
+DIRS += readstrings
 DIRS += installer/wince
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/installer/wince/Makefile.in
+++ b/toolkit/mozapps/installer/wince/Makefile.in
@@ -50,26 +50,27 @@ PROGRAM   = xulrunner-stub-installer.sfx
 REQUIRES  = lib7z
 
 CPPSRCS = \
 	nsInstaller.cpp \
 	nsInstallerDlg.cpp \
 	nsArchiveExtractor.cpp \
 	ns7zipExtractor.cpp \
 	nsSetupStrings.cpp \
-	$(srcdir)/../../update/src/updater/readstrings.cpp \
 	$(NULL)
 
-LOCAL_INCLUDES += -I$(srcdir)/../../update/src/updater
+LOCAL_INCLUDES += -I$(srcdir)/../../readstrings
 
 RCINCLUDE = nsInstallerppc.rc
 
 DEFINES += -D_UNICODE
 
-LIBS += $(DIST)/lib/7z.lib
+LIBS += $(DEPTH)/toolkit/mozapps/readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX) \
+  $(DIST)/lib/7z.lib \
+  $(NULL)
 
 OS_LIBS += aygshell.lib commctrl.lib note_prj.lib oleaut32.lib ole32.lib libcmt.lib coredll.lib corelibc.lib
 
 WIN32_EXE_LDFLAGS += -ENTRY:WinMain
 
 DIRS += uninstall
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/installer/wince/uninstall/Makefile.in
+++ b/toolkit/mozapps/installer/wince/uninstall/Makefile.in
@@ -42,20 +42,21 @@ VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 PROGRAM   = uninstall$(BIN_SUFFIX)
 
 CPPSRCS = \
 	Uninstall.cpp \
 	../nsSetupStrings.cpp \
-	$(srcdir)/../../../update/src/updater/readstrings.cpp \
 	$(NULL)
 
-LOCAL_INCLUDES += -I$(srcdir)/.. -I$(srcdir)/../../../update/src/updater
+LIBS += $(DEPTH)/toolkit/mozapps/readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX)
+
+LOCAL_INCLUDES += -I$(srcdir)/.. -I$(srcdir)/../../../readstrings
 
 # Statically link the CRT when possible
 USE_STATIC_LIBS = 1
 
 WIN32_EXE_LDFLAGS += -ENTRY:WinMain
 
 include $(topsrcdir)/config/rules.mk
 
new file mode 100644
--- /dev/null
+++ b/toolkit/mozapps/readstrings/Makefile.in
@@ -0,0 +1,53 @@
+# ***** 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 Mozilla readstrings
+#
+# The Initial Developer of the Original Code is The Mozilla Foundation.
+#
+# Portions created by the Initial Developer are Copyright (C) 2009
+# the Mozilla Foundation <http://www.mozilla.org/>. All Rights Reserved.
+#
+# Contributor(s): 
+#   Brad Lassey <blassey@mozilla.com> (original author)
+#
+# 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@
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE  = readstrings
+LIBRARY_NAME = readstrings
+FORCE_STATIC_LIB = 1
+export NO_SHUNT = 1
+USE_STATIC_LIBS = 1
+
+CPPSRCS = readstrings.cpp
+
+include $(topsrcdir)/config/rules.mk
rename from toolkit/mozapps/update/src/updater/errors.h
rename to toolkit/mozapps/readstrings/errors.h
rename from toolkit/mozapps/update/src/updater/readstrings.cpp
rename to toolkit/mozapps/readstrings/readstrings.cpp
rename from toolkit/mozapps/update/src/updater/readstrings.h
rename to toolkit/mozapps/readstrings/readstrings.h
--- a/toolkit/mozapps/update/src/Makefile.in
+++ b/toolkit/mozapps/update/src/Makefile.in
@@ -42,17 +42,19 @@ VPATH   = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = update
 
 EXTRA_PP_COMPONENTS = nsUpdateTimerManager.js
 
 ifdef MOZ_UPDATER
-DIRS = updater
+DIRS = ../../readstrings \
+  updater \
+  $(NULL)
 
 EXTRA_PP_COMPONENTS += nsUpdateServiceStub.js
 
 EXTRA_COMPONENTS = nsUpdateService.js
 GARBAGE += nsUpdateService.js
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/update/src/updater/Makefile.in
+++ b/toolkit/mozapps/update/src/updater/Makefile.in
@@ -43,24 +43,25 @@ srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 CPPSRCS = \
 	updater.cpp \
 	bspatch.cpp \
 	archivereader.cpp \
-	readstrings.cpp \
 	$(NULL)
 
 PROGRAM = updater$(BIN_SUFFIX)
 
+LOCAL_INCLUDES += -I$(srcdir)/../../../readstrings
 
 LIBS += \
 	$(DEPTH)/modules/libmar/src/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
+	../../../readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX) \
 	$(BZ2_LIBS) \
 	$(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 HAVE_PROGRESSUI = 1
 RCINCLUDE = updater.rc
 CPPSRCS += \
--- a/toolkit/mozapps/update/test/Makefile.in
+++ b/toolkit/mozapps/update/test/Makefile.in
@@ -70,17 +70,17 @@ LOCAL_INCLUDES += \
 MOZ_WINCONSOLE = 1
 
 DEFINES += \
   -DAB_CD=$(AB_CD) \
   -DNS_NO_XPCOM \
   $(NULL)
 
 LIBS += \
-  $(DEPTH)/toolkit/mozapps/update/src/updater/readstrings.$(OBJ_SUFFIX) \
+  ../../readstrings/$(LIB_PREFIX)readstrings.$(LIB_SUFFIX) \
   $(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
 USE_STATIC_LIBS = 1
 DEFINES += -DUNICODE -D_UNICODE
 endif
 
 ifeq ($(OS_ARCH),WINCE)
--- a/toolkit/mozapps/update/test/TestAUSReadStrings.cpp
+++ b/toolkit/mozapps/update/test/TestAUSReadStrings.cpp
@@ -60,18 +60,18 @@
 #endif
 
 #include <stdio.h>
 #include <stdarg.h>
 #include <string.h>
 
 #include "updater/resource.h"
 #include "updater/progressui.h"
-#include "updater/readstrings.h"
-#include "updater/errors.h"
+#include "../../readstrings/readstrings.h"
+#include "../../readstrings/errors.h"
 
 #ifndef MAXPATHLEN
 # ifdef PATH_MAX
 #  define MAXPATHLEN PATH_MAX
 # elif defined(MAX_PATH)
 #  define MAXPATHLEN MAX_PATH
 # elif defined(_MAX_PATH)
 #  define MAXPATHLEN _MAX_PATH