spice/server/spice-server-enums.h.tmpl
Eduardo Lima (Etrunko) dafc941c76 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@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
2018-03-07 10:04:04 -03:00

20 lines
393 B
Cheetah

/*** BEGIN file-header ***/
#ifndef SPICE_SERVER_ENUMS_H
#define SPICE_SERVER_ENUMS_H
G_BEGIN_DECLS
/*** END file-header ***/
/*** BEGIN enumeration-production ***/
#define SPICE_TYPE_@ENUMSHORT@ @enum_name@_get_type()
GType @enum_name@_get_type (void);
/*** END enumeration-production ***/
/*** BEGIN file-tail ***/
G_END_DECLS
#endif /* SPICE_SERVER_ENUMS_H */
/*** END file-tail ***/