Bug 505525 again this time resolving a circular logic dependency by duplicating the logic in the Makefiles rather than using app-config.mk r=mcsmurf
--- a/suite/app-config.mk
+++ b/suite/app-config.mk
@@ -33,24 +33,16 @@
# 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 *****
MOZ_SUITE = 1
DEFINES += -DMOZ_SUITE=1
-# On trunk we need to link the windows shell service into seamonkey.exe
-ifdef BUILD_STATIC_LIBS
-ifndef MOZILLA_1_9_1_BRANCH
-BUILD_STATIC_SHELL = 1
-DEFINES += -DBUILD_STATIC_SHELL=1
-endif
-endif
-
# Make the whole tree rebuild if app-config.mk changes
# Use MOZ_BUILD_APP to make life easy
ifeq (,$(wildcard $(topsrcdir)/$(MOZ_BUILD_APP)/app-config.mk))
#Fail if normal means of finding app-config.mk does not work
$(error Somehow we got included but we can't find ourselves...)
else
GLOBAL_DEPS += $(topsrcdir)/$(MOZ_BUILD_APP)/app-config.mk
endif
--- a/suite/build/Makefile.in
+++ b/suite/build/Makefile.in
@@ -97,16 +97,24 @@ EXTRA_DSO_LDOPTS += \
$(EXTRA_DSO_LIBS) \
$(call EXPAND_LIBNAME_PATH,unicharutil_external_s,$(LIBXUL_DIST)/lib) \
$(LIBXUL_DIST)/../modules/libreg/src/$(LIB_PREFIX)mozreg_s.$(LIB_SUFFIX) \
$(MOZ_JS_LIBS) \
$(XPCOM_GLUE_LDOPTS) \
$(MOZ_COMPONENT_LIBS) \
$(NULL)
+# On trunk we need to link the windows shell service into seamonkey.exe
+ifdef BUILD_STATIC_LIBS
+ifndef MOZILLA_1_9_1_BRANCH
+BUILD_STATIC_SHELL = 1
+DEFINES += -DBUILD_STATIC_SHELL=1
+endif
+endif
+
ifndef BUILD_STATIC_SHELL
ifeq ($(OS_ARCH),WINNT)
SHARED_LIBRARY_LIBS += ../shell/src/$(LIB_PREFIX)shellservice_s.$(LIB_SUFFIX)
ifeq (,$(MOZ_ENABLE_LIBXUL)$(MOZILLA_1_9_1_BRANCH))
EXTRA_DSO_LDOPTS += $(LIBXUL_DIST)/lib/$(LIB_PREFIX)thebes.$(LIB_SUFFIX)
endif
endif
endif
--- a/suite/shell/src/Makefile.in
+++ b/suite/shell/src/Makefile.in
@@ -26,16 +26,25 @@ REQUIRES = \
ifeq ($(OS_ARCH),WINNT)
CPPSRCS = nsWindowsShellService.cpp
OS_LIBS += $(call EXPAND_LIBNAME,ole32 version uuid shell32)
EXTRA_COMPONENTS = nsSetDefault.js
endif
+# On trunk we need to link the windows shell service into seamonkey.exe
+# We need to do this before we include config.mk and thus app-config.mk
+ifdef BUILD_STATIC_LIBS
+ifndef MOZILLA_1_9_1_BRANCH
+BUILD_STATIC_SHELL = 1
+DEFINES += -DBUILD_STATIC_SHELL=1
+endif
+endif
+
ifdef CPPSRCS
LIBRARY_NAME = shellservice_s
ifdef BUILD_STATIC_SHELL
MOZILLA_INTERNAL_API = 1
EXPORT_LIBRARY = 1
IS_COMPONENT = 1
MODULE_NAME = nsSuiteShellModule
endif