commit | ce000fdc4d7bbc5729f681435b1daf50e9db3a28 | [log] [tgz] |
---|---|---|
author | Guillaume Chelfi <chelfi@google.com> | Thu Oct 03 12:02:46 2019 +0200 |
committer | Guillaume Chelfi <chelfi@google.com> | Thu Oct 03 12:02:46 2019 +0200 |
tree | 15b7ca81a1183f591aba901a072c58928fc01692 | |
parent | 147f46ba723143840d34adb92fbc942816a5bb36 [diff] |
Fix zsh compatibility issue in build/envsetup.sh Arrays are zero indexed in bash and one indexed in zsh by default. This leads to an off-by-one issue in the `godir` and `choosevariant` commands: when prompted to chose an option, in order to pick option "n" you have to input "n+1". In those two specific instances, by using "substring expansion" instead of array indexing, one can get consistent behaviour between bash and zsh (equivalent to zero indexing). Test: manual - # godir $ zsh $ source build/envsetup.sh $ godir SurfaceFlinger # There should be many options # Pick 1, check that you end up in the right location $ godir SurfaceFlinger.cpp # There should be only one possibility # make sure you end up in the right location # repeat with bash (to ensure compatibility is not broken) # choosevariant $ zsh $ source build/envsetup.h $ choosevariant # pick whatever variant you want $ printconfig # make sure the variant matches your choice # repeat with bash (to ensure compatibility is not broken) Change-Id: I998d8fb48b708066b6db28a2129a2b09785fb0b1
This is the Makefile-based portion of the Android Build System.
For documentation on how to run a build, see Usage.txt
For a list of behavioral changes useful for Android.mk writers see Changes.md
For an outdated reference on Android.mk files, see build-system.html. Our Android.mk files look similar, but are entirely different from the Android.mk files used by the NDK build system. When searching for documentation elsewhere, ensure that it is for the platform build system -- most are not.
This Makefile-based system is in the process of being replaced with Soong, a new build system written in Go. During the transition, all of these makefiles are read by Kati, and generate a ninja file instead of being executed directly. That's combined with a ninja file read by Soong so that the build graph of the two systems can be combined and run as one.