summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@intel.com>2018-01-03 11:19:02 -0800
committerLucas De Marchi <lucas.demarchi@intel.com>2018-01-03 14:22:05 -0800
commit7bc6b67dc6e0394153974234722eaa35dcd445aa (patch)
tree7e3a1164ffc8a14da25663e6c1adad78a3f5e4bd /Makefile.am
parent8d9c7e37c95da12bcff0e1ba21a45d3efb8b9041 (diff)
downloadkmod-7bc6b67dc6e0394153974234722eaa35dcd445aa.tar.gz
kmod-7bc6b67dc6e0394153974234722eaa35dcd445aa.tar.bz2
kmod-7bc6b67dc6e0394153974234722eaa35dcd445aa.zip
testsuite: generalize mkosi support for other distros
Instead of using the mkosi.default symlink, use an env var passed from the build system. We would need to pass the --default switch nonetheless or change the symlink, making the git tree dirty. Also, search for installed kernel headers in a way that's compatible with more distros. On Fedora, for example, the /usr/lib/modules/<kver>/build symlink is only available if there's a kernel installed. We don't care about a kernel installed since we don't need to boot it on a real machine: the only thing we need is the kernel-devel package.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 3ea4274..7b01201 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -503,6 +503,8 @@ tar-sync: kmod-$(VERSION).tar.xz kmod-$(VERSION).tar.sign
# mkosi
# ------------------------------------------------------------------------------
+DISTRO ?= "arch"
+
mkosi:
-$(MKDIR_P) $(top_srcdir)/testsuite/mkosi/mkosi.cache
- $(MKOSI) -C $(top_srcdir)/testsuite/mkosi --build-sources ../../ -fi
+ $(MKOSI) -C $(top_srcdir)/testsuite/mkosi --build-sources ../../ --default mkosi.${DISTRO} -fi