* [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER
@ 2013-01-04 1:21 Lucas De Marchi
2013-01-04 1:21 ` [PATCH BlueZ 2/3] gdbus: Simplify generated introspection Lucas De Marchi
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Lucas De Marchi @ 2013-01-04 1:21 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Lucas De Marchi
From: Lucas De Marchi <lucas.de.marchi@gmail.com>
The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13.
Use AC_CONFIG_HEADERS instead.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index cdfc013..e8193ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,7 +3,7 @@ AC_INIT(bluez, 5.0)
AM_INIT_AUTOMAKE([foreign subdir-objects color-tests silent-rules
tar-pax no-dist-gzip dist-xz])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
AC_USE_SYSTEM_EXTENSIONS
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
--
1.8.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH BlueZ 2/3] gdbus: Simplify generated introspection 2013-01-04 1:21 [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Lucas De Marchi @ 2013-01-04 1:21 ` Lucas De Marchi 2013-01-04 5:32 ` Marcel Holtmann 2013-01-04 1:21 ` [PATCH BlueZ 3/3] gitignore: Ignore file generated by Automake 1.13 Lucas De Marchi ` (2 subsequent siblings) 3 siblings, 1 reply; 9+ messages in thread From: Lucas De Marchi @ 2013-01-04 1:21 UTC (permalink / raw) To: linux-bluetooth; +Cc: Lucas De Marchi From: Lucas De Marchi <lucas.de.marchi@gmail.com> The generated introspection is not supposed to be read as is by human, so there's no point in printing the indentation or writing more code to use auto-close tags. If it's desired to read the raw xml file, user can always use other tools to transform the output such as "xmllint --format". This also fixes a missing </property> when property is deprecated. --- gdbus/object.c | 103 +++++++++++++++++++++------------------------------------ 1 file changed, 38 insertions(+), 65 deletions(-) diff --git a/gdbus/object.c b/gdbus/object.c index b9cb284..2b6ae31 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -97,7 +97,7 @@ static void print_arguments(GString *gstr, const GDBusArgInfo *args, { for (; args && args->name; args++) { g_string_append_printf(gstr, - "\t\t\t<arg name=\"%s\" type=\"%s\"", + "<arg name=\"%s\" type=\"%s\"", args->name, args->signature); if (direction) @@ -109,15 +109,15 @@ static void print_arguments(GString *gstr, const GDBusArgInfo *args, } } -#define G_DBUS_ANNOTATE(prefix_, name_, value_) \ - prefix_ "<annotation name=\"org.freedesktop.DBus." name_ "\" " \ - "value=\"" value_ "\"/>\n" +#define G_DBUS_ANNOTATE(name_, value_) \ + "<annotation name=\"org.freedesktop.DBus." name_ "\" " \ + "value=\"" value_ "\"/>" -#define G_DBUS_ANNOTATE_DEPRECATED(prefix_) \ - G_DBUS_ANNOTATE(prefix_, "Deprecated", "true") +#define G_DBUS_ANNOTATE_DEPRECATED \ + G_DBUS_ANNOTATE("Deprecated", "true") -#define G_DBUS_ANNOTATE_NOREPLY(prefix_) \ - G_DBUS_ANNOTATE(prefix_, "Method.NoReply", "true") +#define G_DBUS_ANNOTATE_NOREPLY \ + G_DBUS_ANNOTATE("Method.NoReply", "true") static gboolean check_experimental(int flags, int flag) { @@ -134,85 +134,58 @@ static void generate_interface_xml(GString *gstr, struct interface_data *iface) const GDBusPropertyTable *property; for (method = iface->methods; method && method->name; method++) { - gboolean deprecated = method->flags & - G_DBUS_METHOD_FLAG_DEPRECATED; - gboolean noreply = method->flags & - G_DBUS_METHOD_FLAG_NOREPLY; - if (check_experimental(method->flags, G_DBUS_METHOD_FLAG_EXPERIMENTAL)) continue; - if (!deprecated && !noreply && - !(method->in_args && method->in_args->name) && - !(method->out_args && method->out_args->name)) - g_string_append_printf(gstr, - "\t\t<method name=\"%s\"/>\n", - method->name); - else { + g_string_append_printf(gstr, "<method name=\"%s\">", + method->name); + print_arguments(gstr, method->in_args, "in"); + print_arguments(gstr, method->out_args, "out"); + + if (method->flags & G_DBUS_METHOD_FLAG_DEPRECATED) g_string_append_printf(gstr, - "\t\t<method name=\"%s\">\n", - method->name); - print_arguments(gstr, method->in_args, "in"); - print_arguments(gstr, method->out_args, "out"); - - if (deprecated) - g_string_append_printf(gstr, - G_DBUS_ANNOTATE_DEPRECATED("\t\t\t")); - if (noreply) - g_string_append_printf(gstr, - G_DBUS_ANNOTATE_NOREPLY("\t\t\t")); - - g_string_append_printf(gstr, "\t\t</method>\n"); - } + G_DBUS_ANNOTATE_DEPRECATED); + + if (method->flags & G_DBUS_METHOD_FLAG_NOREPLY) + g_string_append_printf(gstr, G_DBUS_ANNOTATE_NOREPLY); + + g_string_append_printf(gstr, "</method>"); } for (signal = iface->signals; signal && signal->name; signal++) { - gboolean deprecated = signal->flags & - G_DBUS_SIGNAL_FLAG_DEPRECATED; - if (check_experimental(signal->flags, G_DBUS_SIGNAL_FLAG_EXPERIMENTAL)) continue; - if (!deprecated && !(signal->args && signal->args->name)) - g_string_append_printf(gstr, - "\t\t<signal name=\"%s\"/>\n", - signal->name); - else { - g_string_append_printf(gstr, - "\t\t<signal name=\"%s\">\n", - signal->name); - print_arguments(gstr, signal->args, NULL); + g_string_append_printf(gstr, "<signal name=\"%s\">", + signal->name); + print_arguments(gstr, signal->args, NULL); - if (deprecated) - g_string_append_printf(gstr, - G_DBUS_ANNOTATE_DEPRECATED("\t\t\t")); + if (signal->flags & G_DBUS_SIGNAL_FLAG_DEPRECATED) + g_string_append_printf(gstr, + G_DBUS_ANNOTATE_DEPRECATED); - g_string_append_printf(gstr, "\t\t</signal>\n"); - } + g_string_append_printf(gstr, "</signal>\n"); } for (property = iface->properties; property && property->name; property++) { - gboolean deprecated = property->flags & - G_DBUS_PROPERTY_FLAG_DEPRECATED; - if (check_experimental(property->flags, G_DBUS_PROPERTY_FLAG_EXPERIMENTAL)) continue; - g_string_append_printf(gstr, "\t\t<property name=\"%s\"" - " type=\"%s\" access=\"%s%s\"", + g_string_append_printf(gstr, "<property name=\"%s\"" + " type=\"%s\" access=\"%s%s\">", property->name, property->type, property->get ? "read" : "", property->set ? "write" : ""); - if (!deprecated) - g_string_append_printf(gstr, "/>\n"); - else + if (property->flags & G_DBUS_PROPERTY_FLAG_DEPRECATED) g_string_append_printf(gstr, - G_DBUS_ANNOTATE_DEPRECATED(">\n\t\t\t")); + G_DBUS_ANNOTATE_DEPRECATED); + + g_string_append_printf(gstr, "</property>"); } } @@ -228,30 +201,30 @@ static void generate_introspection_xml(DBusConnection *conn, gstr = g_string_new(DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE); - g_string_append_printf(gstr, "<node>\n"); + g_string_append_printf(gstr, "<node>"); for (list = data->interfaces; list; list = list->next) { struct interface_data *iface = list->data; - g_string_append_printf(gstr, "\t<interface name=\"%s\">\n", + g_string_append_printf(gstr, "<interface name=\"%s\">", iface->name); generate_interface_xml(gstr, iface); - g_string_append_printf(gstr, "\t</interface>\n"); + g_string_append_printf(gstr, "</interface>"); } if (!dbus_connection_list_registered(conn, path, &children)) goto done; for (i = 0; children[i]; i++) - g_string_append_printf(gstr, "\t<node name=\"%s\"/>\n", + g_string_append_printf(gstr, "<node name=\"%s\"/>", children[i]); dbus_free_string_array(children); done: - g_string_append_printf(gstr, "</node>\n"); + g_string_append_printf(gstr, "</node>"); data->introspect = g_string_free(gstr, FALSE); } -- 1.8.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH BlueZ 2/3] gdbus: Simplify generated introspection 2013-01-04 1:21 ` [PATCH BlueZ 2/3] gdbus: Simplify generated introspection Lucas De Marchi @ 2013-01-04 5:32 ` Marcel Holtmann 0 siblings, 0 replies; 9+ messages in thread From: Marcel Holtmann @ 2013-01-04 5:32 UTC (permalink / raw) To: Lucas De Marchi; +Cc: linux-bluetooth, Lucas De Marchi Hi Lucas, > The generated introspection is not supposed to be read as is by human, > so there's no point in printing the indentation or writing more code to > use auto-close tags. > > If it's desired to read the raw xml file, user can always use other > tools to transform the output such as "xmllint --format". > > This also fixes a missing </property> when property is deprecated. > --- > gdbus/object.c | 103 +++++++++++++++++++++------------------------------------ > 1 file changed, 38 insertions(+), 65 deletions(-) patch has been applied. Regards Marcel ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH BlueZ 3/3] gitignore: Ignore file generated by Automake 1.13 2013-01-04 1:21 [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Lucas De Marchi 2013-01-04 1:21 ` [PATCH BlueZ 2/3] gdbus: Simplify generated introspection Lucas De Marchi @ 2013-01-04 1:21 ` Lucas De Marchi 2013-01-04 5:32 ` Marcel Holtmann 2013-01-04 5:29 ` [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Marcel Holtmann 2013-01-10 14:47 ` Vinicius Costa Gomes 3 siblings, 1 reply; 9+ messages in thread From: Lucas De Marchi @ 2013-01-04 1:21 UTC (permalink / raw) To: linux-bluetooth; +Cc: Lucas De Marchi From: Lucas De Marchi <lucas.de.marchi@gmail.com> --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 04c9862..619f492 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ ltmain.sh missing stamp-h1 autom4te.cache +test-driver lib/bluez.pc lib/bluetooth -- 1.8.1 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH BlueZ 3/3] gitignore: Ignore file generated by Automake 1.13 2013-01-04 1:21 ` [PATCH BlueZ 3/3] gitignore: Ignore file generated by Automake 1.13 Lucas De Marchi @ 2013-01-04 5:32 ` Marcel Holtmann 2013-01-10 15:10 ` Lucas De Marchi 0 siblings, 1 reply; 9+ messages in thread From: Marcel Holtmann @ 2013-01-04 5:32 UTC (permalink / raw) To: Lucas De Marchi; +Cc: linux-bluetooth, Lucas De Marchi Hi Lucas, > --- > .gitignore | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitignore b/.gitignore > index 04c9862..619f492 100644 > --- a/.gitignore > +++ b/.gitignore > @@ -25,6 +25,7 @@ ltmain.sh > missing > stamp-h1 > autom4te.cache > +test-driver no idea what this is. I do not have that. What is it actually. Regards Marcel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH BlueZ 3/3] gitignore: Ignore file generated by Automake 1.13 2013-01-04 5:32 ` Marcel Holtmann @ 2013-01-10 15:10 ` Lucas De Marchi 0 siblings, 0 replies; 9+ messages in thread From: Lucas De Marchi @ 2013-01-10 15:10 UTC (permalink / raw) To: Marcel Holtmann; +Cc: linux-bluetooth, Lucas De Marchi On Fri, Jan 4, 2013 at 3:32 AM, Marcel Holtmann <marcel@holtmann.org> wrote: > Hi Lucas, > >> --- >> .gitignore | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/.gitignore b/.gitignore >> index 04c9862..619f492 100644 >> --- a/.gitignore >> +++ b/.gitignore >> @@ -25,6 +25,7 @@ ltmain.sh >> missing >> stamp-h1 >> autom4te.cache >> +test-driver > > no idea what this is. I do not have that. What is it actually. it seems to be a helper for running tests in parallel. There's this while configuring: parallel-tests: installing './test-driver' Lucas De Marchi ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER 2013-01-04 1:21 [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Lucas De Marchi 2013-01-04 1:21 ` [PATCH BlueZ 2/3] gdbus: Simplify generated introspection Lucas De Marchi 2013-01-04 1:21 ` [PATCH BlueZ 3/3] gitignore: Ignore file generated by Automake 1.13 Lucas De Marchi @ 2013-01-04 5:29 ` Marcel Holtmann 2013-01-10 14:47 ` Vinicius Costa Gomes 3 siblings, 0 replies; 9+ messages in thread From: Marcel Holtmann @ 2013-01-04 5:29 UTC (permalink / raw) To: Lucas De Marchi; +Cc: linux-bluetooth, Lucas De Marchi Hi Lucas, > The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13. > Use AC_CONFIG_HEADERS instead. > --- > configure.ac | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch has been applied. For extra credits, you could update the other projects as well. Regards Marcel ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER 2013-01-04 1:21 [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Lucas De Marchi ` (2 preceding siblings ...) 2013-01-04 5:29 ` [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Marcel Holtmann @ 2013-01-10 14:47 ` Vinicius Costa Gomes 2013-01-10 14:59 ` Lucas De Marchi 3 siblings, 1 reply; 9+ messages in thread From: Vinicius Costa Gomes @ 2013-01-10 14:47 UTC (permalink / raw) To: Lucas De Marchi; +Cc: linux-bluetooth, Lucas De Marchi Hi Lucas, On 23:21 Thu 03 Jan, Lucas De Marchi wrote: > From: Lucas De Marchi <lucas.de.marchi@gmail.com> > > The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13. > Use AC_CONFIG_HEADERS instead. I think oFono and neard are still missing this fix. Would you care to send it? Cheers, -- Vinicius ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER 2013-01-10 14:47 ` Vinicius Costa Gomes @ 2013-01-10 14:59 ` Lucas De Marchi 0 siblings, 0 replies; 9+ messages in thread From: Lucas De Marchi @ 2013-01-10 14:59 UTC (permalink / raw) To: Vinicius Costa Gomes; +Cc: linux-bluetooth, Lucas De Marchi On Thu, Jan 10, 2013 at 12:47 PM, Vinicius Costa Gomes <vinicius.gomes@openbossa.org> wrote: > Hi Lucas, > > On 23:21 Thu 03 Jan, Lucas De Marchi wrote: >> From: Lucas De Marchi <lucas.de.marchi@gmail.com> >> >> The long-obsoleted AM_CONFIG_HEADER macro was removed in automake 1.13. >> Use AC_CONFIG_HEADERS instead. > > I think oFono and neard are still missing this fix. Would you care to > send it? > Sure. Thanks for the prod. Lucas De Marchi ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2013-01-10 15:10 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-01-04 1:21 [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Lucas De Marchi 2013-01-04 1:21 ` [PATCH BlueZ 2/3] gdbus: Simplify generated introspection Lucas De Marchi 2013-01-04 5:32 ` Marcel Holtmann 2013-01-04 1:21 ` [PATCH BlueZ 3/3] gitignore: Ignore file generated by Automake 1.13 Lucas De Marchi 2013-01-04 5:32 ` Marcel Holtmann 2013-01-10 15:10 ` Lucas De Marchi 2013-01-04 5:29 ` [PATCH BlueZ 1/3] build: Do not use deprecated AM_CONFIG_HEADER Marcel Holtmann 2013-01-10 14:47 ` Vinicius Costa Gomes 2013-01-10 14:59 ` Lucas De Marchi
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox