Allow recording ALL_DEPS by setting RECORD_ALL_DEPS
This change enables recording ALL_DEPS information
without having to specify the deps-license goal, which
can be useful to populate the dependencies field of
module-info.json for various types of post-processing.
Usage: `RECORD_ALL_DEPS=true make droid` (preferred), or
`make RECORD_ALL_DEPS=true droid`.
Test: make, inspect module-info.json
Test: RECORD_ALL_DEPS=true make, inspect module-info.json
Bug: 151755703
Change-Id: Ib81a8dfb0ecbe0b63be320a9d33e558b419cb4b2
diff --git a/core/config.mk b/core/config.mk
index 160614d..69e2b5c 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -1218,4 +1218,7 @@
DEFAULT_DATA_OUT_MODULES := ltp $(ltp_packages) $(kselftest_modules)
.KATI_READONLY := DEFAULT_DATA_OUT_MODULES
+# Make RECORD_ALL_DEPS readonly and also set it if deps-license is a goal.
+RECORD_ALL_DEPS :=$= $(filter true,$(RECORD_ALL_DEPS))$(filter deps-license,$(MAKECMDGOALS))
+
include $(BUILD_SYSTEM)/dumpvar.mk