• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Makefile for popt library.
2
3MCCABE =	pmccabe
4
5EXTRA_DIST = autogen.sh CHANGES $(man_MANS) ci/Dockerfile build-aux popt.pdf
6
7SUBDIRS = src po tests
8
9pkgconfigdir = $(libdir)/pkgconfig
10pkgconfig_DATA = popt.pc
11
12man_MANS = popt.3
13
14BUILT_SOURCES = popt.pc # popt.lcd
15
16.PHONY: ci
17ci:
18	podman build -t popt -f ci/Dockerfile .
19	podman run -t popt
20
21.PHONY:	updatepo
22updatepo:
23	rsync -Lrtvz  translationproject.org::tp/latest/popt/  po
24
25popt.lcd: Makefile.am ${libpopt_la_SOURCES} ${include_HEADERS} ${noinst_HEADERS}
26	lclint -dump $@ ${libpopt_la_SOURCES}
27
28.PHONY:	sources
29sources:
30	@echo $(libpopt_la_SOURCES:%=popt/%)
31
32.PHONY:	mccabe
33mccabe:
34	$(MCCABE) $(libpopt_la_SOURCES) | sort -n -r | head -n 10
35
36.PHONY: doxygen
37doxygen: Doxyfile
38	rm -rf doxygen
39	mkdir -p doxygen
40	doxygen
41
42.PHONY:	lcov-reset	# run lcov from scratch, always
43lcov-reset:
44	make lcov-run
45	make lcov-report
46
47.PHONY:	lcov		# run lcov from scratch if the dir is not there
48lcov:
49	make lcov-reset
50
51.PHONY:	lcov-run	# reset run coverage tests
52lcov-run:
53	@-rm -rf lcov
54	find . -name "*.gcda" -exec rm {} \;
55	make check
56
57.PHONY:	lcov-report	# generate report based on current coverage data
58lcov-report:
59	mkdir lcov
60	lcov --directory . --capture --output-file lcov/lcov.info
61	lcov -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d: -f1 > lcov/remove
62	lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
63	rm lcov/remove
64	mv lcov/lcov.cleaned.info lcov/lcov.info
65	genhtml -t "$(PACKAGE_STRING)" -o lcov lcov/lcov.info
66
67#.PHONY:	lcov-upload
68#lcov-upload: lcov
69#	rsync -rvz -e ssh --delete lcov/* ???
70
71ACLOCAL_AMFLAGS = -I m4
72