diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2024-01-26 14:43:51 +0000 |
---|---|---|
committer | Lucas De Marchi <lucas.de.marchi@gmail.com> | 2024-02-06 11:31:16 -0600 |
commit | e98cef6f3f8cd6f8bfb26d147b2c209297453cca (patch) | |
tree | 6a1fa4f1eaf1bb26ad77f29b3b48132e985be790 | |
parent | 607abb818a5249292f08c0e8602a5a62d12e42a5 (diff) | |
download | kmod-e98cef6f3f8cd6f8bfb26d147b2c209297453cca.tar.gz |
make: install/uninstall tools symlinks to kmod
Currently we create symlinks like modprobe (pointing to kmod), during
the normal `make` build. Although those were never installed.
Add a few lines in the install-exec-hook, to ensure they're present at
`make install` time. Thus one can actually use those without additional
changes. As an added bonus, distributions can drop the similar hunk from
their packaging.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
[ Use a relative symlink ]
Signed-off-by: Lucas De Marchi <lucas.de.marchi@gmail.com>
-rw-r--r-- | Makefile.am | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 6d21ad2..a16079c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -111,9 +111,19 @@ install-exec-hook: ln -sf $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/libkmod.so && \ mv $(DESTDIR)$(libdir)/libkmod.so.* $(DESTDIR)$(rootlibdir); \ fi +if BUILD_TOOLS + for tool in insmod lsmod rmmod depmod modprobe modinfo; do \ + $(LN_S) kmod $(DESTDIR)$(bindir)/$$tool; \ + done +endif uninstall-hook: rm -f $(DESTDIR)$(rootlibdir)/libkmod.so* +if BUILD_TOOLS + for tool in insmod lsmod rmmod depmod modprobe modinfo; do \ + rm -f $(DESTDIR)$(bindir)/$$tool; \ + done +endif if BUILD_TOOLS bin_PROGRAMS = tools/kmod |