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
diff --git a/build/Android.cpplint.mk b/build/Android.cpplint.mk
index 66ac897..b633ccc 100644
--- a/build/Android.cpplint.mk
+++ b/build/Android.cpplint.mk
@@ -18,7 +18,9 @@
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 \