[gcab] Use glib-mkenum's prefixes to avoid sed
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcab] Use glib-mkenum's prefixes to avoid sed
- Date: Thu, 20 Jul 2017 09:58:54 +0000 (UTC)
commit 335fec61904a227ee891eb270d78720c3cfb6983
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Jul 20 10:49:03 2017 +0100
Use glib-mkenum's prefixes to avoid sed
GLib's enumeration type generation tool has two command line option that
allow us to specify the identifier and symbol prefixes. This allows us
to avoid multiple passes of sed and speed up the generation pass.
The identifier and symbol prefix options were introduced in GLib 2.32,
so we will need to bump the required version.
Makefile.am | 2 +-
configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 9fd2bc6..8df6b88 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -93,7 +93,7 @@ ENUMS_FILES = \
$(NULL)
$(GCAB_ENUMS): %: %.etemplate $(ENUMS_FILES)
- $(AM_V_GEN)$(GLIB_MKENUMS) --template $^ | sed -e 's/g_cab/gcab/g' | sed -e 's/G_CAB/GCAB/g' | sed -e
's/_CAB//g' > $@
+ $(AM_V_GEN)$(GLIB_MKENUMS) --identifier-prefix GCab --symbol-prefix gcab --template $^ > $@
EXTRA_DIST = \
gcab.doap \
diff --git a/configure.ac b/configure.ac
index e51dc79..c841712 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,7 +25,7 @@ AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[The name of the gettext domain])
AM_GLIB_GNU_GETTEXT
-AM_PATH_GLIB_2_0([2.22.0], [], [AC_MSG_ERROR([glib required])], [gio])
+AM_PATH_GLIB_2_0([2.32.0], [], [AC_MSG_ERROR([glib required])], [gio])
AM_PROG_VALAC([0.14])
AC_PATH_PROG(VAPIGEN, vapigen, no)
AC_SUBST(VAPIGEN)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]