Android编译预处理分析

  • Post author:
  • Post category:其他




Android代码如此庞大,今天我们讲的只是编译系统的冰山一角。废话不多说了,走起。




1.首先执行source ./build/envsetup.sh,其实这个语句就是把envsetup.sh中定义的很多函数作为环境变量引用进来,如lunch,mm,mmm,gettop等等,后面再当前的shell下就可以直接调用了。其中下面代码比较关键:

# Execute the contents of any vendorsetup.sh files we can find.
for f in `test -d device && find device -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null` \
         `test -d vendor && find vendor -maxdepth 4 -name 'vendorsetup.sh' 2> /dev/null`
d



版权声明:本文为u014782319原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。