Home | History | Annotate | Download | only in kmod
      1 SUBDIRS = . libkmod/docs
      2 
      3 if BUILD_MANPAGES
      4 SUBDIRS += man
      5 endif
      6 
      7 DISTCLEAN_LOCAL_HOOKS =
      8 EXTRA_DIST =
      9 CLEANFILES = $(BUILT_FILES)
     10 DISTCLEANFILES =
     11 BUILT_FILES =
     12 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
     13 AM_MAKEFLAGS = --no-print-directory
     14 
     15 GCC_COLORS ?= 'yes'
     16 export GCC_COLORS
     17 
     18 AM_CPPFLAGS = \
     19 	-include $(top_builddir)/config.h \
     20 	-I$(top_srcdir) \
     21 	-DSYSCONFDIR=\""$(sysconfdir)"\" \
     22 	${zlib_CFLAGS}
     23 
     24 AM_CFLAGS = $(OUR_CFLAGS)
     25 AM_LDFLAGS = $(OUR_LDFLAGS)
     26 
     27 SED_PROCESS = \
     28 	$(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
     29 	-e 's,@VERSION\@,$(VERSION),g' \
     30 	-e 's,@prefix\@,$(prefix),g' \
     31 	-e 's,@exec_prefix\@,$(exec_prefix),g' \
     32 	-e 's,@libdir\@,$(libdir),g' \
     33 	-e 's,@includedir\@,$(includedir),g' \
     34 	-e 's,@liblzma_CFLAGS\@,${liblzma_CFLAGS},g' \
     35 	-e 's,@liblzma_LIBS\@,${liblzma_LIBS},g' \
     36 	-e 's,@zlib_CFLAGS\@,${zlib_CFLAGS},g' \
     37 	-e 's,@zlib_LIBS\@,${zlib_LIBS},g' \
     38 	< $< > $@ || rm $@
     39 
     40 %.pc: %.pc.in Makefile
     41 	$(SED_PROCESS)
     42 
     43 LIBKMOD_CURRENT=5
     44 LIBKMOD_REVISION=2
     45 LIBKMOD_AGE=3
     46 
     47 noinst_LTLIBRARIES = shared/libshared.la
     48 shared_libshared_la_SOURCES = \
     49 	shared/macro.h \
     50 	shared/missing.h \
     51 	shared/array.c \
     52 	shared/array.h \
     53 	shared/hash.c \
     54 	shared/hash.h \
     55 	shared/scratchbuf.c \
     56 	shared/scratchbuf.h \
     57 	shared/strbuf.c \
     58 	shared/strbuf.h \
     59 	shared/util.c \
     60 	shared/util.h
     61 
     62 include_HEADERS = libkmod/libkmod.h
     63 lib_LTLIBRARIES = libkmod/libkmod.la
     64 
     65 libkmod_libkmod_la_SOURCES = \
     66 	libkmod/libkmod.h \
     67 	libkmod/libkmod-internal.h \
     68 	libkmod/libkmod.c \
     69 	libkmod/libkmod-list.c \
     70 	libkmod/libkmod-config.c \
     71 	libkmod/libkmod-index.c \
     72 	libkmod/libkmod-index.h \
     73 	libkmod/libkmod-module.c \
     74 	libkmod/libkmod-file.c \
     75 	libkmod/libkmod-elf.c \
     76 	libkmod/libkmod-signature.c
     77 
     78 EXTRA_DIST += libkmod/libkmod.sym
     79 EXTRA_DIST += libkmod/README \
     80 	libkmod/COPYING testsuite/COPYING tools/COPYING COPYING
     81 
     82 libkmod_libkmod_la_LDFLAGS = $(AM_LDFLAGS) \
     83 	-version-info $(LIBKMOD_CURRENT):$(LIBKMOD_REVISION):$(LIBKMOD_AGE) \
     84 	-Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
     85 libkmod_libkmod_la_DEPENDENCIES = \
     86 	shared/libshared.la \
     87 	${top_srcdir}/libkmod/libkmod.sym
     88 libkmod_libkmod_la_LIBADD = \
     89 	shared/libshared.la \
     90 	${liblzma_LIBS} ${zlib_LIBS}
     91 
     92 noinst_LTLIBRARIES += libkmod/libkmod-internal.la
     93 libkmod_libkmod_internal_la_SOURCES = $(libkmod_libkmod_la_SOURCES)
     94 libkmod_libkmod_internal_la_LDFLAGS = $(AM_LDFLAGS) \
     95 	-Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym
     96 libkmod_libkmod_internal_la_DEPENDENCIES  = $(libkmod_libkmod_la_DEPENDENCIES)
     97 libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD)
     98 
     99 pkgconfigdir = $(libdir)/pkgconfig
    100 pkgconfig_DATA = libkmod/libkmod.pc
    101 EXTRA_DIST += libkmod/libkmod.pc.in
    102 CLEANFILES += libkmod/libkmod.pc
    103 
    104 bashcompletiondir=@bashcompletiondir@
    105 dist_bashcompletion_DATA = \
    106 	shell-completion/bash/kmod
    107 
    108 install-exec-hook:
    109 	if test "$(libdir)" != "$(rootlibdir)"; then \
    110 		$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
    111 		so_img_name=$$(readlink $(DESTDIR)$(libdir)/libkmod.so) && \
    112 		so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
    113 		ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libkmod.so && \
    114 		mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \
    115 	fi
    116 
    117 uninstall-hook:
    118 	rm -f $(DESTDIR)$(rootlibdir)/libkmod.so*
    119 
    120 if BUILD_TOOLS
    121 bin_PROGRAMS = tools/kmod
    122 
    123 noinst_SCRIPTS = \
    124 	tools/insmod tools/rmmod tools/lsmod \
    125 	tools/modprobe tools/modinfo tools/depmod
    126 
    127 tools_kmod_SOURCES = \
    128 	tools/kmod.c tools/kmod.h tools/lsmod.c \
    129 	tools/rmmod.c tools/insmod.c \
    130 	tools/modinfo.c tools/modprobe.c \
    131 	tools/depmod.c tools/log.h tools/log.c \
    132 	tools/static-nodes.c
    133 
    134 if BUILD_EXPERIMENTAL
    135 tools_kmod_SOURCES += \
    136 	tools/insert.c \
    137 	tools/remove.c
    138 endif
    139 
    140 tools_kmod_LDADD = \
    141 	shared/libshared.la \
    142 	libkmod/libkmod-internal.la
    143 
    144 ${noinst_SCRIPTS}: tools/kmod
    145 	$(AM_V_GEN) ($(RM) $@; \
    146 		$(LN_S) $(notdir $<) $@)
    147 endif
    148 
    149 # ------------------------------------------------------------------------------
    150 # PYTHON BINDINGS
    151 # ------------------------------------------------------------------------------
    152 
    153 CYTHON_FLAGS_VERBOSE_ =
    154 CYTHON_FLAGS_VERBOSE_0 =
    155 CYTHON_FLAGS_VERBOSE_1 = -v
    156 CYTHON_FLAGS = $(CYTHON_FLAGS_VERBOSE_$(V))
    157 AM_V_CYTHON = $(am__v_CYTHON_$(V))
    158 am__v_CYTHON_ = $(am__v_CYTHON_$(AM_DEFAULT_VERBOSITY))
    159 am__v_CYTHON_0 = @echo "  CYTHON " $@;
    160 
    161 .pyx.c:
    162 	$(AM_V_CYTHON)$(CYTHON) -o $@ $<
    163 
    164 %.py: %.py.in Makefile
    165 	$(SED_PROCESS)
    166 
    167 # Remove some warnings for generated code
    168 PYTHON_NOWARN = -Wno-redundant-decls -Wno-shadow -Wno-strict-aliasing
    169 
    170 CPYTHON_MODULE_CFLAGS = \
    171 	$(AM_CFLAGS) -DCPYTHON_COMPILING_IN_PYPY=0 \
    172 	$(PYTHON_NOWARN) $(PYTHON_CFLAGS) \
    173 	-fvisibility=default
    174 CPYTHON_MODULE_LDFLAGS = $(AM_LDFLAGS) -module -avoid-version -shared
    175 
    176 if BUILD_PYTHON
    177 pkgpyexec_LTLIBRARIES = \
    178 	libkmod/python/kmod/kmod.la \
    179 	libkmod/python/kmod/list.la \
    180 	libkmod/python/kmod/module.la \
    181 	libkmod/python/kmod/_util.la
    182 
    183 libkmod_python_kmod_kmod_la_SOURCES = libkmod/python/kmod/kmod.c
    184 libkmod_python_kmod_kmod_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
    185 libkmod_python_kmod_kmod_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
    186 libkmod_python_kmod_kmod_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
    187 
    188 libkmod_python_kmod_list_la_SOURCES = libkmod/python/kmod/list.c
    189 libkmod_python_kmod_list_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
    190 libkmod_python_kmod_list_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
    191 libkmod_python_kmod_list_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
    192 
    193 libkmod_python_kmod_module_la_SOURCES = libkmod/python/kmod/module.c
    194 libkmod_python_kmod_module_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
    195 libkmod_python_kmod_module_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
    196 libkmod_python_kmod_module_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
    197 
    198 libkmod_python_kmod__util_la_SOURCES = libkmod/python/kmod/_util.c
    199 libkmod_python_kmod__util_la_CFLAGS = $(CPYTHON_MODULE_CFLAGS)
    200 libkmod_python_kmod__util_la_LDFLAGS = $(CPYTHON_MODULE_LDFLAGS)
    201 libkmod_python_kmod__util_la_LIBADD = $(PYTHON_LIBS) libkmod/libkmod.la
    202 
    203 BUILT_FILES += \
    204 	$(libkmod_python_kmod_kmod_la_SOURCES) \
    205 	$(libkmod_python_kmod_list_la_SOURCES) \
    206 	$(libkmod_python_kmod_module_la_SOURCES) \
    207 	$(libkmod_python_kmod__util_la_SOURCES)
    208 
    209 dist_pkgpyexec_PYTHON = \
    210 	libkmod/python/kmod/error.py \
    211 	libkmod/python/kmod/__init__.py \
    212 	libkmod/python/kmod/version.py
    213 
    214 BUILT_FILES += libkmod/python/kmod/version.py
    215 
    216 endif
    217 # ------------------------------------------------------------------------------
    218 # TESTSUITE
    219 # ------------------------------------------------------------------------------
    220 
    221 EXTRA_DIST += testsuite/populate-modules.sh
    222 
    223 MODULE_PLAYGROUND = testsuite/module-playground
    224 ROOTFS = testsuite/rootfs
    225 ROOTFS_PRISTINE = $(top_srcdir)/testsuite/rootfs-pristine
    226 CREATE_ROOTFS = $(AM_V_GEN) ( $(RM) -rf $(ROOTFS) && mkdir -p $(dir $(ROOTFS)) && \
    227 				cp -r $(ROOTFS_PRISTINE) $(ROOTFS) && \
    228 				find $(ROOTFS) -type d -exec chmod +w {} \; && \
    229 				find $(ROOTFS) -type f -name .gitignore -exec rm -f {} \; && \
    230 				$(top_srcdir)/testsuite/populate-modules.sh \
    231 					$(MODULE_PLAYGROUND) $(ROOTFS) ) && \
    232 				touch testsuite/stamp-rootfs
    233 
    234 build-module-playground:
    235 	$(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \
    236 		$(RM) -rf testsuite/module-playground && \
    237 		cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \
    238 		find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \
    239 		fi
    240 if BUILD_MODULES
    241 	$(MAKE) -C $(MODULE_PLAYGROUND)
    242 else
    243 	$(MAKE) -C $(MODULE_PLAYGROUND) FAKE_BUILD=1
    244 endif
    245 
    246 
    247 rootfs: build-module-playground
    248 	$(CREATE_ROOTFS)
    249 
    250 .PHONY: rootfs build-playground
    251 
    252 $(ROOTFS): $(ROOTFS_PRISTINE)
    253 	$(CREATE_ROOTFS)
    254 
    255 TESTSUITE_OVERRIDE_LIBS = \
    256 	testsuite/uname.la testsuite/path.la \
    257 	testsuite/init_module.la \
    258 	testsuite/delete_module.la
    259 TESTSUITE_OVERRIDE_LIBS_LDFLAGS = \
    260 	avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl
    261 
    262 check-sysconfdir:
    263 	$(AM_V_at)if test "$(sysconfdir)" != "/etc" -a "$(sysconfdir)" != "/etc/"; then \
    264 		echo "warning: Some tests will fail without --sysconfdir=/etc" >&2; \
    265 	fi
    266 .PHONY: check-sysconfdir
    267 
    268 check-am: rootfs check-sysconfdir
    269 
    270 
    271 EXTRA_DIST += \
    272 	testsuite/module-playground/cache \
    273 	testsuite/module-playground/dummy.sha1 \
    274 	testsuite/module-playground/dummy.sha256 \
    275 	testsuite/module-playground/Makefile \
    276 	testsuite/module-playground/Makefile.arch \
    277 	testsuite/module-playground/mod-fake-cciss.c \
    278 	testsuite/module-playground/mod-fake-hpsa.c \
    279 	testsuite/module-playground/mod-fake-scsi-mod.c \
    280 	testsuite/module-playground/mod-foo-a.c \
    281 	testsuite/module-playground/mod-foo-b.c \
    282 	testsuite/module-playground/mod-foo.c \
    283 	testsuite/module-playground/mod-foo-c.c \
    284 	testsuite/module-playground/mod-loop-a.c \
    285 	testsuite/module-playground/mod-loop-b.c \
    286 	testsuite/module-playground/mod-loop-c.c \
    287 	testsuite/module-playground/mod-loop-d.c \
    288 	testsuite/module-playground/mod-loop-e.c \
    289 	testsuite/module-playground/mod-loop-f.c \
    290 	testsuite/module-playground/mod-loop-g.c \
    291 	testsuite/module-playground/mod-loop-h.c \
    292 	testsuite/module-playground/mod-loop-i.c \
    293 	testsuite/module-playground/mod-loop-j.c \
    294 	testsuite/module-playground/mod-loop-k.c \
    295 	testsuite/module-playground/mod-loop.h \
    296 	testsuite/module-playground/mod-simple.c \
    297 	testsuite/module-playground/mod-simple-i386.ko \
    298 	testsuite/module-playground/mod-simple-sparc64.ko \
    299 	testsuite/module-playground/mod-simple-x86_64.ko \
    300 	testsuite/module-playground/README
    301 
    302 check_LTLIBRARIES = $(TESTSUITE_OVERRIDE_LIBS)
    303 
    304 testsuite_uname_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
    305 testsuite_path_la_CPPFLAGS = $(AM_CPPFLAGS) \
    306 	-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"
    307 testsuite_path_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
    308 
    309 testsuite_delete_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
    310 testsuite_init_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS)
    311 testsuite_init_module_la_SOURCES = testsuite/init_module.c \
    312 				   testsuite/stripped-module.h
    313 testsuite_init_module_la_LIBADD = libkmod/libkmod-internal.la
    314 
    315 TESTSUITE_CPPFLAGS = $(AM_CPPFLAGS) \
    316 	-DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/$(ROOTFS)/\" \
    317 	-DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\"
    318 TESTSUITE_LDADD = \
    319 	testsuite/libtestsuite.la libkmod/libkmod-internal.la \
    320 	shared/libshared.la
    321 
    322 check_LTLIBRARIES += testsuite/libtestsuite.la
    323 testsuite_libtestsuite_la_SOURCES = \
    324 	testsuite/testsuite.c testsuite/testsuite.h
    325 testsuite_libtestsuite_la_DEPENDENCIES = \
    326 	$(ROOTFS) $(TESTSUITE_OVERRIDE_LIBS)
    327 testsuite_libtestsuite_la_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    328 testsuite_libtestsuite_la_LIBADD = -lrt
    329 
    330 TESTSUITE = \
    331 	testsuite/test-hash \
    332 	testsuite/test-array \
    333 	testsuite/test-scratchbuf \
    334 	testsuite/test-strbuf \
    335 	testsuite/test-init \
    336 	testsuite/test-initstate \
    337 	testsuite/test-testsuite testsuite/test-loaded \
    338 	testsuite/test-modinfo testsuite/test-util testsuite/test-new-module \
    339 	testsuite/test-modprobe testsuite/test-blacklist \
    340 	testsuite/test-dependencies testsuite/test-depmod \
    341 	testsuite/test-list
    342 
    343 if BUILD_EXPERIMENTAL
    344 TESTSUITE += \
    345 	testsuite/test-tools
    346 endif
    347 
    348 check_PROGRAMS = $(TESTSUITE)
    349 TESTS = $(TESTSUITE)
    350 
    351 testsuite_test_testsuite_LDADD = \
    352 	testsuite/libtestsuite.la shared/libshared.la
    353 testsuite_test_testsuite_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    354 
    355 testsuite_test_hash_LDADD = $(TESTSUITE_LDADD)
    356 testsuite_test_hash_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    357 
    358 testsuite_test_array_LDADD = $(TESTSUITE_LDADD)
    359 testsuite_test_array_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    360 
    361 testsuite_test_scratchbuf_LDADD = $(TESTSUITE_LDADD)
    362 testsuite_test_scratchbuf_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    363 
    364 testsuite_test_strbuf_LDADD = $(TESTSUITE_LDADD)
    365 testsuite_test_strbuf_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    366 
    367 testsuite_test_init_LDADD = $(TESTSUITE_LDADD)
    368 testsuite_test_init_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    369 testsuite_test_initstate_LDADD = $(TESTSUITE_LDADD)
    370 testsuite_test_initstate_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    371 testsuite_test_loaded_LDADD = $(TESTSUITE_LDADD)
    372 testsuite_test_loaded_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    373 testsuite_test_modinfo_LDADD = $(TESTSUITE_LDADD)
    374 testsuite_test_modinfo_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    375 testsuite_test_util_LDADD = $(TESTSUITE_LDADD)
    376 testsuite_test_util_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    377 testsuite_test_new_module_LDADD = $(TESTSUITE_LDADD)
    378 testsuite_test_new_module_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    379 testsuite_test_modprobe_LDADD = $(TESTSUITE_LDADD)
    380 testsuite_test_modprobe_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    381 testsuite_test_blacklist_LDADD = $(TESTSUITE_LDADD)
    382 testsuite_test_blacklist_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    383 testsuite_test_dependencies_LDADD = $(TESTSUITE_LDADD)
    384 testsuite_test_dependencies_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    385 testsuite_test_depmod_LDADD = $(TESTSUITE_LDADD)
    386 testsuite_test_depmod_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    387 testsuite_test_list_LDADD = $(TESTSUITE_LDADD)
    388 testsuite_test_list_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    389 
    390 if BUILD_EXPERIMENTAL
    391 testsuite_test_tools_LDADD = $(TESTSUITE_LDADD)
    392 testsuite_test_tools_CPPFLAGS = $(TESTSUITE_CPPFLAGS)
    393 endif
    394 
    395 testsuite-distclean:
    396 	$(RM) -r $(ROOTFS)
    397 	$(RM) testsuite/stamp-rootfs
    398 	$(MAKE) -C testsuite/module-playground/ clean
    399 	if test "$(top_srcdir)" != "$(top_builddir)"; then \
    400 		$(RM) -rf testsuite/module-playground; \
    401 	fi
    402 
    403 DISTCLEAN_LOCAL_HOOKS += testsuite-distclean
    404 EXTRA_DIST += testsuite/rootfs-pristine
    405 
    406 DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --enable-python --sysconfdir=/etc \
    407 	--with-zlib \
    408 	--with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir)
    409 
    410 distclean-local: $(DISTCLEAN_LOCAL_HOOKS)
    411 
    412 buildtest-TESTS:
    413 	$(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS)
    414 
    415 DISTCLEANFILES += $(DOLT_CLEANFILES)
    416 
    417 # ------------------------------------------------------------------------------
    418 # coverage
    419 # ------------------------------------------------------------------------------
    420 
    421 # .PHONY so it always rebuilds it
    422 .PHONY: coverage lcov-run lcov-report coverage-sync
    423 
    424 # run lcov from scratch, always
    425 coverage: all
    426 	$(MAKE) lcov-run
    427 	$(MAKE) lcov-report
    428 
    429 coverage_dir = coverage
    430 coverage_opts = --base-directory $(srcdir) --directory $(builddir) \
    431 		--rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))'
    432 
    433 if ENABLE_COVERAGE
    434 # reset run coverage tests
    435 lcov-run:
    436 	@rm -rf $(coverage_dir)
    437 	lcov $(coverage_opts) --zerocounters
    438 	-$(MAKE) check
    439 
    440 # generate report based on current coverage data
    441 lcov-report:
    442 	$(MKDIR_P) $(coverage_dir)
    443 	lcov $(coverage_opts) --capture --no-external --ignore-errors graph \
    444 		| sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info
    445 	lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*'
    446 	genhtml -t "kmod test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info
    447 	@echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html"
    448 
    449 else
    450 
    451 lcov-run lcov-report:
    452 	echo "Need to reconfigure with --enable-coverage"
    453 
    454 endif
    455 
    456 # ------------------------------------------------------------------------------
    457 # coverity
    458 # ------------------------------------------------------------------------------
    459 
    460 kmod-coverity-%.tar.xz:
    461 	rm -rf $< cov-int
    462 	./bootstrap-configure --disable-python --disable-manpages
    463 	make clean
    464 	cov-build --dir cov-int make -j 4
    465 	tar caf $@ cov-int
    466 
    467 coverity-tar: kmod-coverity-$(shell git describe  2>/dev/null).tar.xz
    468 
    469 coverity-sync: kmod-coverity-$(shell git describe 2>/dev/null).tar.xz
    470 	@echo "uploading coverity tarball"
    471 	@curl --form token=$(COVERITY_KMOD_TOKEN) \
    472 		--form email=lucas.de.marchi (a] gmail.com \
    473 		--form file=@$< \
    474 		--form version="$(shell git describe)" \
    475 		--form description="" \
    476 		https://scan.coverity.com/builds?project=kmod
    477 
    478 coverity-clean:
    479 	rm -rf kmod-coverity-*.tar.xz cov-int
    480 
    481 # ------------------------------------------------------------------------------
    482 # custom release helpers
    483 # ------------------------------------------------------------------------------
    484 
    485 git-release:
    486 	head -1 NEWS | grep -q "kmod $(VERSION)"
    487 	git commit -a -m "kmod $(VERSION)"
    488 	git tag -m "kmod $(VERSION)" -s v$(VERSION)
    489 	git gc --prune=0
    490 
    491 kmod-$(VERSION).tar.xz:
    492 	make distcheck
    493 
    494 kmod-$(VERSION).tar.sign:
    495 	xz -d -c kmod-$(VERSION).tar.xz | gpg --armor --detach-sign --output kmod-$(VERSION).tar.sign
    496 
    497 tar: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign
    498 
    499 tar-sync: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign
    500 	kup put kmod-$(VERSION).tar.xz  kmod-$(VERSION).tar.sign /pub/linux/utils/kernel/kmod/
    501