The top directory of AOSP is ~/WORKING_DIRECTORY. If I run
~/WORKING_DIRECTORY$ make
the whole system builds correctly.
According to Building a particular module in the android source code, https://stackoverflow.com/a/30671099/746461, if I need to rebuild art, I will
cd art
mm
However it throws error:
FAILED: out/target/common/cpplint/art__compiler__optimizing__nodes.h
/bin/bash -c "(art/tools/cpplint.py --quiet --root=. --filter=-whitespace/line_length,-build/include,-readability/function,-readability/streams,-readability/todo,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn,-runtime/printf art/compiler/optimizing/nodes.h ) && (mkdir -p out/target/common/cpplint/ ) && (touch out/target/common/cpplint/art__compiler__optimizing__nodes.h )"
art/compiler/optimizing/nodes.h:3974: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3978: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3983: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3987: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3992: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
art/compiler/optimizing/nodes.h:3996: Labels should always be indented at least one space. If this is a member-initializer list in a constructor or the base class list in a class definition, the colon should be on the following line. [whitespace/labels] [4]
Done processing art/compiler/optimizing/nodes.h
Total errors found: 6
[ 1% 108/10017] Building with Jack: out/ho...S/core-oj-hostdex_intermediates/classes.dex
ninja: build stopped: subcommand failed.
17:27:03 ninja failed with: exit status 1
#### failed to build some targets (13 seconds) ####
If I stay in ~/WORKING_DIRECTORY and call mm art, it seems to build correctly.
However, if I deliberately make a mistake in the source code, then run
~/WORKING_DIRECTORY$ mm art
it still builds, which means the new files are not compiled at all. See the screenshot.
What's the correct way of rebuilding a module?