From 3f2cdc9cd3985496dc19f4222e870fb2f41145df Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Sat, 3 Feb 2007 21:07:43 +0000 Subject: patch from rick68: make certain uninstall works more than once. --- toolchain/ccache/ccache.mk | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'toolchain/ccache') diff --git a/toolchain/ccache/ccache.mk b/toolchain/ccache/ccache.mk index 8a44a70fa..9cc177912 100644 --- a/toolchain/ccache/ccache.mk +++ b/toolchain/ccache/ccache.mk @@ -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++; \ -- cgit v1.2.3