The way to output print data in Makefile Android.mk file.txt
- bridgesaagaard48dg
- Jun 14, 2020
- 1 min read
The process of printing the output data in the makefile is: $(warningxxxxx) or $(errorxxxxx) The output variable method is: $(warning$(XXX)) Android compilation order Summary Android compilation:
1. The construct.sh script:
The script selects the compiled project according to the parameters passed in:
One example is, ./ fatfile will enter the if statement mainly because $1=P729B_CN.
if['$1'='XXX']];thensource./$1/customize.sh//Execute custom directory copy script./ what is a fat partition .shupdate-api//Generate present.xml file, update api. ./build_blade.sh$2//Compile the version in accordance with the second parameter systemimage passed in. Both: ./build_mooncake.shsystemimage
fi2, build_XXX.sh script
From the above we can see that the compilation on the version entered the execution with the ./build_XXX.shsystemimage command. In this script:
sourcebuild/envsetup.sh/dev/null///Set environment variables
choosecomboDevicereleaseXXXeng//Select device
make-j4$1// to compile. That is equivalent to make-j4systemimage. Naturally, -j4 here selects the level of compilation according to your machine configuration. Among them, sourcebuild/envsetup.sh/dev/null sets the environment variable, that is also a parser for mm; choosecomboDevicereleaseXXXeng's choosecombo can be a function that comes with Google. In actual fact, he calls quite a few other files right here: choosesim$1 Opt for the target device choosetype$2 pick the target code format chooseproduct$3 opt for the item platform (mooncake) choosevariant$4 opt for the version mode set_stuff_for_environment configure through build/core/config.mk printconfig print out the facts we just selected when we execute this command, Will print directly
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.1-update1
TARGET_PRODUCT=XXXTARGET_BUILD_VARIANT=user
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ERE27
============================================
And we have no option, if you would like to DIY your own version, you'll be able to straight implement choosecombo to manually pick. And we are executing choosesim$1 separately. Within the following function, we see that every single time choosesim$1 is executed, set_stuff_for_environment is completed after.
case`uname-s`inLinux)functionchoosesim()echo'Buildforthesimulatororthedevice?'echo'1.Device'echo'2.Simulator'echoexportTARGET_SIMULATOR=localANSWERwhile[-z$TARGET_SIMULATOR]doecho-n'Whichwouldyoulike?[1]'if[ -z'$1'];thenreadANSWERelseecho$1ANSWER=$1ficase$ANSWERin'')exportTARGET_SIMULATOR=false1)exportTARGET_SIMULATOR=falseDevice)exportTARGET_SIMULATOR=false2)exportTARGET_SIMULATOR=trueSimulator)exportTARGET_hoeULed'Idecho' -n'$1'];thenbreakfidoneset_stuff_for_environment*) choosecomboDevicereleasemooncake device This short article comes from the Linux Commune internet site (www.linuxidc.com) original link: http://www.linuxidc.com/Linux/2011-05/35787.htm
Comments