[virt-tools-list] [libosinfo v2 1/8] Use glib-mkenums to register enums with glib

Christophe Fergeau cfergeau at redhat.com
Wed Nov 14 10:06:26 UTC 2012


On Fri, Nov 09, 2012 at 04:14:17PM +0100, Zeeshan Ali (Khattak) wrote:
> From: "Zeeshan Ali (Khattak)" <zeeshanak at gnome.org>
> 
> This commit adds the generation of osinfo_enum_types.[ch] using
> glib-mkenums. These files will register the various enums that will get
> added to osinfo header files with glib.
> 
> Commit message shamelessly stolen from a similar commit to libvirt-glib
> by Christophe Fergeau <cfergeau at redhat.com>.
> ---
>  configure.ac                        |  3 +++
>  osinfo/Makefile.am                  | 17 +++++++++++++++--
>  osinfo/libosinfo.syms               |  8 ++++++++
>  osinfo/osinfo.h                     |  3 +++
>  osinfo/osinfo_enum_types.c.template | 36 ++++++++++++++++++++++++++++++++++++
>  osinfo/osinfo_enum_types.h.template | 24 ++++++++++++++++++++++++
>  6 files changed, 89 insertions(+), 2 deletions(-)
>  create mode 100644 osinfo/osinfo_enum_types.c.template
>  create mode 100644 osinfo/osinfo_enum_types.h.template
> 
> diff --git a/configure.ac b/configure.ac
> index c0950f7..277ab33 100644
> diff --git a/osinfo/Makefile.am b/osinfo/Makefile.am
> index 6ddb956..7875102 100644
> --- a/osinfo/Makefile.am
> +++ b/osinfo/Makefile.am
> @@ -1,9 +1,14 @@
>  
> -EXTRA_DIST = libosinfo.syms
> +EXTRA_DIST = libosinfo.syms \
> +	     osinfo_enum_types.h.template \
> +	     osinfo_enum_types.c.template
> +
> +BUILT_SOURCES = osinfo_enum_types.c \
> +	        osinfo_enum_types.h
>  
>  if USE_VERSION_DEFS
>  LIBOSINFO_VERSION_FILE = $(builddir)/libosinfo.def
> -BUILT_SOURCES = $(LIBOSINFO_VERSION_FILE)
> +BUILT_SOURCES += $(LIBOSINFO_VERSION_FILE)
>  
>  %.def: %.syms
>  	$(AM_V_GEN)rm -f -- $@-tmp $@ ; \
> @@ -58,6 +63,7 @@ libosinfo_1_0_include_HEADERS = \
>    osinfo_devicelinklist.h	\
>    osinfo_devicelinkfilter.h	\
>    osinfo_entity.h		\
> +  osinfo_enum_types.h		\
>    osinfo_filter.h		\
>    osinfo_install_config.h       \
>    osinfo_install_config_param.h \

This...

> @@ -83,6 +89,7 @@ libosinfo_1_0_include_HEADERS = \
>  
>  libosinfo_1_0_la_SOURCES =	\
>    osinfo_entity.c		\
> +  osinfo_enum_types.c		\
>    osinfo_filter.c		\
>    osinfo_list.c			\
>    osinfo_device.c		\
> @@ -113,6 +120,12 @@ libosinfo_1_0_la_SOURCES =	\
>    osinfo_loader.c		\
>    $(NULL)
>  
> +osinfo_enum_types.h: $(libosinfo_1_0_include_HEADERS) osinfo_enum_types.h.template

in combination with this causes make to complain about ignoring a circular
osinfo_enum_types.h dependency.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20121114/b2967099/attachment.sig>


More information about the virt-tools-list mailing list