[Spice-commits] server/Makefile.am server/spice-server-enums.c.tmpl server/spice-server-enums.h.tmpl server/spice-server-enums.tmpl.c server/spice-server-enums.tmpl.h
Eduardo Lima
etrunko at kemper.freedesktop.org
Wed Mar 7 13:07:39 UTC 2018
server/Makefile.am | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
New commits:
commit dafc941c761eeb9f6db607899a087f6bf87ee56d
Author: Eduardo Lima (Etrunko) <etrunko at redhat.com>
Date: Tue Mar 6 11:12:58 2018 -0300
build: Rename spice-server-enums.tmpl.[ch] to spice-server-enums.[ch].tmpl
This is a preparation for meson build, which has built-in support for
generating enums, but requires the template files to be renamed. It uses
the basename of template files to generate the output, and in this case
it would be the same file for both '.c' and '.h'. Ideally meson would
let us specify the name of the output files, but this is not the case.
Without renaming, the following error happens:
Meson encountered an error in file server/meson.build, line 30, column 0:
Tried to create target "spice-server-enums.tmpl", but a target of that
name already exists.
Reference: http://mesonbuild.com/Gnome-module.html#gnomemkenums
Note that by the time of this commit, the documentation is not accurate
and does not mention the fact that output files will get the base name
of the template files if they are specified, I submitted a pull request
to meson fixing this detail in docs:
https://github.com/mesonbuild/meson/pull/3191
Signed-off-by: Eduardo Lima (Etrunko) <etrunko at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/Makefile.am b/server/Makefile.am
index 38c346c2..b0e8597f 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -205,11 +205,11 @@ endif
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 $(srcdir)/spice-server-enums.tmpl.c $< > $@
+spice-server-enums.c: spice-server.h spice-server-enums.c.tmpl
+ $(AM_V_GEN)glib-mkenums --template $(srcdir)/spice-server-enums.c.tmpl $< > $@
-spice-server-enums.h: spice-server.h spice-server-enums.tmpl.h
- $(AM_V_GEN)glib-mkenums --template $(srcdir)/spice-server-enums.tmpl.h $< > $@
+spice-server-enums.h: spice-server.h spice-server-enums.h.tmpl
+ $(AM_V_GEN)glib-mkenums --template $(srcdir)/spice-server-enums.h.tmpl $< > $@
EXTRA_DIST = \
spice-bitmap-utils.tmpl.c \
@@ -217,8 +217,8 @@ EXTRA_DIST = \
glz-encode-match.tmpl.c \
glz-encode.tmpl.c \
spice-server.syms \
- spice-server-enums.tmpl.h \
- spice-server-enums.tmpl.c \
+ spice-server-enums.h.tmpl \
+ spice-server-enums.c.tmpl \
$(NULL)
BUILT_SOURCES = $(spice_built_sources)
diff --git a/server/spice-server-enums.tmpl.c b/server/spice-server-enums.c.tmpl
similarity index 100%
rename from server/spice-server-enums.tmpl.c
rename to server/spice-server-enums.c.tmpl
diff --git a/server/spice-server-enums.tmpl.h b/server/spice-server-enums.h.tmpl
similarity index 100%
rename from server/spice-server-enums.tmpl.h
rename to server/spice-server-enums.h.tmpl
More information about the Spice-commits
mailing list