summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDane Springmeyer <dane@mapbox.com>2014-05-13 12:12:12 -0700
committerDane Springmeyer <dane@mapbox.com>2014-05-13 12:12:12 -0700
commit854de240553e3b0cea428339acb38c5a6c5f8f9d (patch)
treed722b83509d4ea7665536e0f8364b8241ae0e49a /Makefile
parentd7f9470c2fb3375916f9fb40be604908ed9ba917 (diff)
downloadqtlocation-mapboxgl-854de240553e3b0cea428339acb38c5a6c5f8f9d.tar.gz
push improvement for smart cache clearing from @wsnook
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 12 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index c83d2e694f..c11b641602 100644
--- a/Makefile
+++ b/Makefile
@@ -54,6 +54,17 @@ run-linux: linux
##### Xcode projects ###########################################################
clear_xcode_cache:
+ @CUSTOM_DD=`defaults read com.apple.dt.Xcode IDECustomDerivedDataLocation 2>/dev/null`; \
+ if [[ $$CUSTOM_DD ]]; then \
+ echo clearing files in $$CUSTOM_DD older than one day; \
+ find $$CUSTOM_DD/llmr-app-* -mtime +1 | xargs rm -rf; \
+ fi; \
+ if [[ -d ~/Library/Developer/Xcode/DerivedData/ ]] && [[ ! $$CUSTOM_DD ]]; then \
+ echo 'clearing files in ~/Library/Developer/Xcode/DerivedData/llmr-app-* older than one day'; \
+ find ~/Library/Developer/Xcode/DerivedData/llmr-app-* -mtime +1 | xargs rm -rf; \
+ fi
+
+clear_xcode_cache:
@if [[ -d ~/Library/Developer/Xcode/DerivedData/ ]]; then echo 'clearing files in ~/Library/Developer/Xcode/DerivedData/ older than one day'; find ~/Library/Developer/Xcode/DerivedData/llmr-app-* -mtime +1 | xargs rm -rf; fi
# build Mac OS X project for Xcode
@@ -74,13 +85,12 @@ lproj: config.gypi linux/llmr-app.gyp clear_xcode_cache node
##### Maintenace operations ####################################################
-clean:
+clean: clear_xcode_cache
-rm -rf ./build/Release
-rm -rf ./build/Debug
-rm -f include/llmr/shader/shaders.hpp
-rm -f include/llmr/style/resources.hpp
-rm -f src/style/resources.cpp
- -rm -rf ~/Library/Developer/Xcode/DerivedData/llmr*
distclean: clean
-rm -rf ./build