`
quanminchaoren
  • 浏览: 911956 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

Android 缩减make时间

阅读更多
习惯了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 楼 java_helloworld 2011-07-15  
看不明白,lz能说一下原理吗?

相关推荐

Global site tag (gtag.js) - Google Analytics