加快Android单模块编译

转载时请注明出处和作者联系方式
文章出处:http://www.limodev.cn/blog
作者联系方式:李先静 <xianjimli at hotmail dot com>

习惯了automake之后,再用Android的编译系统,就是感觉不爽。编译一个小模块也等上几分钟,有次实在受不了,看了一下它的实现,发现它对任何一次编译都要查找所有的Android.mk:

subdir_makefiles=$(shell cat build/tools/Android.mk.cache)

我把build/core/main.mk修改了一下,增加了一个cache:

subdir_makefiles=$(shell cat build/tools/Android.mk.cache)
ifeq ($(subdir_makefiles),)
$(info "no cache. create build/tools/Android.mk.cache")
$(shell build/tools/findleaves.sh --prune="./out" . Android.mk > build/tools/Android.mk.cache)
subdir_makefiles=$(shell cat build/tools/Android.mk.cache)
else
$(info "use cache: build/tools/Android.mk.cache")
endif

速度终于可以接受了。

更多相关文章

  1. Linux开发环境搭建 三 (在Ubuntu上Android/Linux编译环境的准备)
  2. React Native项目编译通不过, 出现 The "android" command is dep
  3. build android for VMware
  4. Android仿人人客户端(v5.7.1)——网络模块处理的架构
  5. Android编译过程详解(二)
  6. Android增量编译3~5秒的背后
  7. Android(安卓)mk编译OkHttp3
  8. Android(安卓)代码混淆异常 transformClassesAndResourcesWithPr
  9. Android(安卓)Studio 编译不通过,报错“找不到org.apache.http。

随机推荐

  1. windows无法启动MySQL服务报错1067的解决
  2. mysql 5.7.17 winx64安装配置图文教程
  3. mysql 5.7.17 安装配置方法图文教程(windo
  4. Ubuntu16.04 server下配置MySQL,并开启远
  5. mysql 5.7.17 winx64安装配置方法图文教
  6. mysql免安装没有任何root权限
  7. 浅谈mysql数据库中的换行符与textarea中
  8. MySQL实时监控工具orztop的使用介绍
  9. MySQL基础教程之IN的用法详解
  10. mysql7.x单独安装mysql的方法