Allow multiple toolkits to be installed in a build by marking the non-default toolkits as "inactive" and placing them in a separate components dir.

Bug #91829 r=jag
This commit is contained in:
seawood%netscape.com 2001-11-06 09:45:23 +00:00
Родитель 11fdaed945
Коммит 041f9404af
10 изменённых файлов: 68 добавлений и 66 удалений

Просмотреть файл

@ -384,6 +384,17 @@ ifdef IS_COMPONENT
EXTRA_DSO_LDOPTS += $(MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS)
endif # IS_COMPONENT
#
# Allow components to be installed into a secondary path
# that is not searched by xpcom.
ifndef COMPONENTS_PATH
ifdef INACTIVE_COMPONENT
COMPONENTS_PATH = components_inactive
else
COMPONENTS_PATH = components
endif
endif
#
# MacOS X specific stuff
#
@ -574,7 +585,7 @@ ifeq ($(OS_ARCH),OS2)
$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib
else
ifdef IS_COMPONENT
$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib/components
$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib/$(COMPONENTS_PATH)
else
$(INSTALL) $(IFLAGS1) $(LIBRARY) $(DIST)/lib
endif
@ -587,13 +598,13 @@ endif
ifdef SHARED_LIBRARY
ifdef IS_COMPONENT
ifeq ($(OS_ARCH),OS2)
$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib/components
$(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib/$(COMPONENTS_PATH)
else
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib/components
$(ELF_DYNSTR_GC) $(DIST)/lib/components/$(SHARED_LIBRARY)
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib/$(COMPONENTS_PATH)
$(ELF_DYNSTR_GC) $(DIST)/lib/$(COMPONENTS_PATH)/$(SHARED_LIBRARY)
endif
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/bin/components
$(ELF_DYNSTR_GC) $(DIST)/bin/components/$(SHARED_LIBRARY)
$(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/bin/$(COMPONENTS_PATH)
$(ELF_DYNSTR_GC) $(DIST)/bin/$(COMPONENTS_PATH)/$(SHARED_LIBRARY)
ifdef BEOS_ADDON_WORKAROUND
( cd $(DIST)/bin/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
endif
@ -1274,7 +1285,7 @@ $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt: $(patsubst %.idl,$(XPIDL_GEN_DIR)/%.xpt,$(
$(XPIDL_LINK) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $^
install:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
$(INSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DIST)/bin/components
$(INSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DIST)/bin/$(COMPONENTS_PATH)
endif

Просмотреть файл

@ -63,6 +63,11 @@ CPPSRCS = \
nsPrintOptionsGTK.cpp \
$(NULL)
# If not primary toolkit, install in secondary path
ifneq (gtk,$(MOZ_GFX_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += $(MOZ_GTK_LDFLAGS)
@ -99,7 +104,7 @@ ifdef MOZ_ENABLE_XPRINT
DEFINES += -DUSE_XPRINT
endif
INCLUDES += \
LOCAL_INCLUDES = \
-I$(srcdir)/. \
-I$(srcdir)/.. \
$(NULL)

Просмотреть файл

@ -64,6 +64,11 @@ CPPSRCS = \
nsScreenQT.cpp \
$(NULL)
# If not primary toolkit, install in secondary path
ifneq (qt,$(MOZ_GFX_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += $(MOZ_QT_LDFLAGS)
@ -90,7 +95,8 @@ DEFINES += -D_TIME_H=1
endif
endif
INCLUDES += \
LOCAL_INCLUDES = \
-I$(srcdir)/. \
-I$(srcdir)/.. \
$(NULL)

Просмотреть файл

@ -76,6 +76,11 @@ ifdef HAVE_XIE
CSRCS += XIE.c
endif
# If not primary toolkit, install in secondary path
ifneq (xlib,$(MOZ_GFX_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += -L$(DIST)/bin -lxlibrgb $(MOZ_XLIB_LDFLAGS)

Просмотреть файл

@ -78,6 +78,11 @@ EXTRA_DSO_LDOPTS = \
EXTRA_DSO_LDOPTS += -L$(DIST)/lib -lgtksuperwin $(MOZ_GTK_LDFLAGS)
# If not primary toolkit, install in secondary path
ifneq (gtk,$(MOZ_WIDGET_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(MOZ_GTK_CFLAGS)
@ -99,7 +104,7 @@ DEFINES += -D_TIME_H=1
endif
endif
INCLUDES += \
LOCAL_INCLUDES = \
-I$(srcdir)/../xpwidgets \
-I$(srcdir) \
-I$(topsrcdir)/gfx/src/gtk \
@ -112,3 +117,5 @@ ICON_FILES = \
install::
$(INSTALL) $(ICON_FILES) $(DIST)/bin/icons

Просмотреть файл

@ -79,6 +79,11 @@ EXTRA_DSO_LDOPTS = \
EXTRA_DSO_LDOPTS += -L$(DIST)/lib $(MOZ_QT_LDFLAGS) $(MOZ_XLIB_LDFLAGS)
# If not primary toolkit, install in secondary path
ifneq (qt,$(MOZ_WIDGET_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(MOZ_QT_CFLAGS)
@ -100,7 +105,8 @@ DEFINES += -D_TIME_H=1
endif
endif
INCLUDES += -I$(srcdir)/../xpwidgets \
LOCAL_INCLUDES = -I$(srcdir)/../xpwidgets \
-I$(srcdir) \
-I$(topsrcdir)/gfx/src/qt \
$(NULL)

Просмотреть файл

@ -75,6 +75,11 @@ CPPSRCS = \
SHARED_LIBRARY_LIBS = $(DIST)/lib/libxpwidgets_s.a
# If not primary toolkit, install in secondary path
ifneq (xlib,$(MOZ_WIDGET_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
EXTRA_DSO_LDOPTS += -L$(DIST)/bin -L$(DIST)/lib -lgkgfx $(MOZ_COMPONENT_LIBS)
@ -89,7 +94,8 @@ ifeq ($(OS_ARCH), Linux)
DEFINES += -D_BSD_SOURCE
endif
INCLUDES += \
LOCAL_INCLUDES = \
-I$(srcdir)/../xpwidgets \
-I$(srcdir) \
$(NULL)

Просмотреть файл

@ -41,6 +41,11 @@ MODULE_NAME = nsGtkTimerModule
CPPSRCS += nsTimerGtkFactory.cpp
EXTRA_DSO_LDOPTS = $(MOZ_GTK_LDFLAGS) $(MOZ_COMPONENT_LIBS)
# If not primary toolkit, install in secondary path
ifneq (gtk, $(MOZ_WIDGET_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
INCLUDES += $(MOZ_GTK_CFLAGS) -I$(srcdir)/..

Просмотреть файл

@ -1,54 +0,0 @@
#
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
# John C. Griggs <johng@corel.com>
#
DEPTH = ../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
MODULE = timer
LIBRARY_NAME = timer_$(TIMER_SUFFIX)
REQUIRES = xpcom
CPPSRCS = \
$(MOCSRCS) \
nsTimerEventHandler.cpp \
nsTimerQt.cpp \
$(NULL)
MOCSRCS = \
moc_nsTimerEventHandler.cpp \
$(NULL)
EXPORT_LIBRARY = 1
TIMER_SUFFIX = qt
IS_COMPONENT = 1
MODULE_NAME = nsQtTimerModule
CPPSRCS += nsTimerQtFactory.cpp
EXTRA_DSO_LDOPTS = $(MOZ_QT_LDFLAGS) $(MOZ_COMPONENT_LIBS)
include $(topsrcdir)/config/rules.mk
INCLUDES += $(MOZ_QT_CFLAGS) -I$(srcdir)/..

Просмотреть файл

@ -42,6 +42,11 @@ MODULE_NAME = nsXlibTimerModule
CPPSRCS += nsTimerXlibFactory.cpp
EXTRA_DSO_LDOPTS = $(MOZ_XLIB_LDFLAGS) $(MOZ_COMPONENT_LIBS)
# If not primary toolkit, install in secondary path
ifneq (xlib, $(MOZ_WIDGET_TOOLKIT))
INACTIVE_COMPONENT = 1
endif
include $(topsrcdir)/config/rules.mk
INCLUDES += $(MOZ_XLIB_CFLAGS) -I$(srcdir)/..