1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-03-15 07:29:15 +01:00

LP-64 - Configure ccache to have its storage within source tree, under .ccache directory. Add it to gitignore

This commit is contained in:
Alessio Morale 2015-07-31 11:20:09 +02:00
parent ba1ab669e5
commit c010d98f21
3 changed files with 31 additions and 16 deletions

3
.gitignore vendored
View File

@ -77,3 +77,6 @@ RemoteSystemsTempFiles
*.rej
*.orig
*.diff~
# ignore ccache storage
.ccache

View File

@ -1,5 +1,6 @@
#
# Top level Makefile for the OpenPilot project build system.
# Top level Makefile for the LibrePilot project build system.
# Copyright (c) 2015, The LibrePilot Project, http://www.librepilot.org
# Copyright (c) 2010-2013, The OpenPilot Team, http://www.openpilot.org
# Use 'make help' for instructions.
#

View File

@ -1,5 +1,6 @@
#
# Installers for tools required by the OpenPilot build system.
# Copyright (c) 2015, The LibrePilot Project, http://www.librepilot.org
# Copyright (c) 2010-2013, The OpenPilot Team, http://www.openpilot.org
#
# NOTE: install targets are not tied to the default goals and must
@ -102,8 +103,8 @@ endif
GTEST_URL := http://librepilot.github.io/tools/gtest-1.6.0.zip
CCACHE_URL := http://samba.org/ftp/ccache/ccache-3.2.2.tar.bz2
#temporary url, to be moved under librepilot.github.io
CCACHE_MD5_URL := http://www.alessiomorale.com/download/ccache-3.2.2.tar.bz2.md5
CCACHE_MD5_URL := http://librepilot.github.io/tools/ccache-3.2.2.tar.bz2.md5
ARM_SDK_DIR := $(TOOLS_DIR)/gcc-arm-none-eabi-4_9-2014q4
QT_SDK_DIR := $(TOOLS_DIR)/qt-5.4.1
UNCRUSTIFY_DIR := $(TOOLS_DIR)/uncrustify-0.60
@ -183,7 +184,7 @@ ifneq ($(UNAME), Windows)
else
SEVENZIP := 7za.exe
ifneq ($(shell $(SEVENZIP) --version >/dev/null 2>&1 && $(ECHO) "found"), found)
# no $(SEVENZIP) found in path. hope is in bin...
# no $(SEVENZIP) found in path. hope is in bin...
SEVENZIP = $(TOOLS_DIR)/bin/7za.exe
endif
endif
@ -336,9 +337,9 @@ define TOOL_INSTALL_TEMPLATE
.PHONY: $(addprefix $(1)_, install clean distclean)
$(1)_install: $(1)_clean | $(DL_DIR) $(TOOLS_DIR)
$(if $(4), $(call DOWNLOAD_TEMPLATE,$(3),$(5),$(4)),$(call DOWNLOAD_TEMPLATE,$(3),$(5),"$(3).md5"))
@$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(2))
$(V1) $(MKDIR) -p $$(call toprel, $(dir $(2)))
@ -453,13 +454,13 @@ qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
# Explode .run file into install packages
@$(ECHO) $(MSG_EXTRACTING) $$(call toprel, $(1))
$(V1) $(MKDIR) -p $$(call toprel, $(dir $(1)))
$(V1) chmod +x $(DL_DIR)/$(5)
$(V1) chmod +x $(DL_DIR)/$(5)
$(V1) $(DL_DIR)/$(5) --dump-binary-data -o $(1)
# Extract packages under tool directory
$(V1) $(MKDIR) -p $$(call toprel, $(dir $(2)))
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_essentials.7z" | grep -v Extracting
$(V1) if [ -f "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_64.7z" ]; then $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_64.7z" | grep -v Extracting; fi
$(V1) if [ -f "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_32.7z" ]; then $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_32.7z" | grep -v Extracting; fi
$(V1) if [ -f "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_32.7z" ]; then $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0icu_53_1_ubuntu_11_10_32.7z" | grep -v Extracting; fi
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_addons.7z" | grep -v Extracting
# Run patcher
@$(ECHO)
@ -469,11 +470,11 @@ qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
# Execute post build templates
$(7)
# Clean up temporary files
@$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1))
$(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)"
qt_sdk_clean:
@$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1))
$(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)"
@ -527,8 +528,8 @@ qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_essentials.7z" | grep -v Extracting
# $(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6).essentials/5.4.1icu_path_patcher.sh.7z" | grep -v Extracting
$(V1) $(SEVENZIP) -y -o$(2) x "$(1)/qt.54.$(6)/5.4.1-0qt5_addons.7z" | grep -v Extracting
# go to OpenPilot/tools/5.4/gcc_64 and call patcher.sh
@$(ECHO)
@$(ECHO) "Running patcher in" $$(call toprel, $(QT_SDK_PREFIX))
@ -543,11 +544,11 @@ qt_sdk_install: qt_sdk_clean | $(DL_DIR) $(TOOLS_DIR)
# Execute post build templates
$(7)
# Clean up temporary files
@$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1))
$(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)"
qt_sdk_clean:
@$(ECHO) $(MSG_CLEANING) $$(call toprel, $(1))
$(V1) [ ! -d "$(1)" ] || $(RM) -rf "$(1)"
@ -993,6 +994,16 @@ define CCACHE_BUILD_TEMPLATE
)
@$(ECHO) $(MSG_CLEANING) $(call toprel, $(CCACHE_BUILD_DIR))
-$(V1) [ ! -d "$(CCACHE_BUILD_DIR)" ] || $(RM) -rf "$(CCACHE_BUILD_DIR)"
@$(ECHO)
@$(ECHO) "Setting up CCACHE configuration:"
$(V1) [ -d "$(ROOT_DIR)/.ccache" ] || mkdir $(ROOT_DIR)/.ccache
$(V1) [ -d "$(CCACHE_DIR)/etc" ] || mkdir $(CCACHE_DIR)/etc
$(V1) $(ECHO) $(QUOTE)cache_dir = $(ROOT_DIR)/.ccache $(QUOTE) > $(CCACHE_DIR)/etc/ccache.conf
$(V1) $(ECHO) $(QUOTE)max_size = 250M$(QUOTE) >> $(CCACHE_DIR)/etc/ccache.conf
$(V1) $(CAT) $(CCACHE_DIR)/etc/ccache.conf
endef
define CCACHE_CLEAN_TEMPLATE
@ -1204,7 +1215,7 @@ stm32flash_install: stm32flash_clean
)
# build
$(V0) @$(ECHO) " BUILD $(STM32FLASH_DIR)"
$(V1) $(MAKE) --silent -C $(STM32FLASH_DIR) all $(STM32FLASH_BUILD_OPTIONS)
$(V1) $(MAKE) --silent -C $(STM32FLASH_DIR) all $(STM32FLASH_BUILD_OPTIONS)
.PHONY: stm32flash_clean
stm32flash_clean:
@ -1281,7 +1292,7 @@ prepare:
prepare_clean:
$(V0) @echo " Cleanup GIT commit template configuration"
$(V1) $(CD) "$(ROOT_DIR)"
$(V1) $(GIT) config --unset commit.template
$(V1) $(GIT) config --unset commit.template
##############################
#