mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-23 09:28:54 +02:00
Fix glib-compile-resources usage when cross-compiling
Copy the behavior of glib-genmarshal: require an installed copy of it, and use that rather than the built copy.
This commit is contained in:
@@ -2577,6 +2577,11 @@ if test $cross_compiling = yes; then
|
|||||||
if test x$GLIB_COMPILE_SCHEMAS = xno; then
|
if test x$GLIB_COMPILE_SCHEMAS = xno; then
|
||||||
AC_MSG_ERROR(Could not find a glib-compile-schemas in your PATH)
|
AC_MSG_ERROR(Could not find a glib-compile-schemas in your PATH)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources, no)
|
||||||
|
if test x$GLIB_COMPILE_RESOURCES = xno; then
|
||||||
|
AC_MSG_ERROR(Could not find a glib-compile-resources in your PATH)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl **************************
|
dnl **************************
|
||||||
|
@@ -581,21 +581,27 @@ test.mo: de.po
|
|||||||
$(MKDIR_P) de/LC_MESSAGES; \
|
$(MKDIR_P) de/LC_MESSAGES; \
|
||||||
cp -f test.mo de/LC_MESSAGES
|
cp -f test.mo de/LC_MESSAGES
|
||||||
|
|
||||||
|
if CROSS_COMPILING
|
||||||
|
glib_compile_resources=$(GLIB_COMPILE_RESOURCES)
|
||||||
|
else
|
||||||
|
glib_compile_resources=$(top_builddir)/gio/glib-compile-resources
|
||||||
|
endif
|
||||||
|
|
||||||
BUILT_SOURCES += test_resources.c test_resources2.c test_resources2.h
|
BUILT_SOURCES += test_resources.c test_resources2.c test_resources2.h
|
||||||
test_resources.c: test2.gresource.xml test1.txt
|
test_resources.c: test2.gresource.xml test1.txt
|
||||||
$(top_builddir)/gio/glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $(srcdir)/test2.gresource.xml
|
$(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test1 $(srcdir)/test2.gresource.xml
|
||||||
|
|
||||||
test_resources2.c: test3.gresource.xml test1.txt
|
test_resources2.c: test3.gresource.xml test1.txt
|
||||||
$(top_builddir)/gio/glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test2 --manual-register $(srcdir)/test3.gresource.xml
|
$(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_test2 --manual-register $(srcdir)/test3.gresource.xml
|
||||||
|
|
||||||
test_resources2.h: test3.gresource.xml
|
test_resources2.h: test3.gresource.xml
|
||||||
$(top_builddir)/gio/glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name _g_test2 --manual-register $(srcdir)/test3.gresource.xml
|
$(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-header --c-name _g_test2 --manual-register $(srcdir)/test3.gresource.xml
|
||||||
|
|
||||||
plugin_resources.c: test4.gresource.xml test1.txt
|
plugin_resources.c: test4.gresource.xml test1.txt
|
||||||
$(top_builddir)/gio/glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $(srcdir)/test4.gresource.xml
|
$(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name _g_plugin $(srcdir)/test4.gresource.xml
|
||||||
|
|
||||||
test.gresource: test.gresource.xml test1.txt test2.txt test3.txt
|
test.gresource: test.gresource.xml test1.txt test2.txt test3.txt
|
||||||
$(top_builddir)/gio/glib-compile-resources --target=$@ --sourcedir=$(srcdir) $(srcdir)/test.gresource.xml
|
$(glib_compile_resources) --target=$@ --sourcedir=$(srcdir) $(srcdir)/test.gresource.xml
|
||||||
|
|
||||||
noinst_LTLIBRARIES = libresourceplugin.la
|
noinst_LTLIBRARIES = libresourceplugin.la
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user