Commit c51f9657 authored by Matthias Clasen's avatar Matthias Clasen

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.
parent fac142c2
......@@ -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
......
......@@ -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 -- */
......
......@@ -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);
}
......@@ -306,9 +306,9 @@ nevertheless.
<para>
Specifies the file listing the GdkPixbuf loader modules to load.
This environment variable overrides the default value
<filename><replaceable>sysconfdir</replaceable>/gtk-3.0/gdk-pixbuf.loaders</filename>
(<replaceable>sysconfdir</replaceable> is the sysconfdir specified when
GTK+ was configured, usually <filename>/usr/local/etc</filename>.)
<filename><replaceable>libdir</replaceable>/gtk-3.0/3.0.0/loaders.cache</filename>
(<replaceable>libdir</replaceable> is the sysconfdir specified when
GTK+ was configured, usually <filename>/usr/local/lib</filename>.)
</para>
</formalpara>
......
......@@ -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
......@@ -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) \
......
......@@ -18,9 +18,7 @@ cp -p @abs_srcdir@/COPYING share/doc/gtk+-dev-@GTK_VERSION@
rm $ZIP
zip $ZIP -@ <<EOF
etc/gtk-@GTK_API_VERSION@/gdk-pixbuf.loaders
etc/gtk-@GTK_API_VERSION@/gtkrc
etc/gtk-@GTK_API_VERSION@/gtk.immodules
etc/gtk-@GTK_API_VERSION@/im-multipress.conf
bin/libgdk_pixbuf-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgdk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
......@@ -28,6 +26,8 @@ bin/libgtk-win32-@GTK_API_VERSION@-@LT_CURRENT_MINUS_AGE@.dll
bin/libgailutil-@GTK_API_VERSION@-@GAIL_LT_CURRENT_MINUS_AGE@.dll
bin/gdk-pixbuf-query-loaders-@GTK_API_VERSION@.exe
bin/gtk-query-immodules-@GTK_API_VERSION@.exe
lib/gtk-@GTK_API_VERSION@/3.0.0/loaders.cache
lib/gtk-@GTK_API_VERSION@/3.0.0/immodules.cache
EOF
zip $ZIP lib/gtk-@GTK_API_VERSION@/modules/libgail.dll lib/gtk-@GTK_API_VERSION@/@GTK_BINARY_VERSION@/loaders/*.dll lib/gtk-@GTK_API_VERSION@/@GTK_BINARY_VERSION@/immodules/*.dll lib/gtk-@GTK_API_VERSION@/@GTK_BINARY_VERSION@/engines/*.dll
......
......@@ -914,7 +914,7 @@ distclean-local:
DEPS = $(gtktargetlib) $(top_builddir)/gdk-pixbuf/libgdk_pixbuf-$(GTK_API_VERSION).la $(top_builddir)/gdk/$(gdktargetlib)
TEST_DEPS = $(DEPS) gtk.immodules
TEST_DEPS = $(DEPS) immodules.cache
LDADDS = \
$(gtktargetlib) \
......@@ -1308,7 +1308,7 @@ if CROSS_COMPILING
gtk_update_icon_cache_program = $(GTK_UPDATE_ICON_CACHE)
else
gtk_update_icon_cache_program = \
GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/gdk-pixbuf.loaders \
GDK_PIXBUF_MODULE_FILE=$(top_builddir)/gdk-pixbuf/loaders.cache \
./gtk-update-icon-cache-3.0
endif
......
......@@ -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);
}
......@@ -189,13 +189,13 @@ endif
# after the libraries are installed in their final locations.
install-data-hook:
@if $(RUN_QUERY_IMMODULES_TEST) ; then \
echo $(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-3.0 ; \
$(mkinstalldirs) $(DESTDIR)$(sysconfdir)/gtk-3.0 ; \
echo "$(top_builddir)/gtk/gtk-query-immodules-3.0 > $(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
......@@ -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);
}
}
......
......@@ -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);
}
}
......
......@@ -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);
}
}
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment