Use ccCmd to generate clang-tidy dependent file
* After this change, make libtinyxml2-tidy should generate correct out/.../libtinyxml2.tidy.d file. Touching one of the dependent files, e.g., tinyxml2.h, should invoke clang-tidy but not to recompile tinyxml2.o. * Note that linking libraries still depend on .tidy targets, so make libtinyxml2 will call clang-tidy, regnerate tinyxml2.tidy.d, tinyxml2.tidy, tinyxml2.o.d, tinyxml2.o. * A clang-tidy rule uses the same $cFlags for both clang and clang-tidy. To share it and avoid over long command lines, we use modern shell array variables and cannot use old bourne shell. Bug: 199169329 Test: WITH_TIDY=1 make Test: WITH_TIDY=1 make libtinyxml2-tidy | grep tinyxml2 Test: touch external/tinyxml2/tinyxml2.h; make libtinyxml2-tidy | grep tinyxml2 Change-Id: I6175add58d7313ee50c9308b78c9290a60770052
Loading
Please register or sign in to comment