[libdmapsharing] More work on Makefile's check target



commit 6ba1f300ca47f7bd43c8c852075054c5ee7362ef
Author: W. Michael Petullo <mike flyn org>
Date:   Sat May 18 02:22:48 2019 -0400

    More work on Makefile's check target
    
    Signed-off-by: W. Michael Petullo <mike flyn org>

 libdmapsharing/Makefile.am | 75 ++++++++++++++++++++++++----------------------
 1 file changed, 39 insertions(+), 36 deletions(-)
---
diff --git a/libdmapsharing/Makefile.am b/libdmapsharing/Makefile.am
index 9bb1647..e6dda6f 100644
--- a/libdmapsharing/Makefile.am
+++ b/libdmapsharing/Makefile.am
@@ -148,10 +148,10 @@ CLEANFILES = $(BUILT_SOURCES) \
        pedansee.conf
 
 dmap-marshal.c: dmap-marshal.list
-       @glib-genmarshal --prefix=dmap_marshal_generated $(srcdir)/dmap-marshal.list --body > dmap-marshal.c
+       @glib-genmarshal --prefix=dmap_marshal_generated $(srcdir)/dmap-marshal.list --body >dmap-marshal.c
 
 dmap-marshal.h: dmap-marshal.list
-       @glib-genmarshal --prefix=dmap_marshal_generated $(srcdir)/dmap-marshal.list --header > dmap-marshal.h
+       @glib-genmarshal --prefix=dmap_marshal_generated $(srcdir)/dmap-marshal.list --header >dmap-marshal.h
 
 dmap-enums.c: $(libdmapsharinginclude_headers) Makefile dmap-enums.h
        @glib-mkenums \
@@ -160,8 +160,8 @@ dmap-enums.c: $(libdmapsharinginclude_headers) Makefile dmap-enums.h
                        --vhead "GType\n@enum_name@_get_type (void)\n{\n  static GType etype = 0;\n  if 
