Envsetup. Sh for Android build System Analysis

Source: Internet
Author: User

The first thing that comes to the android source directory is probably to execute. Build/envsetup. Sh first to initialize some commands. Today, we mainly analyze envsetup. Sh.

1. The command-that is, the function in envsetup. Sh

Function help () # display help information
Function get_abs_build_var () # obtain Absolute Variables
Function get_build_var () # obtain Absolute Variables
Function check_product () # Check Product
Function check_variant () # Check Variables
Function setpaths () # Set the file path
Function printconfig () # print the configuration
Function set_stuff_for_environment () # Set Environment Variables
Function set_sequence_number () # Set the serial number
Function settitle () # Set the title
Function choosetype () # Set Type
Function chooseproduct () # Set Product
Function choosevariant () # Set Variant
Function tapas () # functions the same as choosecombo
Function choosecombo () # Set compilation Parameters
Function add_lunch_combo () # Add a lunch project
Function print_lunch_menu () # print the lunch list
Function lunch () # configure lunch
Function M () # make from top
Function findmakefile () # Find makefile
Function mm () # make from current directory
Function Mmm () # Make the supplied Directories
Function Croot () # Return to the root directory
Function cproj ()
Function PID ()
Function systemstack ()
Function gdbclient ()
Function jgrep () # Find a Java File
Function cgrep () # Find the C/CPP File
Function resgrep ()
Function tracedmdump ()
Function runhat ()
Function getbugreports ()
Function startviewserver ()
Function stopviewserver ()
Function isviewserverstarted ()
Function smoketest ()
Function runtest ()
Function godir () # Jump to the specified directory

 

# Add the default one here
Add_lunch_combo generic-Eng

 

# Execute the contents of any vendorsetup. Sh files we can find.
For f in '/bin/ls vendor/*/vendorsetup. Sh vendor/*/build/vendorsetup. Sh 2>/dev/null'
Do
Echo "including $ F"
. $ F
Done

 

2. Lunch command

Someone has analyzed it and moved it directly:

Http://www.lupaworld.com/home.php? MoD = Space & uid = 131820 & Do = Blog & id = 149462

Here we will talk about the check_product process:

To be continued

3. choosecombo

To be continued

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.