summaryrefslogtreecommitdiff
path: root/gdk-pixbuf-loader
diff options
context:
space:
mode:
authorFederico Mena Quintero <federico@gnome.org>2016-12-14 09:31:43 -0600
committerFederico Mena Quintero <federico@gnome.org>2016-12-14 11:36:38 -0600
commit30a91d1e1f2df9ad4d6b28ed635e69619b1ed8b3 (patch)
tree928605d0afc7c36d43530b8efb4c0b8c61c7aa5e /gdk-pixbuf-loader
parentf0c113157ff51ae7514201ec6c721d24ce909659 (diff)
downloadlibrsvg-30a91d1e1f2df9ad4d6b28ed635e69619b1ed8b3.tar.gz
Make cargo run when srcdir != builddir
Thanks to Jeff Waugh and Hubert Figuière for the trick.
Diffstat (limited to 'gdk-pixbuf-loader')
-rw-r--r--gdk-pixbuf-loader/Makefile.am23
1 files changed, 22 insertions, 1 deletions
diff --git a/gdk-pixbuf-loader/Makefile.am b/gdk-pixbuf-loader/Makefile.am
index 4c12d663..cbf2ba37 100644
--- a/gdk-pixbuf-loader/Makefile.am
+++ b/gdk-pixbuf-loader/Makefile.am
@@ -51,10 +51,31 @@ EXTRA_rsvg_loader_DEPENDENCIES = libpixbufloader-svg.la gdk-pixbuf-loaders
gdk-pixbuf-loaders: Makefile
$(AM_V_GEN) ( $(GDK_PIXBUF_QUERYLOADERS) ./libpixbufloader-svg.la && $(GDK_PIXBUF_QUERYLOADERS)) > gdk-pixbuf.loaders 2>/dev/null
+if CROSS_COMPILING
+RUN_QUERY_LOADER_TEST=false
+else
+RUN_QUERY_LOADER_TEST=test -z "$(DESTDIR)"
+endif
+
+# The following bit is stolen from gdk-pixbuf/gdk-pixbuf/Makefile.am:
+#
+# Running this if cross compiling or if DESTDIR is set is going to
+# not work at all, so skip it
+# We use install-data-hook here to workaround a bug in automake and/or libtool
+# that makes the install target for the loader libraries a dependency on
+# install-data-am, and not install-exec-am. We need to ensure this gets run
+# after the libraries are installed in their final locations.
install-data-hook:
- if test -z "$(DESTDIR)"; then \
+ @if $(RUN_QUERY_LOADER_TEST) ; then \
$(mkinstalldirs) $(DESTDIR)$(gdk_pixbuf_binarydir) ; \
$(GDK_PIXBUF_QUERYLOADERS) > $(DESTDIR)$(gdk_pixbuf_cache_file) ; \
+ else \
+ echo "***" ; \
+ echo "*** Warning: loaders.cache not built" ; \
+ echo "***" ; \
+ echo "*** Generate this file manually on host" ; \
+ echo "*** system using gdk-pixbuf-query-loaders" ; \
+ echo "***" ; \
fi
CLEANFILES = \