@@ -4,6 +4,7 @@ noinst_PROGRAMS =
44TESTS =
55EXTRA_DIST =
66CLEANFILES =
7+ DISTCLEANFILES =
78ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
89
910EXTRA_DIST += COPYRIGHT
@@ -13,28 +14,67 @@ EXTRA_DIST += README.md
1314AM_CPPFLAGS = \
1415 -include $(top_builddir ) /config.h \
1516 -I$(top_srcdir ) /wdns
16- AM_CFLAGS = $(my_CFLAGS )
17+ AM_CFLAGS = $(my_CFLAGS ) \
18+ -I$(top_builddir ) /wdns
1719AM_LDFLAGS =
1820
19- LIBWDNS_CURRENT =1
21+ USE_LCOV =@USE_LCOV@
22+ LCOV =@LCOV@
23+ GENHTML =@GENHTML@
24+
25+ clean-coverage :
26+ @if [ $( USE_LCOV) = yes ] ; then \
27+ $(LCOV ) --directory . --zerocounters ; \
28+ echo " Removing coverage info files and generated $( abs_top_builddir) /coverage-html/ directory" ; \
29+ rm -rf all.coverage report.coverage ; \
30+ rm -rf $(abs_top_builddir ) /coverage-html/ ; \
31+ else \
32+ echo " Code coverage not enabled at configuration time." ; \
33+ echo " Use: ./configure --with-coverage" ; \
34+ fi
35+
36+ report-coverage :
37+ @if [ $( USE_LCOV) = yes ] ; then \
38+ $(LCOV ) --capture --directory . --output-file all.coverage ; \
39+ $(LCOV ) --remove all.coverage \
40+ $(abs_top_srcdir ) /t/\* \
41+ /usr/include/\* \
42+ --output report.coverage ; \
43+ $(GENHTML ) --legend -o $(abs_top_builddir ) /coverage-html report.coverage ; \
44+ echo " Generated Code Coverage report in HTML at $( abs_top_builddir) /coverage-html" ; \
45+ else \
46+ echo " Code coverage not enabled at configuration time." ; \
47+ echo " Use: ./configure --with-coverage" ; \
48+ fi
49+
50+ #
51+ # #
52+ # ## library
53+ # #
54+ #
55+
56+ LIBWDNS_CURRENT =3
2057LIBWDNS_REVISION =0
21- LIBWDNS_AGE =0
58+ LIBWDNS_AGE =2
2259
2360include_HEADERS = wdns/wdns.h
2461lib_LTLIBRARIES = wdns/libwdns.la
2562
2663EXTRA_DIST += wdns/gen_rcode_to_str
2764EXTRA_DIST += wdns/gen_rrclass_to_str
2865EXTRA_DIST += wdns/gen_rrtype_to_str
66+ DISTCLEANFILES += wdns/rrtype_to_str.c \
67+ wdns/rcode_to_str.c \
68+ wdns/rrclass_to_str.c
2969
3070wdns/rcode_to_str.c : wdns/wdns.h wdns/gen_rcode_to_str
31- $(AM_V_GEN ) wdns/gen_rcode_to_str wdns/wdns.h wdns/rcode_to_str.c
71+ $(PYTHON ) $( top_srcdir ) / wdns/gen_rcode_to_str wdns/wdns.h wdns/rcode_to_str.c
3272
3373wdns/rrclass_to_str.c : wdns/wdns.h wdns/gen_rrclass_to_str
34- $(AM_V_GEN ) wdns/gen_rrclass_to_str wdns/wdns.h wdns/rrclass_to_str.c
74+ $(PYTHON ) $( top_srcdir ) / wdns/gen_rrclass_to_str wdns/wdns.h wdns/rrclass_to_str.c
3575
3676wdns/rrtype_to_str.c : wdns/wdns.h wdns/gen_rrtype_to_str
37- $(AM_V_GEN ) wdns/gen_rrtype_to_str wdns/wdns.h wdns/rrtype_to_str.c
77+ $(PYTHON ) $( top_srcdir ) / wdns/gen_rrtype_to_str wdns/wdns.h wdns/rrtype_to_str.c
3878
3979wdns_libwdns_la_CPPFLAGS = \
4080 -include $(top_builddir ) /wdns/wdns-private.h
@@ -107,7 +147,8 @@ wdns_libwdns_la_SOURCES = \
107147 wdns/skip_name.c \
108148 wdns/str_to_name.c \
109149 wdns/str_to_rdata_ubuf.c \
110- wdns/unpack_name.c
150+ wdns/unpack_name.c \
151+ wdns/version.c
111152
112153pkgconfig_DATA = wdns/libwdns.pc
113154EXTRA_DIST += wdns/libwdns.pc.in
@@ -127,6 +168,12 @@ examples_wdns_dump_pcap_SOURCES = \
127168 examples/wdns-dump-pcap.c
128169endif
129170
171+ noinst_PROGRAMS += examples/wdns-print-version
172+ examples_wdns_print_version_LDADD = wdns/libwdns.la
173+ examples_wdns_print_version_SOURCES = \
174+ examples/private.h \
175+ examples/wdns-print-version.c
176+
130177noinst_PROGRAMS += examples/wdns-test-deserialize-rrset
131178examples_wdns_test_deserialize_rrset_LDADD = wdns/libwdns.la
132179examples_wdns_test_deserialize_rrset_SOURCES = \
@@ -161,30 +208,37 @@ examples_wdns_test_serialize_rrset_SOURCES = \
161208# #
162209#
163210
211+ EXTRA_DIST += t/test-common.h
212+
164213AM_TESTS_ENVIRONMENT = top_builddir='$(top_builddir ) '; top_srcdir='$(top_srcdir ) '; export top_builddir top_srcdir;
165214TESTS_ENVIRONMENT = $(AM_TESTS_ENVIRONMENT )
166215
216+ TESTS += t/test-name_to_str
217+ check_PROGRAMS += t/test-name_to_str
218+ t_test_name_to_str_SOURCES = t/test-name_to_str.c t/test-common.c
219+ t_test_name_to_str_LDADD = wdns/libwdns.la
220+
167221TESTS += t/test-str_to_name
168222check_PROGRAMS += t/test-str_to_name
169- t_test_str_to_name_SOURCES = t/test-str_to_name.c
223+ t_test_str_to_name_SOURCES = t/test-str_to_name.c t/test-common.c
170224t_test_str_to_name_LDADD = wdns/libwdns.la
171225
172226TESTS += t/test-str_to_rcode
173227check_PROGRAMS += t/test-str_to_rcode
174- t_test_str_to_rcode_SOURCES = t/test-str_to_rcode.c
228+ t_test_str_to_rcode_SOURCES = t/test-str_to_rcode.c t/test-common.c
175229t_test_str_to_rcode_LDADD = wdns/libwdns.la
176230
177231TESTS += t/test-str_to_rdata
178232check_PROGRAMS += t/test-str_to_rdata
179- t_test_str_to_rdata_SOURCES = t/test-str_to_rdata.c
233+ t_test_str_to_rdata_SOURCES = t/test-str_to_rdata.c t/test-common.c
180234t_test_str_to_rdata_LDADD = wdns/libwdns.la
181235
182236TESTS += t/test-rdata_to_str
183237check_PROGRAMS += t/test-rdata_to_str
184- t_test_rdata_to_str_SOURCES = t/test-rdata_to_str.c
238+ t_test_rdata_to_str_SOURCES = t/test-rdata_to_str.c t/test-common.c
185239t_test_rdata_to_str_LDADD = wdns/libwdns.la
186240
187241TESTS += t/test-str_to_rrtype
188242check_PROGRAMS += t/test-str_to_rrtype
189- t_test_str_to_rrtype_SOURCES = t/test-str_to_rrtype.c
243+ t_test_str_to_rrtype_SOURCES = t/test-str_to_rrtype.c t/test-common.c
190244t_test_str_to_rrtype_LDADD = wdns/libwdns.la
0 commit comments