(etype == 0) {\n    static const G@Type@Value values[] = {" \
                        --vprod "      { @VALUENAME@, \"@VALUENAME@\", \"@valuenick@\" }," \
                        --vtail "      { 0, NULL, NULL }\n    };\n    etype = g_@type@_register_static 
(\"@EnumName@\", values);\n  }\n  return etype;\n}\n" \
-               $(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
-       && sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
+               $(addprefix $(srcdir)/,$(libdmapsharinginclude_HEADERS)) >$@.tmp \
+       && sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp >$@ \
        && rm -f $@.tmp
 
 dmap-enums.h: $(libdmapsharinginclude_HEADERS) Makefile
@@ -169,8 +169,8 @@ dmap-enums.h: $(libdmapsharinginclude_HEADERS) Makefile
                        --fhead "/* Automatically generated by glib-mkenums */\n\n#ifndef 
_DMAP_ENUMS_H\n#define _DMAP_ENUMS_H\n\n#include <glib-object.h>\n\nG_BEGIN_DECLS\n\n" \
                        --fprod "\n/* enumerations from \"@filename@\" */\n" \
                        --vhead "GType @enum_name@_get_type (void) G_GNUC_CONST;\n#define 
DMAP_TYPE_@ENUMNAME@ (@enum_name@_get_type())\n" \
-                       --ftail "G_END_DECLS\n\n#endif /* _DMAP_ENUMS_H */" $(addprefix 
$(srcdir)/,$(libdmapsharinginclude_HEADERS)) > $@.tmp \
-       && sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp > $@ \
+                       --ftail "G_END_DECLS\n\n#endif /* _DMAP_ENUMS_H */" $(addprefix 
$(srcdir)/,$(libdmapsharinginclude_HEADERS)) >$@.tmp \
+       && sed -e "s/d_map/dmap/" -e "s/D_MAP/DMAP/" -e "s/d_acp/dacp/" -e "s/D_ACP/DACP/" $@.tmp >$@ \
        && rm -f $@.tmp
 
 unit-test.stamp: $(grep -l START_TEST *.c)
@@ -189,7 +189,7 @@ Dmap_4_0_gir_NAMESPACE = Dmap
 Dmap_4_0_gir_SCANNERFLAGS = --symbol-prefix=dmap
 Dmap_4_0_gir_LIBS = libdmapsharing-4.0.la
 Dmap_4_0_gir_FILES = $(introspection_sources)
-Dmap_4_0_gir_INCLUDES = GObject-2.0 Soup-2.4
+Dmap_4_0_gir_INCLUDES = GObject-2.0 Soup-2.4 Gst-1.0
 Dmap_4_0_gir_CFLAGS = $(INCLUDES) $(libdmapsharing_4_0_la_CFLAGS)
 
 INTROSPECTION_GIRS = Dmap-4.0.gir
@@ -204,34 +204,41 @@ CLEANFILES += $(gir_DATA) $(typelib_DATA)
 endif
 
 check:
+       make clean
+       make CFLAGS="-fprofile-arcs -ftest-coverage -g"
+       ../tests/unit-test
+       set -e; for i in $(libdmapsharing_4_0_la_SOURCES); do \
+               gcov -r -o $(patsubst %.c,%.o,.libs/libdmapsharing_4_0_la-$$i) $$i >/dev/null; \
+       done
+       ../tests/summarize-coverage $(patsubst %,%.gcov,$(libdmapsharing_4_0_la_SOURCES))
 if HAVE_PEDANSEE
-       echo    "[flags]" > pedansee.conf
-       echo    "       skip-unit-test-present = true" >> pedansee.conf
-       echo    "       skip-return-value-used = true" >> pedansee.conf
-       echo    "[ignore-return-check]" >> pedansee.conf
-       echo    "       # Ignore dmap_structure_add; return cannot indicate error." >> pedansee.conf
-       echo    "       # Ignore g_object_ref; return value merely a convenience." >> pedansee.conf
-       echo -n "       name = " >> pedansee.conf
-       echo -n "dmap_structure_add;" >> pedansee.conf
-       echo -n "g_object_ref;" >> pedansee.conf
-       echo -n "g_string_ascii_up;" >> pedansee.conf
-       echo -n "g_string_append_len;" >> pedansee.conf
-       echo >> pedansee.conf
+       echo    "[flags]" >pedansee.conf
+       echo    "       skip-unit-test-present = true" >>pedansee.conf
+       echo    "       skip-return-value-used = true" >>pedansee.conf
+       echo    "[ignore-return-check]" >>pedansee.conf
+       echo    "       # Ignore dmap_structure_add; return cannot indicate error." >>pedansee.conf
+       echo    "       # Ignore g_object_ref; return value merely a convenience." >>pedansee.conf
+       echo -n "       name = " >>pedansee.conf
+       echo -n "dmap_structure_add;" >>pedansee.conf
+       echo -n "g_object_ref;" >>pedansee.conf
+       echo -n "g_string_ascii_up;" >>pedansee.conf
+       echo -n "g_string_append_len;" >>pedansee.conf
+       echo >>pedansee.conf
        echo    "[ignore-entirely]" >>pedansee.conf
        echo    "       # Ignore CPP-generated GObject code." >>pedansee.conf
        echo -n "       name = " >>pedansee.conf
-       echo -n               "dmap_mdns_browser_new;" >> pedansee.conf
-       echo -n               "dmap_mdns_browser_start;" >> pedansee.conf
-       echo -n               "dmap_mdns_browser_stop;" >> pedansee.conf
-       echo -n               "dmap_mdns_browser_error_quark;" >> pedansee.conf
-       echo -n               "dmap_mdns_browser_get_services;" >> pedansee.conf
-       echo -n               "dmap_mdns_browser_get_service_type;" >> pedansee.conf
-       echo -n               "dmap_mdns_publisher_new;" >> pedansee.conf
-       echo -n               "dmap_mdns_publisher_error_quark;" >> pedansee.conf
-       echo -n               "dmap_mdns_publisher_rename_at_port;" >> pedansee.conf
-       echo -n               "dmap_mdns_publisher_publish;" >> pedansee.conf
-       echo -n               "dmap_mdns_publisher_withdraw;" >> pedansee.conf
-       echo -n               "dmap_connection_get;" >> pedansee.conf
+       echo -n               "dmap_mdns_browser_new;" >>pedansee.conf
+       echo -n               "dmap_mdns_browser_start;" >>pedansee.conf
+       echo -n               "dmap_mdns_browser_stop;" >>pedansee.conf
+       echo -n               "dmap_mdns_browser_error_quark;" >>pedansee.conf
+       echo -n               "dmap_mdns_browser_get_services;" >>pedansee.conf
+       echo -n               "dmap_mdns_browser_get_service_type;" >>pedansee.conf
+       echo -n               "dmap_mdns_publisher_new;" >>pedansee.conf
+       echo -n               "dmap_mdns_publisher_error_quark;" >>pedansee.conf
+       echo -n               "dmap_mdns_publisher_rename_at_port;" >>pedansee.conf
+       echo -n               "dmap_mdns_publisher_publish;" >>pedansee.conf
+       echo -n               "dmap_mdns_publisher_withdraw;" >>pedansee.conf
+       echo -n               "dmap_connection_get;" >>pedansee.conf
        for i in $$(grep -l G_DEFINE_INTERFACE *.c); do \
                j=$$(cat $$i | awk '/^G_DEFINE_INTERFACE/ { x = 1 } { if (x == 1) printf("%s ", $$0) }' | sed 
's/[^,]*, \([^,]*\),.*/\1/g'); \
                echo -n $${j}_default_init\;; \
@@ -321,10 +328,6 @@ if HAVE_PEDANSEE
                $(PEDANSEE) -c pedansee.conf $$i -- -x c $(DEFS) $(libdmapsharing_4_0_la_CFLAGS); \
        done
 endif
-       ../tests/unit-test
-       set -e; for i in $(libdmapsharing_4_0_la_SOURCES); do \
-               gcov -r -o $(patsubst %.c,%.o,.libs/libdmapsharing_4_0_la-$$i) $$i > /dev/null; \
-       done
-       ../tests/summarize-coverage $(patsubst %,%.gcov,$(libdmapsharing_4_0_la_SOURCES))
+       make clean
 
 EXTRA_DIST = dmap-marshal.list generate-test-suites


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]