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