summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile20
-rw-r--r--README.md2
2 files changed, 14 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index c6e1101947..25eb94c438 100644
--- a/Makefile
+++ b/Makefile
@@ -143,19 +143,17 @@ render: build/render/Makefile
.PHONY: clear_xcode_cache
clear_xcode_cache:
+ifeq ($(PLATFORM), osx)
@CUSTOM_DD=`defaults read com.apple.dt.Xcode IDECustomDerivedDataLocation 2>/dev/null`; \
- if [[ $$CUSTOM_DD ]]; then \
+ if [ $$CUSTOM_DD ]; then \
echo clearing files in $$CUSTOM_DD older than one day; \
find $$CUSTOM_DD/mapboxgl-app-* -mtime +1 | xargs rm -rf; \
fi; \
- if [[ -d ~/Library/Developer/Xcode/DerivedData/ ]] && [[ ! $$CUSTOM_DD ]]; then \
+ if [ -d ~/Library/Developer/Xcode/DerivedData/ ] && [ ! $$CUSTOM_DD ]; then \
echo 'clearing files in ~/Library/Developer/Xcode/DerivedData/mapboxgl-app-* older than one day'; \
find ~/Library/Developer/Xcode/DerivedData/mapboxgl-app-* -mtime +1 | xargs rm -rf; \
- fi; \
- if [[ -e ~/Library/Application\ Support/Mapbox\ GL/cache.db ]]; then \
- echo 'removing ~/Library/Application\ Support/Mapbox\ GL/cache.db'; \
- rm ~/Library/Application\ Support/Mapbox\ GL/cache.db; \
fi
+endif
xproj: build/macosx/mapboxgl-app.xcodeproj
open ./build/macosx/mapboxgl-app.xcodeproj
@@ -173,7 +171,15 @@ lproj: build/linux/mapboxgl-app.xcodeproj
##### Maintenace operations ####################################################
-clean: clear_xcode_cache
+.PHONY: clear_sqlite_cache
+clear_sqlite_cache:
+ifeq ($(PLATFORM), osx)
+ rm -f ~/Library/Application\ Support/Mapbox\ GL/cache.db
+else
+ rm -f /tmp/mbgl-cache.db
+endif
+
+clean: clear_sqlite_cache clear_xcode_cache
-find ./deps/gyp -name "*.pyc" -exec rm {} \;
-rm -rf ./build/
-rm -rf ./macosx/build/
diff --git a/README.md b/README.md
index ca6c763806..271a6c3cf6 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,7 @@ Be sure to pull down all submodules first:
## OS X
-On OS X, we are using `zlib`, `SQLite3`, `libcurl` and `libpng` provided by the operating system. In addition to that, you need to have the Boost headers installed. To install all prerequisites, use [Homebrew](http://brew.sh/) and type `brew install pkg-config boost`.
+On OS X, we are using `zlib`, `SQLite3`, `libcurl` and `libpng` provided by the operating system. In addition to that, you need to have the Boost headers installed and ImageMagick for running tests. To install all prerequisites, use [Homebrew](http://brew.sh/) and type `brew install pkg-config boost imagemagick`.
To create projects, you can run: