From 80771124175ca90554aee08146ac0e30adbafa09 Mon Sep 17 00:00:00 2001 From: "dougt%meer.net" Date: Sun, 24 Jul 2005 03:41:38 +0000 Subject: [PATCH] Fixing makefile so that snav builds in the static build system. r=bsmedberg. npodb. git-svn-id: svn://10.0.0.236/trunk@176494 18797224-902f-48f8-a5cc-f745e15eee43 --- .../extensions/spatialnavigation/Makefile.in | 3 ++ .../spatialnavigation/src/Makefile.in | 45 +++++++++++++++---- .../src/nsSpatialNavigationService.cpp | 2 +- 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/mozilla/extensions/spatialnavigation/Makefile.in b/mozilla/extensions/spatialnavigation/Makefile.in index 1f3d14f489e..9a8a136a97a 100755 --- a/mozilla/extensions/spatialnavigation/Makefile.in +++ b/mozilla/extensions/spatialnavigation/Makefile.in @@ -47,6 +47,9 @@ ifdef MOZ_XUL_APP XPI_NAME = snav INSTALL_EXTENSION_ID = spatial-navigation@extensions.mozilla.org DIST_FILES = install.rdf +NO_JAR_AUTO_REG = 1 +USE_EXTENSION_MANIFEST = 1 +XPI_PKGNAME = snav-$(MOZ_APP_VERSION) # We should really pull FIREFOX_VERSION and THUNDERBIRD_VERSION from # browser/config/version.txt mail/config/version.txt but we can't be assured diff --git a/mozilla/extensions/spatialnavigation/src/Makefile.in b/mozilla/extensions/spatialnavigation/src/Makefile.in index 948dd6ec616..8c2e594cf90 100755 --- a/mozilla/extensions/spatialnavigation/src/Makefile.in +++ b/mozilla/extensions/spatialnavigation/src/Makefile.in @@ -43,17 +43,25 @@ VPATH=@srcdir@ include $(DEPTH)/config/autoconf.mk MODULE = snav -MODULE_NAME = snav LIBRARY_NAME = snav - -MOZILLA_INTERNAL_API = 1 -FORCE_SHARED_LIB = 1 IS_COMPONENT = 1 +MOZILLA_INTERNAL_API = 1 + ifdef MOZ_XUL_APP -XPI_NAME = snav +XPI_NAME = snav endif +# We should really pull FIREFOX_VERSION and THUNDERBIRD_VERSION from +# # browser/config/version.txt mail/config/version.txt but we can't be assured +# # that we've even pulled those files. So we hardcode them. + +XULAPP_DEFINES = \ + -DFIREFOX_VERSION=1.0+ \ + -DTHUNDERBIRD_VERSION=1.0+ \ + -DMOZILLA_VERSION_U=$(MOZILLA_VERSION) \ + $(NULL) + REQUIRES = xpcom \ string \ pref \ @@ -67,19 +75,32 @@ REQUIRES = xpcom \ locale \ necko \ docshell \ + unicharutil \ view \ webshell \ windowwatcher \ webbrwsr \ $(NULL) -CPPSRCS= \ - nsSpatialNavigation.cpp \ +CPPSRCS = nsSpatialNavigation.cpp \ nsSpatialNavigationUtils.cpp \ nsSpatialNavigationService.cpp \ $(NULL) -EXTRA_DSO_LIBS = gkgfx + +# This is just terrible... we need nsRect to be able to +# interact with the layout. However, we can't link to get +# this class in GFX in a static build (GFX is linked into +# the application and symbols are not expored from +# applications). +# +# nsFont.cpp is required because one of our #includes brings +# in nsFont.h. This class requires nsFont::Equals() be +# defined. We do not use this class anywhere in this +# extension. + +DEFINES += -D_IMPL_NS_GFX +CPPSRCS += nsRect.cpp nsFont.cpp EXTRA_DSO_LDOPTS += $(LIBS_DIR) \ $(EXTRA_DSO_LIBS) \ @@ -96,3 +117,11 @@ endif endif include $(topsrcdir)/config/rules.mk + +# Copy the nsRect and nsFont source files here and make sure +# they can be clobbered. +export:: + $(NSINSTALL) $(topsrcdir)/gfx/src/nsRect.cpp . + $(NSINSTALL) $(topsrcdir)/gfx/src/nsFont.cpp . + +GARBAGE += nsRect.cpp nsFont.cpp diff --git a/mozilla/extensions/spatialnavigation/src/nsSpatialNavigationService.cpp b/mozilla/extensions/spatialnavigation/src/nsSpatialNavigationService.cpp index 026c2b0a1a6..10083ac2128 100755 --- a/mozilla/extensions/spatialnavigation/src/nsSpatialNavigationService.cpp +++ b/mozilla/extensions/spatialnavigation/src/nsSpatialNavigationService.cpp @@ -252,7 +252,7 @@ static NS_METHOD SpatialNavigationServiceUnregistration(nsIComponentManager *aCo NS_GENERIC_FACTORY_CONSTRUCTOR(nsSpatialNavigationService) - static const nsModuleComponentInfo components[] = +static const nsModuleComponentInfo components[] = { { "SpatialNavigationService", SpatialNavigationService_CID,