diff options
author | Kevin P. Fleming <kpfleming@digium.com> | 2008-07-08 18:32:02 +0000 |
---|---|---|
committer | Kevin P. Fleming <kpfleming@digium.com> | 2008-07-08 18:32:02 +0000 |
commit | dbed9550053d965554259b1184252ef3aad9ee36 (patch) | |
tree | 8e45063be3c8fc435ae7ba042d7d6112716e9c87 /Makefile | |
parent | 48c5508da6985bb90a04619072300cb9f3559601 (diff) |
make the uninstall-modules target actually work (except when DESTDIR is supplied), and automatically uninstall any Zaptel modules present for the KVERS kernel during installation of DAHDI
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@4570 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -152,9 +152,23 @@ uninstall-hotplug: $(MAKE) -C drivers/dahdi/firmware hotplug-uninstall DESTDIR=$(DESTDIR) uninstall-modules: - @build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) +ifdef DESTDIR + echo "Uninstalling modules is not supported with a custom DESTDIR." + exit 1 +else + echo -n "Removing DAHDI modules for kernel $(KVERS), please wait..." + @build_tools/uninstall-modules dahdi $(KVERS) + echo "done." +endif -install-modules: modules #uninstall-modules +install-modules: modules +ifndef DESTDIR + @if modinfo zaptel 2>&1 > /dev/null; then \ + echo -n "Removing Zaptel modules for kernel $(KVERS), please wait..."; \ + build_tools/uninstall-modules zaptel $(KVERS); \ + echo "done."; \ + fi +endif $(KMAKE) INSTALL_MOD_PATH=$(DESTDIR) INSTALL_MOD_DIR=dahdi modules_install [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : |