diff options
author | Tor Lillqvist <tml@novell.com> | 2008-03-17 23:53:18 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2008-03-17 23:53:18 +0000 |
commit | 6ce7b71f9c9bbe63b5c9e1b96baddc67878c1d95 (patch) | |
tree | 9446b81986a72e856406003a2d4f358af984557b /gtk/Makefile.am | |
parent | 39e8f9e58a6601aed8d6f8d271d6ae6f68d0a0a5 (diff) | |
download | gtk+-6ce7b71f9c9bbe63b5c9e1b96baddc67878c1d95.tar.gz |
Bug 99192 - Add --with-include-input-modules
2008-03-18 Tor Lillqvist <tml@novell.com>
Bug 99192 - Add --with-include-input-modules
* configure.in: Add --with-included-immodules switch. Handled in a
similar way as the --with-included-loaders switch. For each input
method module foo: Collect the list of input modules to be built
into libgtk into INCLUDED_IMMODULE_OBJ. Collect a list of
-DINCLUDE_IM_foo definitions into INCLUDED_IMMODULE_DEFINE.
Define Automake conditionals INCLUDE_IM_FOO.
* modules/input/Makefile.am: For modules to be included in libgtk,
build a static library.
* modules/input/im*.c: Use MODULE_ENTRY macros much like in
gdk-pixbuf to get unique names for the functions called by libgtk
in the included case. Use G_MODULE_EXPORT in the non-included case
so that we don't unnecessarily export unneeded random global
symbols on Windows.
* gtk/Makefile.am: Build the included modules and link them into libgtk.
* gtk/gtkimmodule.c: Handle the built-in modules. Remove
copy/paste leftover mentions of "themes" in comments.
svn path=/trunk/; revision=19896
Diffstat (limited to 'gtk/Makefile.am')
-rw-r--r-- | gtk/Makefile.am | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 3d911ddebf..ee48eae742 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -44,7 +44,8 @@ INCLUDES = \ -DGTK_PRINT_BACKEND_ENABLE_UNSUPPORTED \ $(GTK_DEBUG_FLAGS) \ $(GTK_DEP_CFLAGS) \ - $(gtk_clipboard_dnd_c_sources_CFLAGS) + $(gtk_clipboard_dnd_c_sources_CFLAGS) \ + $(INCLUDED_IMMODULE_DEFINE) gtarget=$(gdktarget) @@ -106,26 +107,39 @@ if OS_LINUX TESTS += abicheck.sh pltcheck.sh endif -# libtool stuff: set version and export symbols for resolving -# since automake doesn't support conditionalized libsomething_la_LDFLAGS -# we use the general approach here libgtkincludedir = $(includedir)/gtk-2.0/gtk libadd = \ $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la \ $(top_builddir)/gdk/$(gdktargetlib) \ $(GTK_DEP_LIBS) +deps = if OS_UNIX libadd += xdgmime/libxdgmime.la endif -# common options for the various packages. +# libtool stuff: set version and export symbols for resolving +# since automake doesn't support conditionalized libsomething_la_LDFLAGS +# we use the general approach here libtool_opts = \ -version-info $(LT_VERSION_INFO) \ -export-dynamic $(no_undefined) $(LIBTOOL_EXPORT_OPTIONS) \ -rpath $(libdir) $(libgtk_target_ldflags) +included-modules: +if HAVE_INCLUDED_IMMMODULES + @cd $(top_builddir)/modules/input && $(MAKE) $(AM_MAKEFLAGS) included-modules + +libadd += $(INCLUDED_IMMODULE_OBJ) +deps += $(INCLUDED_IMMODULE_OBJ) + +$(INCLUDED_IMMODULE_OBJ): included-modules + @true +endif + +.PHONY: included-modules + # # setup source file variables # @@ -833,7 +847,8 @@ gtktypebuiltins.c: @REBUILD@ $(gtk_public_h_sources) gtktypebuiltins.c.template gtktypefuncs.c: @REBUILD@ $(top_srcdir)/gtk/*.h $(top_srcdir)/gdk/*.h Makefile echo '#include <gtk/gtk.h>' > xgen-gtfsrc.c && \ ${CPP} $(DEFS) $(INCLUDES) -DGTK_ENABLE_BROKEN $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) xgen-gtfsrc.c | \ - grep -o '\bg[td]k_[a-zA-Z0-9_]*_get_type\b' | \ + egrep '\<g[td]k_[a-zA-Z0-9_]+_get_type\>' | \ + sed -e 's/.*\(\<g[td]k_[a-zA-Z0-9_]\+_get_type\>\).*/\1/' | \ sort | uniq | \ sed '{ s/^/*tp++ = /; s/$$/();/; }' > xgen-gtf \ && cp xgen-gtf $@ && rm -f xgen-gtf @@ -860,10 +875,14 @@ libgtk_directfb_2_0_la_LDFLAGS = $(libtool_opts) libgtk_x11_2_0_la_LIBADD = $(libadd) libgtk_win32_2_0_la_LIBADD = $(libadd) -lole32 -lgdi32 -lcomdlg32 -lwinspool -lcomctl32 -libgtk_win32_2_0_la_DEPENDENCIES = $(gtk_def) $(gtk_win32_res) libgtk_quartz_2_0_la_LIBADD = $(libadd) libgtk_directfb_2_0_la_LIBADD = $(libadd) +libgtk_x11_2_0_la_DEPENDENCIES = $(deps) +libgtk_win32_2_0_la_DEPENDENCIES = $(gtk_def) $(gtk_win32_res) $(deps) +libgtk_quartz_2_0_la_DEPENDENCIES = $(deps) +libgtk_directfb_2_0_la_DEPENDENCIES = $(deps) + if USE_WIN32 libgtk_target_ldflags = $(gtk_win32_res_ldflag) $(gtk_win32_symbols) endif |