aboutsummaryrefslogtreecommitdiffstats
path: root/help.sh
diff options
context:
space:
mode:
authorJeff Gaston <jeffrygaston@google.com>2017-05-31 00:12:37 (GMT)
committerJeff Gaston <jeffrygaston@google.com>2017-08-09 19:58:30 (GMT)
commitc6dfc4e95a4c09fad1bf53091b658dacb504a76c (patch)
tree387f0062881cfe23c11680796dd0e6226864fef0 /help.sh
parent374f7532110d0a1d7ed92a5cb243c92310318b10 (diff)
downloadandroid_build-c6dfc4e95a4c09fad1bf53091b658dacb504a76c.zip
android_build-c6dfc4e95a4c09fad1bf53091b658dacb504a76c.tar.gz
android_build-c6dfc4e95a4c09fad1bf53091b658dacb504a76c.tar.bz2
Consolidate build system usage documentation into source control
Bug: 62201421 Test: make help Change-Id: I7a7c917f767590657761396dd0545224ff98f27b
Diffstat (limited to 'help.sh')
-rwxr-xr-xhelp.sh53
1 files changed, 53 insertions, 0 deletions
diff --git a/help.sh b/help.sh
new file mode 100755
index 0000000..c031dcc
--- /dev/null
+++ b/help.sh
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# locate some directories
+cd "$(dirname $0)"
+SCRIPT_DIR="${PWD}"
+cd ../..
+TOP="${PWD}"
+
+message='The basic Android build process is:
+
+cd '"${TOP}"'
+source build/envsetup.sh # Add "lunch" (and other utilities and variables)
+ # to the shell environment.
+lunch [<product>-<variant>] # Choose the device to target.
+m -j [<goals>] # Execute the configured build.
+
+Usage of "m" imitates usage of the program "make".
+See '"${SCRIPT_DIR}"'/README.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"
+
+
+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.
+'
+
+echo "$message"