diff options
author | Brian Behlendorf <[email protected]> | 2010-07-28 13:59:18 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-07-28 14:55:32 -0700 |
commit | 099dc9c2d275b4475f130f3d03bab88516101b36 (patch) | |
tree | 24827ed79b63e6de0a3af4e510b47d594d53230a /module/Makefile.in | |
parent | 287b2fb117f1ce964dc79c1f694e7d473a6b9db0 (diff) |
Add uninstall Makefile targets
Extend the Makefiles with an uninstall target to cleanly
remove a package which was installed with 'make install'.
Additionally, ensure a 'depmod -a' is run as part of the
install to update the module dependency information.
Diffstat (limited to 'module/Makefile.in')
-rw-r--r-- | module/Makefile.in | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/module/Makefile.in b/module/Makefile.in index eed81f64e..caa403228 100644 --- a/module/Makefile.in +++ b/module/Makefile.in @@ -12,10 +12,19 @@ clean: if [ -f Module.markers ]; then $(RM) Module.markers; fi modules_install: + # Install the kernel modules $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` \ INSTALL_MOD_PATH=$(DESTDIR) \ INSTALL_MOD_DIR=addon/spl $@ find ${DESTDIR}/lib/modules/ -name 'modules.*' | xargs ${RM} + sysmap=${DESTDIR}/boot/System.map-@LINUX_VERSION@; \ + if [ -f $$sysmap ]; then \ + depmod -ae -F $$sysmap @LINUX_VERSION@; \ + fi + +modules_uninstall: + # Uninstall the kernel modules + $(RM) -R ${DESTDIR}/lib/modules/@LINUX_VERSION@/addon/spl distdir: list='$(subdir-m)'; for subdir in $$list; do \ @@ -25,5 +34,6 @@ distdir: distclean maintainer-clean: clean install: modules_install +uninstall: modules_uninstall all: modules check: |