build中帮助文件help.sh的解读

help.sh文件所在位置:./build/make/help.sh;

内容显示,源码编译分为三步:

1.source build/envsetup.sh

# Add "lunch" (and other utilities and variables)

 # to the shell environment.

2.lunch [<product>-<variant>] # Choose the device to target.

3.m -j [<goals>]              # Execute the configured build.

Usage of "m" imitates usage of the program "make".

See '"${SCRIPT_DIR}"'/Usage.txt for more info about build usage and concepts.

Common goals are:

    clean                  (aka clobber) equivalent to rm -rf out/

    checkbuild              Build every module defined in the source tree

    droid                  Default target

    nothing                Do not build anything, just parse and validate the build structure

    java                    Build all the java code in the source tree

    native                  Build all the native code in the source tree

    host                    Build all the host code (not to be run on a device) in the source tree

    target                  Build all the target code (to be run on the device) in the source tree

    (java|native)-(host|target)

    (host|target)-(java|native)

                            Build the intersection of the two given arguments

    snod                    Quickly rebuild the system image from built packages

                            Stands for "System, NO Dependencies"

    vnod                    Quickly rebuild the vendor image from built packages

                            Stands for "Vendor, NO Dependencies"

    pnod                    Quickly rebuild the product image from built packages

                            Stands for "Product, NO Dependencies"

So, for example, you could run:

cd '"${TOP}"'

source build/envsetup.sh

lunch aosp_arm-userdebug

m -j java

to build all of the java code for the userdebug variant of the aosp_arm device.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容