summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-11-05 17:02:06 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-11-05 17:02:06 +0100
commit38a7787625d4ebbf0562c46e507e84eda948a106 (patch)
treef9f95f0da7c6c42709bdabf20578ae4a0993b6e9 /configure
parentcde1388414a0ab78510cf739ba3e9eb98c24f7bd (diff)
downloadeurephia-38a7787625d4ebbf0562c46e507e84eda948a106.tar.gz
eurephia-38a7787625d4ebbf0562c46e507e84eda948a106.tar.xz
eurephia-38a7787625d4ebbf0562c46e507e84eda948a106.zip
Added uninstall rule
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure39
1 files changed, 27 insertions, 12 deletions
diff --git a/configure b/configure
index 0c9f327..6c10e25 100755
--- a/configure
+++ b/configure
@@ -90,18 +90,6 @@ rm -f CMakeCache.txt
cmake . ${PARAMS} -DPREFIX:STRING=${PREFIX}
ec=$?
if [ $ec = 0 ]; then
- cat >> Makefile <<EOF
-dist-clean : clean
- find -type d -name "CMakeFiles" | xargs rm -rf
- find -type f -name "cmake_install.cmake" | xargs rm -rf
- find -type f -name CMakeCache.txt | xargs rm -rf
- find -type f -name install_manifest.txt | xargs rm -rf
- find -type f -name Makefile | xargs rm -rf
- find -type f -name "*~" | xargs rm -f
- rm -f CMakeCache.txt
-
-EOF
-
echo
echo
echo "eurephia will be built with support for: "
@@ -125,5 +113,32 @@ EOF
echo
fi
fi
+
+ # Update Makefile with distclean and uninstall rules
+ cat >> Makefile <<EOF
+distclean : clean
+ find -type d -name "CMakeFiles" | xargs rm -rf
+ find -type f -name "cmake_install.cmake" | xargs rm -rf
+ find -type f -name CMakeCache.txt | xargs rm -rf
+ find -type f -name install_manifest.txt | xargs rm -rf
+ find -type f -name Makefile | xargs rm -rf
+ find -type f -name "*~" | xargs rm -f
+ rm -f CMakeCache.txt
+
+uninstall :
+ @echo "Uninstalling eurephia: "
+ cat install_manifest.txt | xargs rm -vf
+EOF
+ if [ ! -z ${DB} ]; then
+ if [ ${SQLITE3PREFIX} != ${PREFIX} ]; then
+ cat >> Makefile <<EOF
+ rmdir -v ${SQLITE3PREFIX}
+EOF
+ fi
+ fi
+ cat >> Makefile <<EOF
+ rmdir -v ${PREFIX}
+EOF
+
fi
exit $?