Consider non-shipping lunch targets to be future.

Many places in the codebase have checks like this:

    if shipping level > X: do cool thing Y

This is great because it reduces the cost to upgrade and test
old Android devices or refactor their code. However, many
targets, such as the NDK, the SDK, mainline modules, and so on
do not set a shipping level, so they don't get to do the cool
thing Y.

In order to resolve this, we could modify every check to check
the default case. However, this is an invasive change, and it
is not maintainable. Instead, consider non-shipping products to
always be in the future.

In general, Android features are required to be backwards
compatible, so this should always work for things like mainline.

Also note, this means when someone adds a new feature Y like this,
they'll clearly see the impact of it being added everywhere, rather
than on such a small selection of newly shipping devices. This
avoids a risk where a change needs to be run on mainline modules (or
other targets) but is not tested in this configuration from the
start.

Future work: many `ifndef` checks can be cleaned up after this,
or if this approach makes sense, they can be cleaned up in this
CL.

Bug: 339026799
Bug: 279808973
Bug: 333908433
Test: builds of:
- errorprone-trunk_staging
- mainline_modules_sdks-trunk_staging-userdebug
- mainline_modules_x86_64-trunk_staging-userdebug
- ndk
- sdk-trunk_staging-userdebug

Test: too large number gives:
  build/make/core/product_config.mk:598: error: integer greater than 10001 is not supported!.

Change-Id: I17c34267f774ea8b9265e1d798a67af7838715c5
2 files changed
tree: 56b37f2abe7bcc65fe456f2a908212b9ed559eb3
  1. ci/
  2. common/
  3. core/
  4. packaging/
  5. target/
  6. teams/
  7. tests/
  8. tools/
  9. .gitignore
  10. Android.bp
  11. banchanHelp.sh
  12. buildspec.mk.default
  13. Changes.md
  14. CleanSpec.mk
  15. cogsetup.sh
  16. Deprecation.md
  17. envsetup.sh
  18. help.sh
  19. navbar.md
  20. OWNERS
  21. PREUPLOAD.cfg
  22. rbesetup.sh
  23. README.md
  24. shell_utils.sh
  25. tapasHelp.sh
  26. Usage.txt
README.md

Android Make Build System

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.