[gnome-tetravex] Make build work when srcdir != builddir.



commit a0462402dcfd3c405f0b48bfa7f66ad763825fbe
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date:   Thu Jun 2 18:47:45 2016 +0200

    Make build work when srcdir != builddir.

 configure.ac    |    3 +--
 src/Makefile.am |    5 ++++-
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c94593a..8b2bd39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,8 +35,7 @@ dnl ###########################################################################
 dnl GResources
 dnl ###########################################################################
 
-GLIB_COMPILE_RESOURCES=`$PKG_CONFIG --variable glib_compile_resources gio-2.0`
-AC_SUBST(GLIB_COMPILE_RESOURCES)
+AC_PATH_PROG(GLIB_COMPILE_RESOURCES,glib-compile-resources)
 
 dnl ###########################################################################
 dnl Internationalization
diff --git a/src/Makefile.am b/src/Makefile.am
index a412507..5c83c06 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -20,6 +20,7 @@ UI_FILES = \
 gnome_tetravex_VALAFLAGS = \
        --pkg posix \
        --pkg gtk+-3.0 \
+       --gresources $(builddir)/gnome-tetravex.gresource.xml \
        --target-glib $(GLIB_REQUIRED)
 
 gnome_tetravex_CFLAGS = \
@@ -35,7 +36,7 @@ gnome_tetravex_LDADD = \
        -lm
 
 gnome-tetravex-resources.c: gnome-tetravex.gresource.xml $(shell $(GLIB_COMPILE_RESOURCES) 
--generate-dependencies gnome-tetravex.gresource.xml)
-       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source 
gnome-tetravex.gresource.xml
+       $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
 
 EXTRA_DIST = \
        $(UI_FILES) \
@@ -45,4 +46,6 @@ CLEANFILES = \
        $(patsubst %.vala,%.c,$(filter %.vala, $(SOURCES))) \
        *_vala.stamp
 
+MAINTAINERCLEANFILES = gnome-tetravex-resources.c
+
 -include $(top_srcdir)/git.mk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]