Reprinted: http://blog.csdn.net/kellycan/article/details/6457030
In the android development process, when we only need to compile a modified module, the MM command can enable you to compile the entire android project, instead of compiling the module separately, is the speed fast? The procedure is as follows:
1. In the android source code directory:
[C-sharp]
View plaincopyprint?
- CD mydroid
- Source build/envsetup. Sh
CD mydroid <br/> source build/envsetup. Sh
You can also set source ~ /Mydroid/build/envsetup. Sh put it in ~ /. Bashrc, so that the script will automatically run every time the shell is opened.
2. Run the Help Command in shell to view the commands that can be run.
[C-sharp]
View plaincopyprint?
- # Help
- Invoke ". Build/envsetup. Sh" from your shell to add the following functions to your environment:
- -Croot: Changes directory to the top of the tree.
- -M: makes from the top of the tree.
- -Mm: builds all of the modules in the current directory.
- -Mmm: builds all of the modules in the supplied directories.
- -Cgrep: greps on all local C/C ++ files.
- -Jgrep: greps on all local java files.
- -Resgrep: greps on all local Res/*. XML files.
- -Godir: Go to the directory containing a file.
- Look at the source to view more functions. The complete list is:
- When cgrep check_product has been successfully installed into your cproj Croot into gdbclient has been installed into your own gettop godir help pipeline jgrep lunch m mm mmm PID printconfig pipeline resgrep runhat runtest pipeline setpaths pipeline settitle smoketest startviewserver stop tapas tracedmdump
# Help <br/> invoke ". build/envsetup. sh "from your shell to add the following functions to your environment: <br/>-Croot: Changes directory to the top of the tree. <br/>-M: makes from the top of the tree. <br/>-MM: builds all of the modules in the current directory. <br/>-Mmm: builds all of the modules in the supplied directories. <br/>-cgrep: greps on all local C/C ++ files. <br/>-jgrep: greps on all local java files. <br/>-resgrep: greps on all local Res /*. XML files. <br/>-godir: Go to the directory containing a file. </P> <p> look at the source to view more functions. the complete list is: <br/> export cgrep check_product check_variant implements chooseproduct when using cproj Croot into gdbclient when using upper limit gettop godir help using jgrep lunch m mm mmm PID printconfig when resgrep runhat runtest when setpaths when using settitle smoketest startviewserver stopviewserver systemstack tapas tracedmdump
The mm command is used to compile all modules in the current folder.
3. the next thing will become very simple. You only need to go to the module folder to be compiled and run the MM command. Of course, you can also use the mmm command, such as Mmm external/JPEG /, the same effect as running the MM command in the external/JPEG/directory.