准备工作

在AndroidSource Code中有envsetup.sh档案,当执行过此档案后,可以大幅将build的过程简单化、自动化

此档案在src(android source code 位置)/build/中

所以可以执行以下指令

  1. cd /src/build/
  2. . envsetup.sh

可以使用help来检示有哪些指令可以使用

  1. Invoke ". build/envsetup.sh" from your shell to add thefollowing functions to your environment:
  2.  
  3. - croot: Changes directory to the top of the tree.
  4. - m: Makesfrom the top of the tree.
  5. - mm: Builds all of the modules in the currentdirectory.
  6. - mmm: Builds all of the modules in the supplieddirectories.
  7. - cgrep: Greps on all local C/C++ files.
  8. - hgrep: Greps on all local C/C++ header files.
  9. - jgrep: Greps on all local Java files.
  10. - mkgrep: Greps on all local make files.
  11. - rcgrep: Greps on all local .rc files.
  12. - resgrep: Greps on all local res/*.xml files.
  13. - shgrep: Greps on all local .sh files.
  14. - godir: Go to the directory containing a file.  

其中对模块的编译有辅助说明的是tapas、m、mm、mmm这几个指令。

m越多,编译范围越小。

m 编译全部的模块

  1. root@ubuntu:/home/android/src# m

mm 编译模块目录

  1. root@ubuntu:/home/android/src/external/jpeg# mm
  2. ============================================
  3. PLATFORM_VERSION_CODENAME=REL
  4. PLATFORM_VERSION=2.1-update1
  5. TARGET_PRODUCT=generic
  6. TARGET_BUILD_VARIANT=eng
  7. TARGET_SIMULATOR=false
  8. TARGET_BUILD_TYPE=release
  9. TARGET_ARCH=arm
  10. HOST_ARCH=x86
  11. HOST_OS=linux
  12. HOST_BUILD_TYPE=release
  13. BUILD_ID=ECLAIR
  14. ============================================
  15. make: Entering directory `/home/android/src'
  16. Copy: out/target/product/generic/system/etc/apns-conf.xml
  17. make: Leaving directory `/home/android/src'
  18. root@ubuntu:/home/android/src/external/jpeg#

单独编译某模块,需要在mmm后面指定模块路径

  1. root@ubuntu:/home/android/src# mmm external/jpeg/
  2. ============================================
  3. PLATFORM_VERSION_CODENAME=REL
  4. PLATFORM_VERSION=2.1-update1
  5. TARGET_PRODUCT=generic
  6. TARGET_BUILD_VARIANT=eng
  7. TARGET_SIMULATOR=
  8. TARGET_BUILD_TYPE=release
  9. TARGET_ARCH=arm
  10. HOST_ARCH=x86
  11. HOST_OS=linux
  12. HOST_BUILD_TYPE=release
  13. BUILD_ID=ECLAIR
  14. ============================================
  15. make: Entering directory `/home/android/src'
  16. Target buildinfo: out/target/product/generic/root/default.prop
  17. Target buildinfo: out/target/product/generic/system/build.prop
  18. Copy: out/target/product/generic/system/etc/apns-conf.xml
  19. make: Leaving directory `/home/android/src'
  20. root@ubuntu:/home/android/src#

Android编译中m、mm、mmm的区别的更多相关文章

  1. 【转】Android源代码编译命令m/mm/mmm/make分析--不错

    原文网址:http://blog.csdn.net/luoshengyang/article/details/19023609 在前文中,我们分析了Android编译环境的初始化过程.Android编 ...

  2. android平台的三个编译命令——make,mm,mmm

    在Android源码根目录下,执行以下三步即可编译android: 1.  build/envsetup.sh  #这个脚本用来设置android的编译环境; 2.  lunch  #选择编译目标 3 ...

  3. Android编译implement、api 和compile区别【转】

    感谢大佬:https://blog.csdn.net/fengyeNom1/article/details/81903186 前言 2017 年google 后,Android studio 版本更新 ...

  4. android开发中的 Activity 与 Context 区别与联系

    Context 是 Application /Activity /Service的基类 Intent(Context , Class); Activity中的上下文Context是随着活动的产生而产生 ...

  5. 关于android编程中service和activity的区别

    一. 绝大部分情况下,Service的作用是用来“执行”后台的.耗时的.重要的任务,三者缺一不可,而最重要的原因是第三点:要执行重要的任务. 因为当一个进程启动了Service后,进程的优先级变高了, ...

  6. Android系统中Parcelable和Serializable的区别

    转载:https://greenrobot.me/devpost/android-parcelable-serializable/ 进行Android开发的时候,我们都知道不能将对象的引用传给Acti ...

  7. 【安卓开发】Android系统中Parcelable和Serializable的区别

    http://greenrobot.me/devpost/android-parcelable-serializable/ 进行Android开发的时候,我们都知道不能将对象的引用传给Activiti ...

  8. Android系统中Parcelable和Serializable的区别,自动化实现Parcelable接口的插件

    Parcelable和Serializable的区别 参考地址:http://greenrobot.me/devpost/android-parcelable-serializable/ 由于最终的区 ...

  9. android MotionEvent中getX()和getRawX()的区别

    public class Res extends Activity implements View.OnTouchListener { Button btn = null; int x = 0; in ...

随机推荐

  1. CSS_03_04_CSS伪元素选择器

    第01步:编写css代码:wei.css @charset "utf-8"; /* 伪元素选择器 :状态 效果顺序:L V H A */ a:link.lin_01{/*超链接,未 ...

  2. c# 获取路径的几种方法

    1.取得控制台应用程序的根目录方法 方法1.Environment.CurrentDirectory 取得或设置当前工作目录的完整限定路径方法2.AppDomain.CurrentDomain.Bas ...

  3. PAT乙级 1004. 成绩排名 (20)

    1004. 成绩排名 (20) 时间限制 400 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 读入n名学生的姓名.学号.成绩,分 ...

  4. Android小案例——简单图片浏览器

    今天上午休息看Android书,里面有个变化图片的示例引起了我的兴趣. 示例需求: 有N张图片,循环显示图片的内容.如果需求让我写我会使用一个变量count来保存显示图片数据的索引,图片显示时做个判断 ...

  5. 安装VirtalBox虚拟机的一些问题归纳

    1.分别下载VirtalBox软件和镜像,进行安装出现一个问题:换了一个.dll动态库,用管理员权限运行修改BIOS 中Intel Virtual Technology Enabled!2.功能:虚拟 ...

  6. Yii多表关联

    表结构 现在有客户表.订单表.图书表.作者表, 客户表Customer    (id  customer_name) 订单表Order           (id  order_name       ...

  7. 图像处理之常用颜色RGB、灰度值

    128/0/0       深红         255/0/0       红           255/0/255     粉红        255/153/204 玫瑰红       153 ...

  8. spring Aop的一个demo

    面向切面是什么我就不说了. 上代码: package com.foreveross.service.weixin.test; import java.lang.annotation.Documente ...

  9. TreeNode动态邦定事件

    1. 显示不能用TextField,应该用StaticText 2. public void SetNodesAction(Tree t, String methodbind){ ArrayList ...

  10. Mac OX 隐藏文件夹,文件,应用,磁盘的2种方法 hide finder folder, file, application, volume in 2 ways

    经常需要主目录下隐藏一些文件夹之类的, 第一想到的当然就是:在要隐藏的文件夹前面加『.』(leading dot),这个用法当然可以的了 用习惯了Linux/GNU系统的,基本习惯使用这种办法 但是, ...