Commit f18c86461e224db3b9edf7539a0c76f5b2859810
1 parent
0e2e1161
actual coverage reports and api docs can be build via make again ... now project…
… name and version are taken from configure ... ahh and configure holds version information from git.
Showing
5 changed files
with
96 additions
and
50 deletions
... | ... | @@ -7,6 +7,16 @@ ACLOCAL_AMFLAGS = -I m4 |
7 | 7 | |
8 | 8 | EXTRA_DIST = include assets certs config run |
9 | 9 | |
10 | -SUBDIRS = src tests | |
10 | +SUBDIRS = src tests docs | |
11 | 11 | |
12 | -include $(top_srcdir)/Makefile.am.coverage | |
12 | +.PHONY: docs coverage-html | |
13 | + | |
14 | +if HAVE_DOXYGEN | |
15 | +docs: | |
16 | + -$(MAKE) -C docs $(AM_MAKEFLAGS) -k $@ | |
17 | +endif | |
18 | + | |
19 | +if HAVE_GCOV | |
20 | +coverage-html: | |
21 | + -$(MAKE) -C tests $(AM_MAKEFLAGS) -k $@ | |
22 | +endif | ... | ... |
Makefile.am.coverage
deleted
100644 → 0
1 | - | |
2 | -# Coverage targets | |
3 | - | |
4 | -#if HAVE_GCOV | |
5 | - | |
6 | - .PHONY: clean-gcda | |
7 | - clean-gcda: | |
8 | - @echo Removing old coverage results | |
9 | - -find -name '*.gcda' -print | xargs -r rm | |
10 | - | |
11 | - .PHONY: coverage-html generate-coverage-html clean-coverage-html | |
12 | - coverage-html: clean-gcda | |
13 | - -$(MAKE) -C tests $(AM_MAKEFLAGS) -k check-build | |
14 | - $(MAKE) $(AM_MAKEFLAGS) init-coverage-html | |
15 | - -$(MAKE) $(AM_MAKEFLAGS) -k check | |
16 | - $(MAKE) $(AM_MAKEFLAGS) generate-coverage-html | |
17 | - | |
18 | - init-coverage-html: | |
19 | - $(LCOV) -d $(top_builddir) -z | |
20 | - $(LCOV) -d $(top_builddir) -c -i -o coverage.base | |
21 | - | |
22 | - generate-coverage-html: | |
23 | - @echo Collecting coverage data | |
24 | - $(LCOV) -d $(top_builddir) -c -o coverage.run --gcov-tool /usr/bin/gcov | |
25 | - $(LCOV) -d $(top_builddir) -a ./coverage.base -a ./coverage.run -o coverage.info | |
26 | - LANG=C $(GENHTML) --prefix $(top_builddir) --output-directory coveragereport --title "Code Coverage" --legend --branch-coverage --show-details coverage.run | |
27 | - | |
28 | - clean-coverage-html: clean-gcda | |
29 | - -$(LCOV) --directory $(top_builddir) -z | |
30 | - -rm -rf coverage.info coveragereport | |
31 | - | |
32 | - clean-local: clean-coverage-html | |
33 | - | |
34 | -#endif # HAVE_GCOV |
... | ... | @@ -2,13 +2,15 @@ |
2 | 2 | # Process this file with autoconf to produce a configure script. |
3 | 3 | |
4 | 4 | AC_PREREQ([2.68]) |
5 | -AC_INIT([taskrambler], [0.1.6], [Georg Hopp <georg@steffers.org>]) | |
5 | +AC_INIT([taskrambler], | |
6 | + [m4_esyscmd_s([git describe --always --abbrev=0])], | |
7 | + [Georg Hopp <georg@steffers.org>]) | |
6 | 8 | LT_INIT |
7 | 9 | AM_INIT_AUTOMAKE |
8 | 10 | #AM_INIT_AUTOMAKE([subdir-objects]) |
9 | -#AM_SILENT_RULES([yes]) | |
11 | +AM_SILENT_RULES([yes]) | |
10 | 12 | AC_COPYRIGHT([Copyright © 2013 Georg Hopp]) |
11 | -AC_REVISION([$Id:$]) | |
13 | +AC_REVISION([m4_esyscmd_s([git describe --always])]) | |
12 | 14 | AC_CONFIG_SRCDIR([src/taskrambler.c]) |
13 | 15 | AC_CONFIG_HEADERS([config.h]) |
14 | 16 | AC_CONFIG_MACRO_DIR([m4]) |
... | ... | @@ -22,9 +24,6 @@ AC_SUBST(COVERAGE_LDFLAGS) |
22 | 24 | m4_include([m4/memopt.m4]) |
23 | 25 | AC_MEM_OPT |
24 | 26 | |
25 | -m4_include([m4/dragonegg.m4]) | |
26 | -AC_DRAGONEGG | |
27 | - | |
28 | 27 | PWD=$(/bin/pwd) |
29 | 28 | AC_SUBST(PWD) |
30 | 29 | |
... | ... | @@ -35,6 +34,17 @@ AC_PROG_CC_C99 |
35 | 34 | AC_PROG_LIBTOOL |
36 | 35 | AM_PROG_CC_C_O |
37 | 36 | |
37 | +# Doxygen | |
38 | +AC_CHECK_PROGS([DOXYGEN], [doxygen]) | |
39 | +if test -z "$DOXYGEN"; | |
40 | + then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support]) | |
41 | +fi | |
42 | + | |
43 | +AM_CONDITIONAL([HAVE_DOXYGEN], | |
44 | + [test -n "$DOXYGEN"]) | |
45 | +AM_COND_IF([HAVE_DOXYGEN], | |
46 | + [AC_CONFIG_FILES([docs/Doxyfile])]) | |
47 | + | |
38 | 48 | # # Checks for libraries. |
39 | 49 | # AC_CHECK_LIB([json], [json_object_new_object], [], |
40 | 50 | # [AC_MSG_ERROR([json-c library not found], [1])]) |
... | ... | @@ -73,5 +83,6 @@ AC_CONFIG_FILES([Makefile |
73 | 83 | src/application/Makefile |
74 | 84 | src/storage/Makefile |
75 | 85 | src/user/Makefile |
86 | + docs/Makefile | |
76 | 87 | tests/Makefile]) |
77 | 88 | AC_OUTPUT | ... | ... |
docs/Makefile.am
0 → 100644
1 | +if HAVE_DOXYGEN | |
2 | +# directory = $(top_srcdir)/docs/man/man3/ | |
3 | +# | |
4 | +# dist_man_MANS = $(directory)/man_page_1.3 $(directory)/man_page_2.3 | |
5 | +# $(directory)/man_page_1.3: doxyfile.stamp | |
6 | +# $(directory)/man_page_2.3: doxyfile.stamp | |
7 | + | |
8 | +.PHONY: docs | |
9 | + | |
10 | +docs: | |
11 | + mkdir $(PACKAGE_VERSION) | |
12 | + $(DOXYGEN) Doxyfile | |
13 | + echo Timestamp > doxyfile.stamp | |
14 | + | |
15 | +clean-local: | |
16 | + rm -rf $(top_srcdir)/docs/$(PACKAGE_VERSION) | |
17 | +endif | ... | ... |
... | ... | @@ -47,20 +47,62 @@ SERVER = $(SOCKET) $(STREAM) \ |
47 | 47 | ../src/utils/signalHandling.c \ |
48 | 48 | mock/mock_worker.c |
49 | 49 | |
50 | +AM_CFLAGS = -O0 -Wall -ggdb -I ../include -I .. -I . $(MEM_OPT_FLAGS) | |
51 | +AM_LDFLAGS = | |
52 | + | |
53 | +if HAVE_GCOV | |
54 | +AM_CFLAGS += $(COVERAGE_CFLAGS) | |
55 | +AM_LDFLAGS += $(COVERAGE_LDFLAGS) | |
56 | +endif | |
57 | + | |
50 | 58 | classTest_SOURCES = $(CLASS) classTest.c |
51 | -classTest_CFLAGS = -Wall -ggdb -O0 -fprofile-arcs -ftest-coverage -pg -I ../include -I .. -I . | |
52 | -classTest_LDFLAGS = -lgcov -pg | |
59 | +classTest_CFLAGS = $(AM_CFLAGS) -pg | |
60 | +classTest_LDFLAGS = $(AM_LDFLAGS) -pg | |
53 | 61 | |
54 | 62 | loggerTest_SOURCES = $(LOGGER) loggerTest.c |
55 | -loggerTest_CFLAGS = -Wall -ggdb -O0 -fprofile-arcs -ftest-coverage -pg -I ../include -I .. -I . | |
56 | -loggerTest_LDFLAGS = -lgcov -pg | |
63 | +loggerTest_CFLAGS = $(AM_CFLAGS) -pg | |
64 | +loggerTest_LDFLAGS = $(AM_LDFLAGS) -pg | |
57 | 65 | |
58 | 66 | socketTest_SOURCES = $(SOCKET) socketTest.c |
59 | -socketTest_CFLAGS = -Wall -ggdb -O0 -fprofile-arcs -ftest-coverage -pg -I ../include -I .. -I . | |
60 | -socketTest_LDFLAGS = -lgcov -pg | |
67 | +socketTest_CFLAGS = $(AM_CFLAGS) -pg | |
68 | +socketTest_LDFLAGS = $(AM_LDFLAGS) -pg | |
61 | 69 | |
62 | 70 | serverTest_SOURCES = $(SERVER) serverTest.c |
63 | -serverTest_CFLAGS = -Wall -ggdb -O0 -fprofile-arcs -ftest-coverage -pg -I ../include -I .. -I . | |
64 | -serverTest_LDFLAGS = $(STREAM_OBJ) -lgcov -lcrypto -pg | |
71 | +serverTest_CFLAGS = $(AM_CFLAGS) -pg | |
72 | +serverTest_LDFLAGS = $(STREAM_OBJ) $(AM_LDFLAGS) -lcrypto -pg | |
65 | 73 | |
66 | 74 | EXTRA_DIST = runtest.h mock/mock_class.h mock/mock_logger.h |
75 | + | |
76 | +if HAVE_GCOV | |
77 | + | |
78 | +.PHONY: clean-gcda clean-gcno coverage-html clean-coverage | |
79 | + | |
80 | +cov_dir = $(top_srcdir)/tests/coverage/$(PACKAGE_VERSION) | |
81 | + | |
82 | +coverage-html: clean clean-coverage check | |
83 | + @echo Collecting coverage data | |
84 | + $(LCOV) -d $(top_srcdir) -c -i -o coverage.base | |
85 | + $(LCOV) -d $(top_srcdir) -c -o coverage.run --gcov-tool /usr/bin/gcov | |
86 | + $(LCOV) -d $(top_srcdir) \ | |
87 | + -a ./coverage.base -a ./coverage.run \ | |
88 | + -o coverage.info | |
89 | + LANG=C $(GENHTML) --prefix $(top_srcdir) \ | |
90 | + --output-directory $(cov_dir) \ | |
91 | + --title "$(PACKAGE_NAME) $(PACKAGE_VERSION)" \ | |
92 | + --legend --branch-coverage --show-details coverage.run | |
93 | + | |
94 | +clean-coverage: clean-gcda clean-gcno | |
95 | + $(LCOV) -d $(top_srcdir) -z | |
96 | + -rm -rf coverage.info coverage.base coverage.run $(cov_dir) | |
97 | + | |
98 | +clean-gcda: | |
99 | + @echo Removing old coverage results | |
100 | + -find $(top_srcdir) -name '*.gcda' -print | xargs -r rm | |
101 | + | |
102 | +clean-gcno: | |
103 | + @echo Removing old coverage results | |
104 | + -find $(top_srcdir) -name '*.gcno' -print | xargs -r rm | |
105 | + | |
106 | +clean-local: clean-coverage | |
107 | + | |
108 | +endif # HAVE_GCOV | ... | ... |
Please
register
or
login
to post a comment