From aec891b737e5d4fabfdc8e1cd49230b365575ae6 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Fri, 22 Jun 2007 19:01:48 +0000 Subject: - fixup ccache to know about usr/bin --- toolchain/ccache/ccache.mk | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/toolchain/ccache/ccache.mk b/toolchain/ccache/ccache.mk index 9cc177912..300335547 100644 --- a/toolchain/ccache/ccache.mk +++ b/toolchain/ccache/ccache.mk @@ -46,7 +46,7 @@ $(CCACHE_DIR1)/$(CCACHE_BINARY): $(CCACHE_DIR1)/.configured $(MAKE) CC="$(HOSTCC)" -C $(CCACHE_DIR1) $(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY) - mkdir -p $(STAGING_DIR)/usr/bin; + mkdir -p $(STAGING_DIR)/usr/bin cp $(CCACHE_DIR1)/ccache $(STAGING_DIR)/usr/bin # Keep the actual toolchain binaries in a directory at the same level. # Otherwise, relative paths for include dirs break. @@ -55,23 +55,23 @@ $(STAGING_DIR)/$(CCACHE_TARGET_BINARY): $(CCACHE_DIR1)/$(CCACHE_BINARY) ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-gcc; \ ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(GNU_TARGET_NAME)-cc; \ ln -fs $(REAL_GNU_TARGET_NAME)-gcc $(REAL_GNU_TARGET_NAME)-cc); - [ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc ] && \ - mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin-ccache/ - (cd $(STAGING_DIR)/bin; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-cc; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-gcc; \ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-cc; \ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-gcc); + [ -f $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc ] && \ + mv $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/bin-ccache/ + (cd $(STAGING_DIR)/usr/bin; \ + ln -fs ccache $(GNU_TARGET_NAME)-cc; \ + ln -fs ccache $(GNU_TARGET_NAME)-gcc; \ + ln -fs ccache $(REAL_GNU_TARGET_NAME)-cc; \ + ln -fs ccache $(REAL_GNU_TARGET_NAME)-gcc); ifeq ($(BR2_INSTALL_LIBSTDCPP),y) - [ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c++ ] && \ - mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin-ccache/ - [ -f $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-g++ ] && \ - mv $(STAGING_DIR)/bin/$(REAL_GNU_TARGET_NAME)-g++ $(STAGING_DIR)/bin-ccache/ - (cd $(STAGING_DIR)/bin; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-c++; \ - ln -fs ../usr/bin/ccache $(GNU_TARGET_NAME)-g++;\ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-c++; \ - ln -fs ../usr/bin/ccache $(REAL_GNU_TARGET_NAME)-g++); + [ -f $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++ ] && \ + mv $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++ $(STAGING_DIR)/bin-ccache/ + [ -f $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-g++ ] && \ + mv $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-g++ $(STAGING_DIR)/bin-ccache/ + (cd $(STAGING_DIR)/usr/bin; \ + ln -fs ccache $(GNU_TARGET_NAME)-c++; \ + ln -fs ccache $(GNU_TARGET_NAME)-g++;\ + ln -fs ccache $(REAL_GNU_TARGET_NAME)-c++; \ + ln -fs ccache $(REAL_GNU_TARGET_NAME)-g++); (cd $(STAGING_DIR)/bin-ccache; \ ln -fs $(REAL_GNU_TARGET_NAME)-c++ $(GNU_TARGET_NAME)-c++; \ ln -fs $(REAL_GNU_TARGET_NAME)-g++ $(GNU_TARGET_NAME)-g++); @@ -80,27 +80,27 @@ endif ccache: gcc $(STAGING_DIR)/$(CCACHE_TARGET_BINARY) ccache-clean: - rm -rf $(STAGING_DIR)/bin/$(GNU_TARGET_NAME)-cc - 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 + rm -rf $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-cc + rm -rf $(STAGING_DIR)/usr/bin/$(GNU_TARGET_NAME)-gcc + rm -rf $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-cc + rm -rf $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-gcc 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; \ + mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-gcc $(STAGING_DIR)/usr/bin/; \ + (cd $(STAGING_DIR)/usr/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/; \ + rm -f $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-c++; \ + mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-c++ $(STAGING_DIR)/usr/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/; \ + rm -f $(STAGING_DIR)/usr/bin/$(REAL_GNU_TARGET_NAME)-g++; \ + mv $(STAGING_DIR)/bin-ccache/$(REAL_GNU_TARGET_NAME)-g++ $(STAGING_DIR)/usr/bin/; \ fi; rm -rf $(STAGING_DIR)/bin-ccache/* - (cd $(STAGING_DIR)/bin; \ + (cd $(STAGING_DIR)/usr/bin; \ ln -fs $(REAL_GNU_TARGET_NAME)-g++ $(GNU_TARGET_NAME)-c++; \ ln -fs $(REAL_GNU_TARGET_NAME)-g++ $(GNU_TARGET_NAME)-g++;\ ln -fs $(REAL_GNU_TARGET_NAME)-g++ $(REAL_GNU_TARGET_NAME)-c++); -- cgit v1.2.3