[Spice-commits] server/Makefile.am

Jonathon Jongsma jjongsma at kemper.freedesktop.org
Wed Nov 16 16:47:53 UTC 2016

 server/Makefile.am |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a7829c9609cab13b3ca0507a8bf39c66d778139e
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date:   Tue Nov 15 12:05:30 2016 -0600

    Fix build when builddir != srcdir
    The following build error occurs when building outside of the source
    glib-mkenums --template spice-server-enums.tmpl.c ../../server/spice-server.h > spice-server-enums.c
    Can't open spice-server-enums.tmpl.c: No such file or directory
    Makefile:1111: recipe for target 'spice-server-enums.c' failed
    Make/Automake uses VPATH to determine that the spice-server-enums.tmpl.c
    file listed in the prerequisites for the rule is located in the srcdir.
    When we use an automatic variable (e.g. $<), the full path to the
    resolved file is used. But when we use the literal filename directly
    within the rule definition, this won't happen. So we need to explicitly
    specify that the input template file is located in srcdir.
    Signed-off-by: Jonathon Jongsma <jjongsma at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/Makefile.am b/server/Makefile.am
index 8d4eae9..ae79ed7 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -204,10 +204,10 @@ libspice_server_la_LIBADD = libserver.la
 libspice_server_la_SOURCES =
 spice-server-enums.c: spice-server.h spice-server-enums.tmpl.c
-	$(AM_V_GEN)glib-mkenums --template spice-server-enums.tmpl.c $< > $@
+	$(AM_V_GEN)glib-mkenums --template $(srcdir)/spice-server-enums.tmpl.c $< > $@
 spice-server-enums.h: spice-server.h spice-server-enums.tmpl.h
-	$(AM_V_GEN)glib-mkenums --template spice-server-enums.tmpl.h $< > $@
+	$(AM_V_GEN)glib-mkenums --template $(srcdir)/spice-server-enums.tmpl.h $< > $@
 EXTRA_DIST =					\
 	spice-bitmap-utils.tmpl.c			\

More information about the Spice-commits mailing list