chiark / gitweb /
bus: beautify bus_message_dump() output a bit
[elogind.git] / Makefile.am
index e6d5723205d6f9a650fe7c60beeffb846a5b19ba..8710462aad9106aa5777881122f6ad93ee8a2bbf 100644 (file)
@@ -2006,6 +2006,17 @@ libsystemd_bus_internal_la_CFLAGS = \
 noinst_LTLIBRARIES += \
        libsystemd-bus-internal.la
 
+libsystemd_bus_dump_la_SOURCES = \
+       src/libsystemd-bus/bus-dump.c \
+       src/libsystemd-bus/bus-dump.h
+
+libsystemd_bus_dump_la_CFLAGS = \
+       $(AM_CFLAGS)
+       $(CAP_CFLAGS)
+
+noinst_LTLIBRARIES += \
+       libsystemd-bus-dump.la
+
 tests += \
        test-bus-marshal \
        test-bus-signature \
@@ -2032,13 +2043,17 @@ test_bus_marshal_LDADD = \
        libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
        libsystemd-shared.la \
+       libsystemd-bus-dump.la \
+       libsystemd-capability.la \
        $(GLIB_LIBS) \
-       $(DBUS_LIBS)
+       $(DBUS_LIBS) \
+       $(CAP_LIBS)
 
 test_bus_marshal_CFLAGS = \
        $(AM_CFLAGS) \
        $(GLIB_CFLAGS) \
-       $(DBUS_CFLAGS)
+       $(DBUS_CFLAGS) \
+       $(CAP_CFLAGS)
 
 test_bus_signature_SOURCES = \
        src/libsystemd-bus/test-bus-signature.c
@@ -2078,13 +2093,17 @@ test_bus_objects_SOURCES = \
 
 test_bus_objects_CFLAGS = \
        $(AM_CFLAGS) \
+       $(CAP_CFLAGS) \
        -pthread
 
 test_bus_objects_LDADD = \
        libsystemd-bus-internal.la \
        libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-bus-dump.la \
+       libsystemd-capability.la \
+       $(CAP_LIBS)
 
 test_bus_match_SOURCES = \
        src/libsystemd-bus/test-bus-match.c
@@ -2102,7 +2121,14 @@ test_bus_kernel_LDADD = \
        libsystemd-bus-internal.la \
        libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-bus-dump.la \
+       libsystemd-capability.la \
+       $(CAP_LIBS)
+
+test_bus_kernel_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(CAP_CFLAGS)
 
 test_bus_kernel_bloom_SOURCES = \
        src/libsystemd-bus/test-bus-kernel-bloom.c
@@ -2136,7 +2162,14 @@ test_bus_zero_copy_LDADD = \
        libsystemd-bus-internal.la \
        libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-bus-dump.la \
+       libsystemd-capability.la \
+       $(CAP_LIBS)
+
+test_bus_zero_copy_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(CAP_CFLAGS)
 
 test_bus_introspect_SOURCES = \
        src/libsystemd-bus/test-bus-introspect.c
@@ -2161,7 +2194,14 @@ busctl_LDADD = \
        libsystemd-bus-internal.la \
        libsystemd-id128-internal.la \
        libsystemd-daemon-internal.la \
-       libsystemd-shared.la
+       libsystemd-shared.la \
+       libsystemd-bus-dump.la \
+       libsystemd-capability.la \
+       $(CAP_LIBS)
+
+busctl_CFLAGS = \
+       $(AM_CFLAGS) \
+       $(CAP_CFLAGS)
 
 # ------------------------------------------------------------------------------
 if ENABLE_GTK_DOC
@@ -4624,8 +4664,13 @@ valgrind-tests: $(TESTS)
                [ "$$f" == "$${f/.pl/}" ] && libtool --mode=execute valgrind --leak-check=full --error-exitcode=55 $(builddir)/$$f ; \
        done
 
-check-api-docs: $(lib_LTLIBRARIES) man
-       for symbol in `for f in $(lib_LTLIBRARIES) ; do nm -g --defined-only $(builddir)/.libs/"$${f/.la/.so}" 2>&1 /dev/null | grep " T " | cut -d" " -f3 ; done` ; do \
+exported: $(lib_LTLIBRARIES)
+       $(AM_V_GEN)for f in $(lib_LTLIBRARIES) ; do \
+               nm -g --defined-only $(builddir)/.libs/"$${f/.la/.so}" 2>&1 /dev/null | grep " T " | cut -d" " -f3 ; \
+       done > $@
+
+check-api-docs: exported man
+       for symbol in `cat exported` ; do \
                if test -f $(builddir)/man/$$symbol.html ; then \
                        echo "  Symbol $$symbol() is documented." ; \
                else \
@@ -4636,19 +4681,14 @@ check-api-docs: $(lib_LTLIBRARIES) man
 OBJECT_VARIABLES:=$(filter %_OBJECTS,$(.VARIABLES))
 ALL_OBJECTS:=$(foreach v,$(OBJECT_VARIABLES),$($(v)))
 
-defined: $(ALL_OBJECTS)
-       $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
-               nm -g --undefined-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
-       done | cut -c 20- | cut -d @ -f 1 | sort -u > $(builddir)/undefined
-
-undefined: $(ALL_OBJECTS)
+undefined defined: $(ALL_OBJECTS)
        $(AM_V_GEN)for f in $(ALL_OBJECTS) ; do \
-               nm -g --defined-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
-       done | cut -c 20- | cut -d @ -f 1 | sort -u > $(builddir)/defined
+               nm -g --$@-only `echo $(builddir)/"$$f" | sed -e 's,\([^/]*\).lo$$,.libs/\1.o,'` ; \
+       done | cut -c 20- | cut -d @ -f 1 | sort -u > $@
 
 CLEANFILES += \
        defined \
        undefined
 
-check-api-unused: defined undefined
-       diff -u undefined defined | grep ^+ | grep -v ^+++ | cut -c2-
+check-api-unused: defined undefined exported
+       ( cat exported undefined ) | sort -u  | diff -u - defined | grep ^+ | grep -v ^+++ | cut -c2-