[banshee] build: avoid error in uninstall target if already uninstalled



commit f352c3f8f17778ec92ec39f642966e8c4f2f9197
Author: Andrés G. Aragoneses <knocte gmail com>
Date:   Sun May 18 14:12:20 2014 +0200

    build: avoid error in uninstall target if already uninstalled
    
    If 'make uninstalled' was executed twice, the second time would
    yield this error:
    
    find: `/usr/lib/banshee': No such file or directory
    
    (if the prefix configured was /usr)
    
    Wrap the `find` call in an block that checks for the existence
    of the installed path first.

 Makefile.am |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 26b858e..3a533e6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,8 +14,10 @@ clean-local:
        rm -rf $(top_builddir)/bin
 
 uninstall-hook:
-       if test `find $(pkglibdir) | wc -l` -eq 1; then \
-               rmdir $(pkglibdir); \
+       if test -d $(pkglibdir); then \
+               if test `find $(pkglibdir) | wc -l` -eq 1; then \
+                       rmdir $(pkglibdir); \
+               fi \
        fi
 
 dist-hook:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]