]>
Commit | Line | Data |
---|---|---|
8631552d CW |
1 | SUBDIRS = . libkmod/docs |
2 | ||
3 | if BUILD_MANPAGES | |
4 | SUBDIRS += man | |
5 | endif | |
646b83b8 | 6 | |
6afc9cd6 | 7 | DISTCLEAN_LOCAL_HOOKS = |
85ece204 | 8 | EXTRA_DIST = |
3a33a7a5 | 9 | CLEANFILES = $(BUILT_FILES) |
9cc8a20d | 10 | DISTCLEANFILES = |
3a33a7a5 | 11 | BUILT_FILES = |
ecd40ee4 LDM |
12 | ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} |
13 | AM_MAKEFLAGS = --no-print-directory | |
14 | ||
fd56638a MA |
15 | GCC_COLORS ?= 'yes' |
16 | export GCC_COLORS | |
17 | ||
ecd40ee4 LDM |
18 | AM_CPPFLAGS = \ |
19 | -include $(top_builddir)/config.h \ | |
576dd439 | 20 | -I$(top_srcdir) \ |
ecd40ee4 | 21 | -DSYSCONFDIR=\""$(sysconfdir)"\" \ |
8463809f | 22 | -DDISTCONFDIR=\""$(distconfdir)"\" \ |
9d1fb317 | 23 | -DMODULE_DIRECTORY=\""$(module_directory)"\" \ |
7b3a74fc | 24 | ${zlib_CFLAGS} |
ecd40ee4 | 25 | |
84aaaedf LDM |
26 | AM_CFLAGS = $(OUR_CFLAGS) |
27 | AM_LDFLAGS = $(OUR_LDFLAGS) | |
ecd40ee4 | 28 | |
d977b0da LDM |
29 | # Rules for libtool versioning (from https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html) |
30 | # 1. Start with version information of ‘0:0:0’ for each libtool library. | |
31 | # 2. Update the version information only immediately before a public release of | |
32 | # your software. More frequent updates are unnecessary, and only guarantee that | |
33 | # the current interface number gets larger faster. | |
34 | # 3. If the library source code has changed at all since the last update, then | |
35 | # increment revision (‘c:r:a’ becomes ‘c:r+1:a’). | |
36 | # 4. If any interfaces have been added, removed, or changed since the last | |
37 | # update, increment current, and set revision to 0. | |
38 | # 5. If any interfaces have been added since the last public release, then | |
39 | # increment age. | |
40 | # 6. If any interfaces have been removed or changed since the last public | |
41 | # release, then set age to 0. | |
5d46434a | 42 | LIBKMOD_CURRENT=6 |
aff617ea | 43 | LIBKMOD_REVISION=1 |
5d46434a | 44 | LIBKMOD_AGE=4 |
ecd40ee4 | 45 | |
2c5bc218 LDM |
46 | noinst_LTLIBRARIES = shared/libshared.la |
47 | shared_libshared_la_SOURCES = \ | |
8eded79c | 48 | shared/macro.h \ |
74d1df66 LDM |
49 | shared/missing.h \ |
50 | shared/array.c \ | |
51 | shared/array.h \ | |
0db718ed LDM |
52 | shared/hash.c \ |
53 | shared/hash.h \ | |
780a4e97 | 54 | shared/scratchbuf.c \ |
527658ad | 55 | shared/scratchbuf.h \ |
b4d1f44a LDM |
56 | shared/strbuf.c \ |
57 | shared/strbuf.h \ | |
8eded79c | 58 | shared/util.c \ |
f4e8c162 | 59 | shared/util.h |
529148ea | 60 | |
586fc304 LDM |
61 | include_HEADERS = libkmod/libkmod.h |
62 | lib_LTLIBRARIES = libkmod/libkmod.la | |
ecd40ee4 | 63 | |
8eded79c | 64 | libkmod_libkmod_la_SOURCES = \ |
586fc304 | 65 | libkmod/libkmod.h \ |
83b855a6 | 66 | libkmod/libkmod-internal.h \ |
6924e47a | 67 | libkmod/libkmod.c \ |
60084cf1 | 68 | libkmod/libkmod-builtin.c \ |
5369797d | 69 | libkmod/libkmod-list.c \ |
7c2ab358 | 70 | libkmod/libkmod-config.c \ |
e8847fd2 LDM |
71 | libkmod/libkmod-index.c \ |
72 | libkmod/libkmod-index.h \ | |
3d8226ed | 73 | libkmod/libkmod-module.c \ |
708624a4 | 74 | libkmod/libkmod-file.c \ |
8fe1681c MM |
75 | libkmod/libkmod-elf.c \ |
76 | libkmod/libkmod-signature.c | |
ecd40ee4 | 77 | |
586fc304 | 78 | EXTRA_DIST += libkmod/libkmod.sym |
1a07559a LDM |
79 | EXTRA_DIST += libkmod/README \ |
80 | libkmod/COPYING testsuite/COPYING tools/COPYING COPYING | |
ecd40ee4 | 81 | |
586fc304 LDM |
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 | |
8eded79c | 85 | libkmod_libkmod_la_DEPENDENCIES = \ |
2c5bc218 | 86 | shared/libshared.la \ |
8eded79c LDM |
87 | ${top_srcdir}/libkmod/libkmod.sym |
88 | libkmod_libkmod_la_LIBADD = \ | |
2c5bc218 | 89 | shared/libshared.la \ |
3821e197 | 90 | ${libzstd_LIBS} ${liblzma_LIBS} ${zlib_LIBS} ${libcrypto_LIBS} |
ecd40ee4 | 91 | |
83b855a6 LDM |
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) \ | |
39baaec1 | 95 | -Wl,--version-script=$(top_srcdir)/libkmod/libkmod.sym |
83b855a6 LDM |
96 | libkmod_libkmod_internal_la_DEPENDENCIES = $(libkmod_libkmod_la_DEPENDENCIES) |
97 | libkmod_libkmod_internal_la_LIBADD = $(libkmod_libkmod_la_LIBADD) | |
39baaec1 | 98 | |
ecd40ee4 | 99 | pkgconfigdir = $(libdir)/pkgconfig |
ecef7c13 | 100 | pkgconfig_DATA = libkmod/libkmod.pc tools/kmod.pc |
ecd40ee4 | 101 | |
80cf2c8f LDM |
102 | bashcompletiondir=@bashcompletiondir@ |
103 | dist_bashcompletion_DATA = \ | |
104 | shell-completion/bash/kmod | |
105 | ||
e79bf83b KS |
106 | install-exec-hook: |
107 | if test "$(libdir)" != "$(rootlibdir)"; then \ | |
6a4fa8d8 | 108 | $(MKDIR_P) $(DESTDIR)$(rootlibdir) && \ |
e79bf83b | 109 | so_img_name=$$(readlink $(DESTDIR)$(libdir)/libkmod.so) && \ |
90a6e798 | 110 | so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \ |
e79bf83b KS |
111 | ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libkmod.so && \ |
112 | mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \ | |
113 | fi | |
114 | ||
115 | uninstall-hook: | |
116 | rm -f $(DESTDIR)$(rootlibdir)/libkmod.so* | |
117 | ||
72c51a9e | 118 | if BUILD_TOOLS |
8d75053e LDM |
119 | bin_PROGRAMS = tools/kmod |
120 | ||
8eded79c LDM |
121 | noinst_SCRIPTS = \ |
122 | tools/insmod tools/rmmod tools/lsmod \ | |
123 | tools/modprobe tools/modinfo tools/depmod | |
8900b916 | 124 | |
8eded79c LDM |
125 | tools_kmod_SOURCES = \ |
126 | tools/kmod.c tools/kmod.h tools/lsmod.c \ | |
127 | tools/rmmod.c tools/insmod.c \ | |
128 | tools/modinfo.c tools/modprobe.c \ | |
129 | tools/depmod.c tools/log.h tools/log.c \ | |
130 | tools/static-nodes.c | |
013e8550 LDM |
131 | |
132 | if BUILD_EXPERIMENTAL | |
133 | tools_kmod_SOURCES += \ | |
134 | tools/insert.c \ | |
135 | tools/remove.c | |
136 | endif | |
137 | ||
8eded79c | 138 | tools_kmod_LDADD = \ |
2c5bc218 | 139 | shared/libshared.la \ |
8eded79c | 140 | libkmod/libkmod-internal.la |
00fc926c | 141 | |
b6adccd6 | 142 | ${noinst_SCRIPTS}: tools/kmod |
00fc926c LDM |
143 | $(AM_V_GEN) ($(RM) $@; \ |
144 | $(LN_S) $(notdir $<) $@) | |
72c51a9e GSB |
145 | endif |
146 | ||
6afc9cd6 LDM |
147 | # ------------------------------------------------------------------------------ |
148 | # TESTSUITE | |
149 | # ------------------------------------------------------------------------------ | |
150 | ||
184a0707 | 151 | EXTRA_DIST += testsuite/setup-rootfs.sh |
4002d77a LDM |
152 | |
153 | MODULE_PLAYGROUND = testsuite/module-playground | |
e2ee7d9b | 154 | ROOTFS = testsuite/rootfs |
0de690c9 | 155 | ROOTFS_PRISTINE = $(top_srcdir)/testsuite/rootfs-pristine |
9d1fb317 | 156 | CREATE_ROOTFS = $(AM_V_GEN) MODULE_DIRECTORY=$(module_directory) $(top_srcdir)/testsuite/setup-rootfs.sh $(ROOTFS_PRISTINE) $(ROOTFS) $(MODULE_PLAYGROUND) $(top_builddir)/config.h $(sysconfdir) |
4002d77a LDM |
157 | |
158 | build-module-playground: | |
159 | $(AM_V_GEN)if test "$(top_srcdir)" != "$(top_builddir)"; then \ | |
160 | $(RM) -rf testsuite/module-playground && \ | |
09ad8605 | 161 | mkdir -p testsuite/ && \ |
4002d77a LDM |
162 | cp -r $(top_srcdir)/$(MODULE_PLAYGROUND) $(top_builddir)/$(MODULE_PLAYGROUND) && \ |
163 | find $(top_builddir)/$(MODULE_PLAYGROUND) -type d -exec chmod +w {} \; ; \ | |
164 | fi | |
23603f1f | 165 | if BUILD_MODULES |
4002d77a | 166 | $(MAKE) -C $(MODULE_PLAYGROUND) |
23603f1f LDM |
167 | else |
168 | $(MAKE) -C $(MODULE_PLAYGROUND) FAKE_BUILD=1 | |
169 | endif | |
170 | ||
4002d77a LDM |
171 | |
172 | rootfs: build-module-playground | |
0de690c9 | 173 | $(CREATE_ROOTFS) |
4002d77a LDM |
174 | |
175 | .PHONY: rootfs build-playground | |
0de690c9 LDM |
176 | |
177 | $(ROOTFS): $(ROOTFS_PRISTINE) | |
178 | $(CREATE_ROOTFS) | |
452c1dde | 179 | |
8eded79c LDM |
180 | TESTSUITE_OVERRIDE_LIBS = \ |
181 | testsuite/uname.la testsuite/path.la \ | |
182 | testsuite/init_module.la \ | |
183 | testsuite/delete_module.la | |
184 | TESTSUITE_OVERRIDE_LIBS_LDFLAGS = \ | |
185 | avoid-version -module -shared -export-dynamic -rpath /nowhere -ldl | |
68cc4493 | 186 | |
847247a4 | 187 | check-am: rootfs |
9324bb52 | 188 | |
2588e3df | 189 | |
80f6ab5c | 190 | EXTRA_DIST += \ |
fc1bc815 | 191 | testsuite/module-playground/cache \ |
9a015bcd | 192 | testsuite/module-playground/dummy.pkcs7 \ |
80f6ab5c LDM |
193 | testsuite/module-playground/dummy.sha1 \ |
194 | testsuite/module-playground/dummy.sha256 \ | |
195 | testsuite/module-playground/Makefile \ | |
196 | testsuite/module-playground/Makefile.arch \ | |
197 | testsuite/module-playground/mod-fake-cciss.c \ | |
198 | testsuite/module-playground/mod-fake-hpsa.c \ | |
199 | testsuite/module-playground/mod-fake-scsi-mod.c \ | |
200 | testsuite/module-playground/mod-foo-a.c \ | |
201 | testsuite/module-playground/mod-foo-b.c \ | |
202 | testsuite/module-playground/mod-foo.c \ | |
203 | testsuite/module-playground/mod-foo-c.c \ | |
204 | testsuite/module-playground/mod-loop-a.c \ | |
205 | testsuite/module-playground/mod-loop-b.c \ | |
206 | testsuite/module-playground/mod-loop-c.c \ | |
207 | testsuite/module-playground/mod-loop-d.c \ | |
208 | testsuite/module-playground/mod-loop-e.c \ | |
67d15343 LDM |
209 | testsuite/module-playground/mod-loop-f.c \ |
210 | testsuite/module-playground/mod-loop-g.c \ | |
9be03c52 YK |
211 | testsuite/module-playground/mod-loop-h.c \ |
212 | testsuite/module-playground/mod-loop-i.c \ | |
213 | testsuite/module-playground/mod-loop-j.c \ | |
214 | testsuite/module-playground/mod-loop-k.c \ | |
80f6ab5c LDM |
215 | testsuite/module-playground/mod-loop.h \ |
216 | testsuite/module-playground/mod-simple.c \ | |
217 | testsuite/module-playground/mod-simple-i386.ko \ | |
218 | testsuite/module-playground/mod-simple-sparc64.ko \ | |
219 | testsuite/module-playground/mod-simple-x86_64.ko \ | |
220 | testsuite/module-playground/README | |
4002d77a | 221 | |
d2c2b8b5 | 222 | check_LTLIBRARIES = $(TESTSUITE_OVERRIDE_LIBS) |
68cc4493 | 223 | |
d2c2b8b5 | 224 | testsuite_uname_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
8ff7f008 LDM |
225 | testsuite_path_la_CPPFLAGS = $(AM_CPPFLAGS) \ |
226 | -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\" | |
d2c2b8b5 | 227 | testsuite_path_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
6afc9cd6 | 228 | |
f6ef5d6b | 229 | testsuite_delete_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
d2c2b8b5 LDM |
230 | testsuite_init_module_la_LDFLAGS = $(TESTSUITE_OVERRIDE_LIBS_LDFLAGS) |
231 | testsuite_init_module_la_SOURCES = testsuite/init_module.c \ | |
d48b8a79 | 232 | testsuite/stripped-module.h |
83b855a6 | 233 | testsuite_init_module_la_LIBADD = libkmod/libkmod-internal.la |
6afc9cd6 | 234 | |
6b88ef3e | 235 | TESTSUITE_CPPFLAGS = $(AM_CPPFLAGS) \ |
8eded79c LDM |
236 | -DTESTSUITE_ROOTFS=\"$(abs_top_builddir)/$(ROOTFS)/\" \ |
237 | -DABS_TOP_BUILDDIR=\"$(abs_top_builddir)\" | |
238 | TESTSUITE_LDADD = \ | |
239 | testsuite/libtestsuite.la libkmod/libkmod-internal.la \ | |
2c5bc218 | 240 | shared/libshared.la |
6b88ef3e | 241 | |
d2c2b8b5 | 242 | check_LTLIBRARIES += testsuite/libtestsuite.la |
8eded79c LDM |
243 | testsuite_libtestsuite_la_SOURCES = \ |
244 | testsuite/testsuite.c testsuite/testsuite.h | |
245 | testsuite_libtestsuite_la_DEPENDENCIES = \ | |
246 | $(ROOTFS) $(TESTSUITE_OVERRIDE_LIBS) | |
6b88ef3e | 247 | testsuite_libtestsuite_la_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
b8e344a6 | 248 | testsuite_libtestsuite_la_LIBADD = -lrt |
646b83b8 | 249 | |
8eded79c LDM |
250 | TESTSUITE = \ |
251 | testsuite/test-hash \ | |
fdafa6b6 | 252 | testsuite/test-array \ |
780a4e97 | 253 | testsuite/test-scratchbuf \ |
48e4d181 | 254 | testsuite/test-strbuf \ |
dbf90dc3 LDM |
255 | testsuite/test-init \ |
256 | testsuite/test-initstate \ | |
257 | testsuite/test-testsuite testsuite/test-loaded \ | |
8eded79c LDM |
258 | testsuite/test-modinfo testsuite/test-util testsuite/test-new-module \ |
259 | testsuite/test-modprobe testsuite/test-blacklist \ | |
2200a448 | 260 | testsuite/test-dependencies testsuite/test-depmod \ |
013e8550 LDM |
261 | testsuite/test-list |
262 | ||
263 | if BUILD_EXPERIMENTAL | |
264 | TESTSUITE += \ | |
03761881 | 265 | testsuite/test-tools |
013e8550 | 266 | endif |
b0c9fc85 | 267 | |
eebca81e LDM |
268 | check_PROGRAMS = $(TESTSUITE) |
269 | TESTS = $(TESTSUITE) | |
270 | ||
8eded79c | 271 | testsuite_test_testsuite_LDADD = \ |
2c5bc218 | 272 | testsuite/libtestsuite.la shared/libshared.la |
6b88ef3e | 273 | testsuite_test_testsuite_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
5963c36d LDM |
274 | |
275 | testsuite_test_hash_LDADD = $(TESTSUITE_LDADD) | |
276 | testsuite_test_hash_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
277 | ||
fdafa6b6 LDM |
278 | testsuite_test_array_LDADD = $(TESTSUITE_LDADD) |
279 | testsuite_test_array_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
280 | ||
780a4e97 LDM |
281 | testsuite_test_scratchbuf_LDADD = $(TESTSUITE_LDADD) |
282 | testsuite_test_scratchbuf_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
283 | ||
48e4d181 LDM |
284 | testsuite_test_strbuf_LDADD = $(TESTSUITE_LDADD) |
285 | testsuite_test_strbuf_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
286 | ||
d35e8832 DM |
287 | testsuite_test_init_LDADD = $(TESTSUITE_LDADD) |
288 | testsuite_test_init_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
dbf90dc3 LDM |
289 | testsuite_test_initstate_LDADD = $(TESTSUITE_LDADD) |
290 | testsuite_test_initstate_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
d35e8832 | 291 | testsuite_test_loaded_LDADD = $(TESTSUITE_LDADD) |
61e9433f | 292 | testsuite_test_loaded_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
d35e8832 | 293 | testsuite_test_modinfo_LDADD = $(TESTSUITE_LDADD) |
95daea07 | 294 | testsuite_test_modinfo_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
807c601d LDM |
295 | testsuite_test_util_LDADD = $(TESTSUITE_LDADD) |
296 | testsuite_test_util_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
d35e8832 | 297 | testsuite_test_new_module_LDADD = $(TESTSUITE_LDADD) |
a9474303 | 298 | testsuite_test_new_module_CPPFLAGS = $(TESTSUITE_CPPFLAGS) |
976ea8c3 LDM |
299 | testsuite_test_modprobe_LDADD = $(TESTSUITE_LDADD) |
300 | testsuite_test_modprobe_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
bcca1b95 DM |
301 | testsuite_test_blacklist_LDADD = $(TESTSUITE_LDADD) |
302 | testsuite_test_blacklist_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
c88aec70 DM |
303 | testsuite_test_dependencies_LDADD = $(TESTSUITE_LDADD) |
304 | testsuite_test_dependencies_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
b0c9fc85 LDM |
305 | testsuite_test_depmod_LDADD = $(TESTSUITE_LDADD) |
306 | testsuite_test_depmod_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
2200a448 CMOF |
307 | testsuite_test_list_LDADD = $(TESTSUITE_LDADD) |
308 | testsuite_test_list_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
013e8550 LDM |
309 | |
310 | if BUILD_EXPERIMENTAL | |
03761881 CMOF |
311 | testsuite_test_tools_LDADD = $(TESTSUITE_LDADD) |
312 | testsuite_test_tools_CPPFLAGS = $(TESTSUITE_CPPFLAGS) | |
013e8550 | 313 | endif |
eebca81e | 314 | |
452c1dde | 315 | testsuite-distclean: |
86bbd053 DR |
316 | $(RM) -r $(ROOTFS) |
317 | $(RM) testsuite/stamp-rootfs | |
4002d77a LDM |
318 | $(MAKE) -C testsuite/module-playground/ clean |
319 | if test "$(top_srcdir)" != "$(top_builddir)"; then \ | |
320 | $(RM) -rf testsuite/module-playground; \ | |
321 | fi | |
452c1dde LDM |
322 | |
323 | DISTCLEAN_LOCAL_HOOKS += testsuite-distclean | |
e2ee7d9b | 324 | EXTRA_DIST += testsuite/rootfs-pristine |
9c41596e | 325 | |
594f102c | 326 | DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc --sysconfdir=/etc \ |
d83f488c | 327 | --with-zlib --with-zstd --with-openssl \ |
80cf2c8f | 328 | --with-bashcompletiondir=$$dc_install_base/$(bashcompletiondir) |
f4647b63 | 329 | |
6afc9cd6 | 330 | distclean-local: $(DISTCLEAN_LOCAL_HOOKS) |
f4647b63 | 331 | |
16535abe SW |
332 | buildtest-TESTS: |
333 | $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES) $(check_PROGRAMS) | |
334 | ||
e9b0d1b4 LDM |
335 | # ------------------------------------------------------------------------------ |
336 | # coverage | |
337 | # ------------------------------------------------------------------------------ | |
338 | ||
339 | # .PHONY so it always rebuilds it | |
340 | .PHONY: coverage lcov-run lcov-report coverage-sync | |
341 | ||
342 | # run lcov from scratch, always | |
343 | coverage: all | |
344 | $(MAKE) lcov-run | |
345 | $(MAKE) lcov-report | |
346 | ||
347 | coverage_dir = coverage | |
348 | coverage_opts = --base-directory $(srcdir) --directory $(builddir) \ | |
349 | --rc 'geninfo_adjust_src_path=$(abspath $(srcdir))=>$(abspath $(builddir))' | |
350 | ||
351 | if ENABLE_COVERAGE | |
352 | # reset run coverage tests | |
353 | lcov-run: | |
354 | @rm -rf $(coverage_dir) | |
355 | lcov $(coverage_opts) --zerocounters | |
356 | -$(MAKE) check | |
357 | ||
358 | # generate report based on current coverage data | |
359 | lcov-report: | |
360 | $(MKDIR_P) $(coverage_dir) | |
361 | lcov $(coverage_opts) --capture --no-external --ignore-errors graph \ | |
362 | | sed 's|$(abspath $(builddir))|$(abspath $(srcdir))|' > $(coverage_dir)/.lcov.info | |
363 | lcov --remove $(coverage_dir)/.lcov.info --output-file $(coverage_dir)/.lcov-clean.info 'test-*' | |
364 | genhtml -t "kmod test coverage" -o $(coverage_dir) $(coverage_dir)/.lcov-clean.info | |
365 | @echo "Coverage report generated in $(abs_builddir)/$(coverage_dir)/index.html" | |
366 | ||
367 | else | |
368 | ||
369 | lcov-run lcov-report: | |
370 | echo "Need to reconfigure with --enable-coverage" | |
371 | ||
372 | endif | |
373 | ||
0bcdef97 LDM |
374 | # ------------------------------------------------------------------------------ |
375 | # coverity | |
376 | # ------------------------------------------------------------------------------ | |
377 | ||
378 | kmod-coverity-%.tar.xz: | |
379 | rm -rf $< cov-int | |
594f102c | 380 | ./autogen.sh c --disable-manpages |
0bcdef97 LDM |
381 | make clean |
382 | cov-build --dir cov-int make -j 4 | |
383 | tar caf $@ cov-int | |
384 | ||
681c623e | 385 | coverity-tar: kmod-coverity-$(shell git describe 2>/dev/null).tar.xz |
0bcdef97 | 386 | |
681c623e | 387 | coverity-sync: kmod-coverity-$(shell git describe 2>/dev/null).tar.xz |
0bcdef97 LDM |
388 | @echo "uploading coverity tarball" |
389 | @curl --form token=$(COVERITY_KMOD_TOKEN) \ | |
390 | --form email=lucas.de.marchi@gmail.com \ | |
391 | --form file=@$< \ | |
392 | --form version="$(shell git describe)" \ | |
393 | --form description="" \ | |
394 | https://scan.coverity.com/builds?project=kmod | |
395 | ||
396 | coverity-clean: | |
397 | rm -rf kmod-coverity-*.tar.xz cov-int | |
398 | ||
f4647b63 LDM |
399 | # ------------------------------------------------------------------------------ |
400 | # custom release helpers | |
401 | # ------------------------------------------------------------------------------ | |
402 | ||
403 | git-release: | |
404 | head -1 NEWS | grep -q "kmod $(VERSION)" | |
405 | git commit -a -m "kmod $(VERSION)" | |
406 | git tag -m "kmod $(VERSION)" -s v$(VERSION) | |
407 | git gc --prune=0 | |
408 | ||
409 | kmod-$(VERSION).tar.xz: | |
410 | make distcheck | |
411 | ||
412 | kmod-$(VERSION).tar.sign: | |
413 | xz -d -c kmod-$(VERSION).tar.xz | gpg --armor --detach-sign --output kmod-$(VERSION).tar.sign | |
414 | ||
415 | tar: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign | |
416 | ||
417 | tar-sync: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign | |
bb05bc8a | 418 | kup put kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign /pub/linux/utils/kernel/kmod/ |
cc71e0a5 LDM |
419 | |
420 | # ------------------------------------------------------------------------------ | |
421 | # mkosi | |
422 | # ------------------------------------------------------------------------------ | |
423 | ||
7bc6b67d LDM |
424 | DISTRO ?= "arch" |
425 | ||
cc71e0a5 | 426 | mkosi: |
8d9c7e37 | 427 | -$(MKDIR_P) $(top_srcdir)/testsuite/mkosi/mkosi.cache |
7bc6b67d | 428 | $(MKOSI) -C $(top_srcdir)/testsuite/mkosi --build-sources ../../ --default mkosi.${DISTRO} -fi |