[almanah] build: Update glib-compile-resources build rules
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [almanah] build: Update glib-compile-resources build rules
- Date: Mon, 12 Dec 2016 15:20:05 +0000 (UTC)
commit 14bb5ea772228bdd7e88e0546cfe21e473ce9482
Author: Philip Withnall <philip tecnocode co uk>
Date: Mon Dec 12 15:14:46 2016 +0000
build: Update glib-compile-resources build rules
Make them work properly in srcdir ≠ builddir situations.
src/Makefile.am | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index feba1f9..7abc4c6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -105,14 +105,16 @@ almanah_LDADD = \
$(AM_LDADD)
# GResource
+almanah_gresource_xml_deps = $(shell $(GLIB_COMPILE_RESOURCES) --generate-dependencies
--sourcedir=$(top_srcdir)/src $(top_srcdir)/src/almanah.gresource.xml)
+resources.c: $(almanah_gresource_xml_deps)
+ $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --c-name almanah --sourcedir=$(top_srcdir)/src
--generate-source $(top_srcdir)/src/almanah.gresource.xml
-almanah_SOURCES += resources.c
-
-resource_files = $(shell $(GLIB_COMPILE_RESOURCES) --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/almanah.gresource.xml)
-resources.c: almanah.gresource.xml $(resource_files)
- $(AM_V_GEN)$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source --c-name
almanah $(srcdir)/almanah.gresource.xml
-
-EXTRA_DIST += almanah.gresource.xml
+BUILT_SOURCES += resources.c
+nodist_almanah_SOURCES += resources.c
+EXTRA_DIST += \
+ almanah.gresource.xml \
+ $(almanah_gresource_xml_deps) \
+ $(NULL)
CLEANFILES += resources.c
# Enums
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]