From: <da...@us...> - 2003-08-03 12:30:10
|
Update of /cvsroot/cerber/cerb-ng/docs In directory sc8-pr-cvs1:/tmp/cvs-serv5105/docs Modified Files: Makefile Log Message: Added deinstalation rules to Makefiles. Suggested by: Dariusz Kulinski <ta...@ta...> Index: Makefile =================================================================== RCS file: /cvsroot/cerber/cerb-ng/docs/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 2 Jul 2003 13:16:56 -0000 1.1 +++ Makefile 3 Aug 2003 12:30:07 -0000 1.2 @@ -9,7 +9,8 @@ DESTDIR=/usr/local DOCS= HOWTO-PL.txt HOWTO.html OPERATIONS-PL.txt README-PL.txt DOCS+= SYSCTLS-PL.txt VARIABLES-PL.txt clang-ref-guide.html rough-guide.html -DOCSDIR=${DESTDIR}/share/cerb/docs +DOCSMAINDIR=${DESTDIR}/share/cerb +DOCSDIR=${DOCSMAINDIR}/docs all: @@ -18,3 +19,18 @@ install: ${DOCS} install -m 755 -o root -g wheel -d ${DOCSDIR} install -m 644 -o root -g wheel ${DOCS} ${DOCSDIR} + +deinstall: + @if [ -d ${DOCSDIR} ]; then \ + rm -rf ${DOCSDIR}; \ + echo "Directory ${DOCSDIR} removed."; \ + else \ + echo "Directory ${DOCSDIR} doesn't exist."; \ + fi + @if [ -d ${DOCSMAINDIR} ]; then \ + n=`ls -a ${DOCSMAINDIR} | wc -l`; \ + if [ $$n -eq 2 ]; then \ + rmdir ${DOCSMAINDIR}; \ + echo "Directory ${DOCSMAINDIR} removed."; \ + fi; \ + fi |