From cf2bd735fd85f19b7388a64b66d2b2f7169c2cdd Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Sun, 30 Jul 2017 10:32:01 -0700 Subject: Use absolute path for art/tools/cpplint.py --root art/tools/cpplint.py still fails when run with --root=. if the .git directory is missing. Replace --root=. with --root=$(pwd) to give it an absolute path. Bug: 34787652 Test: mv art/.git art/.git.bak; m -j cpplint-art-phony; mv art/.git.bak art/.git Change-Id: I56c2acf54090e53a02d52fb12ffd2e5a862ede4f --- build/Android.cpplint.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'build/Android.cpplint.mk') diff --git a/build/Android.cpplint.mk b/build/Android.cpplint.mk index 66ac897f76..b633ccc08d 100644 --- a/build/Android.cpplint.mk +++ b/build/Android.cpplint.mk @@ -18,7 +18,9 @@ include art/build/Android.common_build.mk ART_CPPLINT := $(LOCAL_PATH)/tools/cpplint.py ART_CPPLINT_FILTER := --filter=-whitespace/line_length,-build/include,-readability/function,-readability/streams,-readability/todo,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn,-runtime/printf -ART_CPPLINT_FLAGS := --root=$(TOP) +# Use `pwd` instead of $TOP for root, $TOP is always . and --root doesn't seem +# to work with a relative path (b/34787652). +ART_CPPLINT_FLAGS := --root=`pwd` ART_CPPLINT_QUIET := --quiet ART_CPPLINT_INGORED := \ runtime/elf.h \ -- cgit v1.2.3-59-g8ed1b