diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-07-08 18:50:46 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-07-08 18:50:46 +0000 |
commit | 0f27521bc7d0abc3604c5ca0164bbc95178cdae5 (patch) | |
tree | acd7391f2bc43a4e576dc671247f5d79a29424ac /Makefile | |
parent | 255ac2f5bf1bd9b303775b21b2a2f3b451e36f8d (diff) |
add the new-and-improved uninstall-modules script here, and teach the Makefile hw to uninstall DAHDI kernel modules if they are installed
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4398 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 26 insertions, 7 deletions
@@ -525,21 +525,40 @@ install-udev: devices uninstall-hotplug: $(MAKE) -C firmware hotplug-uninstall DESTDIR=$(DESTDIR) -uninstall-modules: -ifneq ($(BUILDVER),linux24) - @./build_tools/uninstall-modules $(DESTDIR)/lib/modules/$(KVERS) $(ALL_MODULES) -endif - ifeq ($(BUILDVER),linux24) -install-modules: $(INSTALL_MODULES) uninstall-modules +install-modules: $(INSTALL_MODULES) $(INSTALL) -d $(DESTDIR)$(MOD_DIR) $(INSTALL) -m 644 $(INSTALL_MODULES) $(DESTDIR)$(MOD_DIR) else -install-modules: uninstall-modules +install-modules: +ifndef DESTDIR + @if modinfo dahdi > /dev/null 2>&1; then \ + echo -n "Removing DAHDI modules for kernel $(KVERS), please wait..."; \ + build_tools/uninstall-modules dahdi $(KVERS); \ + rm -rf /lib/modules/$(KVERS)/dahdi; \ + echo "done."; \ + fi +endif $(KMAKE_INST) endif [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : +uninstall-modules: +ifneq ($(BUILDVER),linux24) +ifdef DESTDIR + echo "Uninstalling modules is not supported with a DESTDIR specified." + exit 1 +else + @if modinfo zaptel > /dev/null 2>&1 ; then \ + echo -n "Removing Zaptel modules for kernel $(KVERS), please wait..."; \ + build_tools/uninstall-modules zaptel $(KVERS); \ + rm -rf /lib/modules/$(KVERS)/zaptel; \ + echo "done."; \ + fi + [ `id -u` = 0 ] && /sbin/depmod -a $(KVERS) || : +endif +endif + config: ifneq (,$(COPY_INITD)) $(COPY_INITD) |