Commit 3d696664 authored by Inigo Martínez's avatar Inigo Martínez
Browse files

build: Rename template files

The template files in the `build-aux/templates` directory used in
enums sources and headers generation use the `{$name}-template.[ch]`
pattern. However, the examples in the official guide[0] and usually
GNOME and Freedesktop packages use the `{$name}.[ch].template`
pattern.

Due to this, the name of the template files and build commands have
been changed.

[0] https://developer.gnome.org/gobject/stable/glib-mkenums.html
parent 6394a122
Pipeline #309610 passed with stage
in 4 minutes and 9 seconds
EXTRA_DIST = \
mbim-error-types-template.h \
mbim-error-types-template.c \
mbim-error-quarks-template.c \
mbim-enum-types-template.h \
mbim-enum-types-template.c
mbim-error-types.h.template \
mbim-error-types.c.template \
mbim-error-quarks.c.template \
mbim-enum-types.h.template \
mbim-enum-types.c.template
......@@ -57,23 +57,23 @@ GENERATED_SECTIONS = \
mbim-ms-basic-connect-extensions.sections
# Error types
mbim-error-types.h: $(top_srcdir)/src/libmbim-glib/mbim-errors.h $(top_srcdir)/build-aux/templates/mbim-error-types-template.h
mbim-error-types.h: $(top_srcdir)/src/libmbim-glib/mbim-errors.h $(top_srcdir)/build-aux/templates/mbim-error-types.h.template
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \
--fhead "#ifndef __LIBMBIM_GLIB_ERROR_TYPES_H__\n#define __LIBMBIM_GLIB_ERROR_TYPES_H__\n#include \"mbim-errors.h\"\n" \
--template $(top_srcdir)/build-aux/templates/mbim-error-types-template.h \
--template $(top_srcdir)/build-aux/templates/mbim-error-types.h.template \
--ftail "#endif /* __LIBMBIM_GLIB_ERROR_TYPES_H__ */\n" \
$(top_srcdir)/src/libmbim-glib/mbim-errors.h > $@
mbim-error-types.c: $(top_srcdir)/src/libmbim-glib/mbim-errors.h mbim-error-types.h $(top_srcdir)/build-aux/templates/mbim-error-types-template.c
mbim-error-types.c: $(top_srcdir)/src/libmbim-glib/mbim-errors.h mbim-error-types.h $(top_srcdir)/build-aux/templates/mbim-error-types.c.template
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \
--fhead "#include \"mbim-errors.h\"\n#include \"mbim-error-types.h\"\n" \
--template $(top_srcdir)/build-aux/templates/mbim-error-types-template.c \
--template $(top_srcdir)/build-aux/templates/mbim-error-types.c.template \
$(top_srcdir)/src/libmbim-glib/mbim-errors.h > $@
mbim-error-quarks.c: $(top_srcdir)/src/libmbim-glib/mbim-errors.h mbim-error-types.h $(top_srcdir)/build-aux/templates/mbim-error-quarks-template.c
mbim-error-quarks.c: $(top_srcdir)/src/libmbim-glib/mbim-errors.h mbim-error-types.h $(top_srcdir)/build-aux/templates/mbim-error-quarks.c.template
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \
--fhead "#include \"mbim-errors.h\"\n#include \"mbim-error-types.h\"\n" \
--template $(top_srcdir)/build-aux/templates/mbim-error-quarks-template.c \
--template $(top_srcdir)/build-aux/templates/mbim-error-quarks.c.template \
$(top_srcdir)/src/libmbim-glib/mbim-errors.h > $@
# Enum/Flag types
......@@ -82,17 +82,17 @@ ENUMS = \
$(top_srcdir)/src/libmbim-glib/mbim-cid.h \
$(top_srcdir)/src/libmbim-glib/mbim-message.h \
$(top_srcdir)/src/libmbim-glib/mbim-enums.h
mbim-enum-types.h: $(ENUMS) $(top_srcdir)/build-aux/templates/mbim-enum-types-template.h
mbim-enum-types.h: $(ENUMS) $(top_srcdir)/build-aux/templates/mbim-enum-types.h.template
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \
--fhead "#ifndef __LIBMBIM_GLIB_ENUM_TYPES_H__\n#define __LIBMBIM_GLIB_ENUM_TYPES_H__\n#include \"mbim-uuid.h\"\n#include \"mbim-cid.h\"\n#include \"mbim-message.h\"\n#include \"mbim-enums.h\"\n" \
--template $(top_srcdir)/build-aux/templates/mbim-enum-types-template.h \
--template $(top_srcdir)/build-aux/templates/mbim-enum-types.h.template \
--ftail "#endif /* __LIBMBIM_GLIB_ENUM_TYPES_H__ */\n" \
$(ENUMS) > $@
mbim-enum-types.c: $(ENUMS) mbim-enum-types.h $(top_srcdir)/build-aux/templates/mbim-enum-types-template.c
mbim-enum-types.c: $(ENUMS) mbim-enum-types.h $(top_srcdir)/build-aux/templates/mbim-enum-types.c.template
$(AM_V_GEN) $(PYTHON) $(top_srcdir)/build-aux/mbim-mkenums \
--fhead "#include \"mbim-enum-types.h\"\n" \
--template $(top_srcdir)/build-aux/templates/mbim-enum-types-template.c \
--template $(top_srcdir)/build-aux/templates/mbim-enum-types.c.template \
$(ENUMS) > $@
# Basic Connect service
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment