Allows for user to uninstall asterisk binaries

bug 6177


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9052 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matt O'Gorman 2006-02-01 18:39:41 +00:00
parent 286a521e11
commit 7d03c33e0a
12 changed files with 58 additions and 1 deletions

View File

@ -912,3 +912,37 @@ cleantest:
if cmp -s .cleancount .lastclean ; then echo ; else \
$(MAKE) clean; cp -f .cleancount .lastclean;\
fi
_uninstall:
rm -f $(DESTDIR)$(MODULES_DIR)/*
rm -f $(DESTDIR)$(ASTSBINDIR)/*asterisk*
rm -f $(DESTDIR)$(ASTSBINDIR)/astgenkey
rm -f $(DESTDIR)$(ASTSBINDIR)/autosupport
rm -rf $(DESTDIR)$(ASTHEADERDIR)
rm -rf $(DESTDIR)$(ASTVARLIBDIR)/sounds
rm -rf $(DESTDIR)$(ASTVARLIBDIR)/firmware
rm -rf $(DESTDIR)$(ASTMANDIR)/man8
for x in $(SUBDIRS); do $(MAKE) -C $$x uninstall || exit 1 ; done
uninstall: _uninstall
@echo " +--------- Asterisk Uninstall Complete -----+"
@echo " + Asterisk binaries, sounds, man pages, +"
@echo " + headers, modules, and firmware builds, +"
@echo " + have all been uninstalled. +"
@echo " + +"
@echo " + To remove ALL traces of Asterisk, +"
@echo " + including configuration, spool +"
@echo " + directories, and logs, run the following +"
@echo " + command: +"
@echo " + +"
@echo " + $(MAKE) uninstall-all +"
@echo " +-------------------------------------------+"
uninstall-all: _uninstall
rm -rf $(DESTDIR)$(ASTLIBDIR)
rm -rf $(DESTDIR)$(ASTVARLIBDIR)
rm -rf $(DESTDIR)$(ASTSPOOLDIR)
rm -rf $(DESTDIR)$(ASTETCDIR)
rm -rf $(DESTDIR)$(ASTLOGDIR)

View File

@ -30,6 +30,9 @@ install: all
mkdir -p $(DESTDIR)$(AGI_DIR)
for x in $(AGIS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(AGI_DIR) ; done
uninstall:
for x in $(AGIS); do rm -f $(DESTDIR)$(AGI_DIR)/$$x ; done
eagi-test: eagi-test.o
$(CC) $(CFLAGS) -o eagi-test eagi-test.o $(LIBS)

View File

@ -92,6 +92,8 @@ install: all
rm -f $(DESTDIR)$(MODULES_DIR)/app_datetime.so
rm -f $(DESTDIR)$(MODULES_DIR)/app_qcall.so
uninstall:
app_curl.so: app_curl.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CURLLIBS)

View File

@ -112,6 +112,8 @@ all: depend $(MODS)
install: all
for x in $(MODS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall:
clean:
rm -f *.so *.o .depend

View File

@ -234,6 +234,8 @@ install: all
for x in $(CHANNEL_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
if ! [ -f chan_iax.so ]; then rm -f $(DESTDIR)$(MODULES_DIR)/chan_iax.so ; fi
uninstall:
depend: .depend
.depend:
@ -241,4 +243,3 @@ depend: .depend
env:
env

View File

@ -134,6 +134,8 @@ endif
install: all
for x in $(CODECS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall:
depend: .depend
.depend:

View File

@ -58,6 +58,8 @@ format_ogg_vorbis.so : format_ogg_vorbis.o
install: all
for x in $(FORMAT_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall:
depend: .depend
.depend:

View File

@ -75,6 +75,8 @@ func_odbc.so: func_odbc.o
install: all
for x in $(FUNCS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall:
ifneq ($(wildcard .depend),)
include .depend
endif

View File

@ -70,6 +70,8 @@ endif
install: all
for x in $(PBX_LIBS); do $(INSTALL) -m 755 $$x $(DESTDIR)$(MODULES_DIR) ; done
uninstall:
depend: .depend
.depend:

View File

@ -83,6 +83,8 @@ install: all
echo "*** it if you want to use MusicOnHold ***";\
fi
uninstall:
res_crypto.so: res_crypto.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} $(CRYPTO_LIBS)

View File

@ -8,6 +8,8 @@ libtime.a: $(OBJS)
install:
uninstall:
clean:
rm -f libtime.a *.o test .depend

View File

@ -40,6 +40,9 @@ install:
fi; \
done
uninstall:
for x in $(TARGET); do rm -f $$x $(DESTDIR)$(ASTSBINDIR)/$$x; done
clean:
rm -f *.o astman smsq stereorize streamplayer check_expr .depend
rm -f ast_expr2.o ast_expr2f.o