1# Deprecation of Make
2
3We've made significant progress converting AOSP from Make to Soong (Android.mk
4to Android.bp), and we're ready to start turning off pieces of Make. If you
5have any problems converting, please contact us via:
6
7* The [android-building@googlegroups.com] group.
8* Our [public bug tracker](https://issuetracker.google.com/issues/new?component=381517).
9* Or privately through your existing contacts at Google.
10
11## Status
12
13[build/make/core/deprecation.mk] is the source of truth, but for easy browsing:
14
15| Module type                      | State     |
16| -------------------------------- | --------- |
17| `BUILD_AUX_EXECUTABLE`           | Obsolete  |
18| `BUILD_AUX_STATIC_LIBRARY`       | Obsolete  |
19| `BUILD_COPY_HEADERS`             | Error     |
20| `BUILD_HOST_EXECUTABLE`          | Error     |
21| `BUILD_HOST_FUZZ_TEST`           | Obsolete  |
22| `BUILD_HOST_NATIVE_TEST`         | Obsolete  |
23| `BUILD_HOST_SHARED_LIBRARY`      | Error     |
24| `BUILD_HOST_SHARED_TEST_LIBRARY` | Obsolete  |
25| `BUILD_HOST_STATIC_LIBRARY`      | Error     |
26| `BUILD_HOST_STATIC_TEST_LIBRARY` | Obsolete  |
27| `BUILD_HOST_TEST_CONFIG`         | Obsolete  |
28| `BUILD_NATIVE_BENCHMARK`         | Obsolete  |
29| `BUILD_SHARED_TEST_LIBRARY`      | Obsolete  |
30| `BUILD_STATIC_TEST_LIBRARY`      | Obsolete  |
31| `BUILD_TARGET_TEST_CONFIG`       | Obsolete  |
32| `BUILD_*`                        | Available |
33
34## Module Type Deprecation Process
35
36We'll be turning off `BUILD_*` module types as all of the users are removed
37from AOSP (and Google's internal trees). The process will go something like
38this, using `BUILD_PACKAGE` as an example:
39
40* Prerequisite: all common users of `BUILD_PACKAGE` have been removed (some
41  device-specific ones may remain).
42* `BUILD_PACKAGE` will be moved from `AVAILABLE_BUILD_MODULE_TYPES` to
43  `DEFAULT_WARNING_BUILD_MODULE_TYPES` in [build/make/core/deprecation.mk]. This
44  will make referring to `BUILD_PACKAGE` a warning.
45* Any devices that still have warnings will have
46  `BUILD_BROKEN_USES_BUILD_PACKAGE := true` added to their `BoardConfig.mk`.
47* `BUILD_PACKAGE` will be switched from `DEFAULT_WARNING_BUILD_MODULE_TYPES` to
48  `DEFAULT_ERROR_BUILD_MODULE_TYPES`, which will turn referring to
49  `BUILD_PACKAGE` into an error unless the device has overridden it.
50* At some later point, after all devices in AOSP no longer set
51  `BUILD_BROKEN_USES_BUILD_PACKAGE`, `BUILD_PACKAGE` will be moved from
52  `DEFAULT_ERROR_BUILD_MODULE_TYPES` to `OBSOLETE_BUILD_MODULE_TYPES` and the
53  code will be removed. It will no longer be possible to use `BUILD_PACKAGE`.
54
55In most cases, we expect module types to stay in the default warning state for
56about two weeks before becoming an error by default. Then it will spend some
57amount of time in the default error state before moving to obsolete -- we'll
58try and keep that around for a while, but other development may cause those to
59break, and the fix may to be to obsolete them. There is no expectation that the
60`BUILD_BROKEN_USES_BUILD_*` workarounds will work in a future release, it's a
61short-term workaround.
62
63Just to be clear, the above process will happen on the AOSP master branch. So
64if you're following Android releases, none of the deprecation steps will be in
65Android Q, and the 2020 release will have jumped directly to the end for many
66module types.
67
68[android-building@googlegroups.com]: https://groups.google.com/forum/#!forum/android-building
69[build/make/core/deprecation.mk]: /core/deprecation.mk
70