patch from rick68:
authorEric Andersen <andersen@codepoet.org>
Sat, 3 Feb 2007 21:07:43 +0000 (21:07 -0000)
committerEric Andersen <andersen@codepoet.org>
Sat, 3 Feb 2007 21:07:43 +0000 (21:07 -0000)
make certain uninstall works more than once.

toolchain/ccache/ccache.mk

index 8a44a70faea00d42479eb412ad1b3cdbc7bafe7f..9cc1779129bd652e7fd7117a13df1a1b1fd875e3 100644 (file)
@@ -84,18 +84,21 @@ ccache-clean:
        rm -rf  $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-gcc
        rm -rf  $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-cc
        rm -rf  $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc
-       [ -f $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-gcc ] && \
-               mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/
-       (cd $(STAGING_DIR)/bin; \
-               ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(REAL_GNU_TARGET_NAME)-cc; \
-               ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-cc; \
-               ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc;)
-       [ -f $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-c++ ] && \
+       if [ -f $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-gcc ] ; then \
+               mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin/; \
+               (cd $(STAGING_DIR)/bin; \
+                   ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(REAL_GNU_TARGET_NAME)-cc; \
+                   ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-cc; \
+                   ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc); \
+       fi;
+       if [ -f $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-c++ ] ; then \
                rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c++; \
-               mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin/
-       [ -f $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-g++ ] && \
+               mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin/; \
+       fi;
+       if [ -f $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-g++ ] ; then \
                rm -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-g++; \
-               mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-g++  $(STAGING_DIR)/bin/
+               mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-g++  $(STAGING_DIR)/bin/; \
+       fi;
        rm -rf  $(STAGING_DIR)/bin-ccache/*
        (cd $(STAGING_DIR)/bin; \
                ln -fs $(REAL_GNU_TARGET_NAME)-g++ $(GNU_TARGET_NAME)-c++; \