From c51f96578226ee106a59d52bf1920f50adb16ae1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 18 May 2010 19:23:06 -0400 Subject: [PATCH] Some cleanups after the module cache file change Bring the various 'run uninstalled' hacks in line with the new way of doing things, and fix make install for module cache files. Patch by Tadej Borovsak. --- demos/Makefile.am | 4 ++-- demos/gtk-demo/main.c | 4 ++-- demos/pixbuf-init.c | 2 +- docs/reference/gtk/running.sgml | 6 +++--- gdk-pixbuf/Makefile.am | 24 ++++++++++++------------ gdk/tests/Makefile.am | 2 +- gtk-zip.sh.in | 4 ++-- gtk/Makefile.am | 4 ++-- gtk/tests/pixbuf-init.c | 2 +- modules/input/Makefile.am | 20 ++++++++++---------- tests/testcombochange.c | 4 ++-- tests/testdnd.c | 4 ++-- tests/testgtk.c | 4 ++-- tests/testtext.c | 4 ++-- 14 files changed, 44 insertions(+), 44 deletions(-) diff --git a/demos/Makefile.am b/demos/Makefile.am index 994166a6fb..e51ed908e2 100644 --- a/demos/Makefile.am +++ b/demos/Makefile.am @@ -41,8 +41,8 @@ if CROSS_COMPILING pixbuf_csource=$(GDK_PIXBUF_CSOURCE) pixbuf_csource_deps= else -pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource-3.0 -pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource-3.0 $(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders +pixbuf_csource=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/loaders.cache $(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource-3.0 +pixbuf_csource_deps=$(top_builddir)/gdk-pixbuf/gdk-pixbuf-csource-3.0 $(top_builddir)/gdk-pixbuf/loaders.cache endif test-inline-pixbufs.h: $(pixbuf_csource_deps) apple-red.png gnome-foot.png diff --git a/demos/gtk-demo/main.c b/demos/gtk-demo/main.c index c7492ef196..2f16a96be0 100644 --- a/demos/gtk-demo/main.c +++ b/demos/gtk-demo/main.c @@ -941,8 +941,8 @@ main (int argc, char **argv) if (g_file_test ("../../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) { - g_setenv ("GDK_PIXBUF_MODULE_FILE", "../../gdk-pixbuf/gdk-pixbuf.loaders", TRUE); - g_setenv ("GTK_IM_MODULE_FILE", "../../modules/input/gtk.immodules", TRUE); + g_setenv ("GDK_PIXBUF_MODULE_FILE", "../../gdk-pixbuf/loaders.cache", TRUE); + g_setenv ("GTK_IM_MODULE_FILE", "../../modules/input/immodules.cache", TRUE); } /* -- End of hack -- */ diff --git a/demos/pixbuf-init.c b/demos/pixbuf-init.c index 898de45586..02ab7658ac 100644 --- a/demos/pixbuf-init.c +++ b/demos/pixbuf-init.c @@ -16,5 +16,5 @@ void pixbuf_init (void) { if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la")) - g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE); + g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE); } diff --git a/docs/reference/gtk/running.sgml b/docs/reference/gtk/running.sgml index ad7437696c..82a3c2070b 100644 --- a/docs/reference/gtk/running.sgml +++ b/docs/reference/gtk/running.sgml @@ -306,9 +306,9 @@ nevertheless. Specifies the file listing the GdkPixbuf loader modules to load. This environment variable overrides the default value - sysconfdir/gtk-3.0/gdk-pixbuf.loaders - (sysconfdir is the sysconfdir specified when - GTK+ was configured, usually /usr/local/etc.) + libdir/gtk-3.0/3.0.0/loaders.cache + (libdir is the sysconfdir specified when + GTK+ was configured, usually /usr/local/lib.) diff --git a/gdk-pixbuf/Makefile.am b/gdk-pixbuf/Makefile.am index 03714de335..6ab748e865 100644 --- a/gdk-pixbuf/Makefile.am +++ b/gdk-pixbuf/Makefile.am @@ -601,7 +601,7 @@ MAINTAINERCLEANFILES = \ gdk-pixbuf-enum-types.c \ gdk-pixbuf-marshal.h \ gdk-pixbuf-marshal.c \ - gdk-pixbuf.loaders + loaders.cache # # gdk-pixbuf-enum-types.h @@ -710,11 +710,11 @@ endif # after the libraries are installed in their final locations. install-data-hook: install-ms-lib install-def-file @if $(RUN_QUERY_LOADER_TEST) ; then \ - $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-3.0 ; \ - $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders-3.0 > $(DESTDIR)$(sysconfdir)/gtk-3.0/gdk-pixbuf.loaders ; \ + $(mkinstalldirs) $(DESTDIR)$(libdir)/gtk-3.0/3.0.0 ; \ + $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders-3.0 > $(DESTDIR)$(libdir)/gtk-3.0/3.0.0/loaders.cache ; \ else \ echo "***" ; \ - echo "*** Warning: gdk-pixbuf.loaders not built" ; \ + echo "*** Warning: loaders.cache not built" ; \ echo "***" ; \ echo "*** Generate this file manually on host" ; \ echo "*** system using gdk-pixbuf-query-loaders-3.0" ; \ @@ -722,27 +722,27 @@ install-data-hook: install-ms-lib install-def-file fi uninstall-local: uninstall-ms-lib uninstall-def-file - rm -f $(DESTDIR)$(sysconfdir)/gtk-3.0/gdk-pixbuf.loaders + rm -f $(DESTDIR)$(libdir)/gtk-3.0/3.0.0/loaders.cache if CROSS_COMPILING else -all-local: gdk-pixbuf.loaders +all-local: loaders.cache endif if BUILD_DYNAMIC_MODULES -gdk-pixbuf.loaders: $(loader_LTLIBRARIES) gdk-pixbuf-query-loaders-3.0$(EXEEXT) +loaders.cache: $(loader_LTLIBRARIES) gdk-pixbuf-query-loaders-3.0$(EXEEXT) LOADERS=`echo libpixbufloader-*.la` ; \ if test "x$$LOADERS" != 'xlibpixbufloader-*.la' ; then \ - echo "Writing a gdk-pixbuf.loader file to use when running examples before installing gdk-pixbuf."; \ - $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders-3.0 $$LOADERS > ./gdk-pixbuf.loaders ;\ + echo "Writing a loaders.cache file to use when running examples before installing gdk-pixbuf."; \ + $(top_builddir)/gdk-pixbuf/gdk-pixbuf-query-loaders-3.0 $$LOADERS > ./loaders.cache ;\ else \ echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \ - touch gdk-pixbuf.loaders; \ + touch loaders.cache; \ fi else -gdk-pixbuf.loaders: +loaders.cache: echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \ - touch gdk-pixbuf.loaders; + touch loaders.cache; endif -include $(top_srcdir)/git.mk diff --git a/gdk/tests/Makefile.am b/gdk/tests/Makefile.am index 423a353d61..2567627a39 100644 --- a/gdk/tests/Makefile.am +++ b/gdk/tests/Makefile.am @@ -5,7 +5,7 @@ NULL= # check_PROGRAMS=check-gdk-cairo check_PROGRAMS= TESTS=$(check_PROGRAMS) -TESTS_ENVIRONMENT=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders +TESTS_ENVIRONMENT=GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/loaders.cache AM_CPPFLAGS=\ $(GDK_DEP_CFLAGS) \ diff --git a/gtk-zip.sh.in b/gtk-zip.sh.in index 9f36d0ab95..5bf2ecff71 100755 --- a/gtk-zip.sh.in +++ b/gtk-zip.sh.in @@ -18,9 +18,7 @@ cp -p @abs_srcdir@/COPYING share/doc/gtk+-dev-@GTK_VERSION@ rm $ZIP zip $ZIP -@ < $(DESTDIR)$(sysconfdir)/gtk-3.0/gtk.immodules" ; \ - $(top_builddir)/gtk/gtk-query-immodules-3.0 > $(DESTDIR)$(sysconfdir)/gtk-3.0/gtk.immodules ; \ + echo $(mkinstalldirs) $(DESTDIR)$(libdir)/gtk-3.0/3.0.0 ; \ + $(mkinstalldirs) $(DESTDIR)$(libdir)/gtk-3.0/3.0.0 ; \ + echo "$(top_builddir)/gtk/gtk-query-immodules-3.0 > $(DESTDIR)$(libdir)/gtk-3.0/3.0.0/immodules.cache" ; \ + $(top_builddir)/gtk/gtk-query-immodules-3.0 > $(DESTDIR)$(libdir)/gtk-3.0/3.0.0/immodules.cache ; \ else \ echo "***" ; \ - echo "*** Warning: gtk.immodules not built" ; \ + echo "*** Warning: immodules.cache not built" ; \ echo "***" ; \ echo "*** Generate this file manually on host" ; \ echo "*** system using gtk-query-immodules-3.0" ; \ @@ -203,7 +203,7 @@ install-data-hook: fi uninstall-local: - rm -f $(DESTDIR)$(sysconfdir)/gtk-3.0/gtk.immodules + rm -f $(DESTDIR)$(libdir)/gtk-3.0/3.0.0/immodules.cache if BUILD_DYNAMIC_MODULES @@ -239,14 +239,14 @@ noinst_LTLIBRARIES = \ included-modules: $(noinst_LTLIBRARIES) -gtk.immodules: Makefile.am $(module_LTLIBRARIES) - $(top_builddir)/gtk/gtk-query-immodules-3.0 $(module_LTLIBRARIES) > gtk.immodules +immodules.cache: Makefile.am $(module_LTLIBRARIES) + $(top_builddir)/gtk/gtk-query-immodules-3.0 $(module_LTLIBRARIES) > immodules.cache -CLEANFILES = gtk.immodules +CLEANFILES = immodules.cache if CROSS_COMPILING else -all-local: gtk.immodules +all-local: immodules.cache endif -include $(top_srcdir)/git.mk diff --git a/tests/testcombochange.c b/tests/testcombochange.c index 89fe3a1a2d..f950150853 100644 --- a/tests/testcombochange.c +++ b/tests/testcombochange.c @@ -34,8 +34,8 @@ test_init (void) if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) { - g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE); - g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/gtk.immodules", TRUE); + g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE); + g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE); } } diff --git a/tests/testdnd.c b/tests/testdnd.c index 2ed5803a7d..24d642f6ad 100644 --- a/tests/testdnd.c +++ b/tests/testdnd.c @@ -581,8 +581,8 @@ test_init (void) if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) { - g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE); - g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/gtk.immodules", TRUE); + g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE); + g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE); } } diff --git a/tests/testgtk.c b/tests/testgtk.c index 4395ff6818..86ad601173 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -10727,8 +10727,8 @@ test_init (void) if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) { - g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE); - g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/gtk.immodules", TRUE); + g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE); + g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE); } } diff --git a/tests/testtext.c b/tests/testtext.c index ea2870f960..fcc5b834c3 100644 --- a/tests/testtext.c +++ b/tests/testtext.c @@ -3033,8 +3033,8 @@ test_init (void) if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la", G_FILE_TEST_EXISTS)) { - g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE); - g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/gtk.immodules", TRUE); + g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/loaders.cache", TRUE); + g_setenv ("GTK_IM_MODULE_FILE", "../modules/input/immodules.cache", TRUE); } }