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/CleanSpec.mk b/CleanSpec.mk
index a9093d2..39441e1 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -512,6 +512,9 @@
 # Remove strip.sh intermediates to save space
 $(call add-clean-step, find $(OUT_DIR) \( -name "*.so.debug" -o -name "*.so.dynsyms" -o -name "*.so.funcsyms" -o -name "*.so.keep_symbols" -o -name "*.so.mini_debuginfo.xz" \) -print0 | xargs -0 rm -f)
 
+# Clean up old ninja files
+$(call add-clean-step, rm -f $(OUT_DIR)/build-*-dist*.ninja)
+
 # ************************************************
 # NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST
 # ************************************************