Create a new kati packaging step; move dist
Instead of looking at `dist` and DIST_DIR directly in the Kati Build
step, always write out information about every call to dist, then create
the rules in another ckati run.
So instead of having:
dist: <goal> -> <dist> -> <output>
\______________↑
nodist: <goal> -----------> <output>
Always use another phony target in the Kati Build step:
<goal> ---> <output>
\----> _dist_<goal>
Then in the packaging step (which is much faster), choose between dist
and no dist:
dist: _dist_<goal> -> <dist> -> <output>
nodist: _dist_<goal>
Bug: 117463001
Test: m dist
Change-Id: Ic96bb6356740300dd3113f6ed699e6a619360c40
diff --git a/core/main.mk b/core/main.mk
index 967f52b..3c4dd9a 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1490,6 +1490,8 @@
ndk: $(SOONG_OUT_DIR)/ndk.timestamp
.PHONY: ndk
+$(call dist-write-file,$(KATI_PACKAGE_MK_DIR)/dist.mk)
+
$(info [$(call inc_and_print,subdir_makefiles_inc)/$(subdir_makefiles_total)] writing build rules ...)
endif # KATI