summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-05-23 17:19:07 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-05-23 17:36:20 -0700
commit58cd5cae12ede01f8cc8d837ecb1870419e7967a (patch)
treed3dfe994d0e4969f2a3be4148d5a7870aecd24fe /scripts
parentc6256de2e8471e8f93fcefada5ec4b073277c2da (diff)
downloadqtlocation-mapboxgl-58cd5cae12ede01f8cc8d837ecb1870419e7967a.tar.gz
[build] Avoid variable name coupling between main.mk and clang-tidy.sh
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/clang-tidy.sh4
-rw-r--r--scripts/main.mk2
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/clang-tidy.sh b/scripts/clang-tidy.sh
index ee3c1193ea..9420518747 100755
--- a/scripts/clang-tidy.sh
+++ b/scripts/clang-tidy.sh
@@ -3,6 +3,8 @@
set -e
set -o pipefail
+directory=$1
+
export PATH="`pwd`/.mason:${PATH}" MASON_DIR="`pwd`/.mason"
command -v ${CLANG_TIDY:-clang-tidy} >/dev/null 2>&1 || {
@@ -13,7 +15,7 @@ command -v ${CLANG_TIDY:-clang-tidy} >/dev/null 2>&1 || {
exit 1
}
-cd build/${PLATFORM}-${SUBPLATFORM}/${BUILDTYPE}
+cd "${directory}"
git ls-files '../../../src/mbgl/*.cpp' '../../../platform/*.cpp' '../../../test/*.cpp' | \
xargs -I{} -P ${JOBS} ${CLANG_TIDY:-clang-tidy} -header-filter='\/mbgl\/' {}
diff --git a/scripts/main.mk b/scripts/main.mk
index bb18411d56..fd73867f2f 100644
--- a/scripts/main.mk
+++ b/scripts/main.mk
@@ -139,7 +139,7 @@ tidy: Ninja/compdb
@printf "$(TEXT_BOLD)$(COLOR_GREEN)* Generating header files...$(FORMAT_END)\n"
$(ENV) deps/ninja/ninja-$(PLATFORM) -C $(PLATFORM_OUTPUT)/$(BUILDTYPE) version shaders
@printf "$(TEXT_BOLD)$(COLOR_GREEN)* Running tidy...$(FORMAT_END)\n"
- @./scripts/clang-tidy.sh
+ @./scripts/clang-tidy.sh $(PLATFORM_OUTPUT)/$(BUILDTYPE)
#### Run tests #################################################################