Stop using DIST_DIR directly, use dist-for-goals

We're moving DIST_DIR handling outside of the Kati instance that reads
these makefiles. As such, the dist file actually needs to be represented
in the build graph, not as a side effect of a phony rule. All of the
dependencies of that phony rule must be actual files in that graph now
too, not other phony rules.

Bug: 117463001
Test: DIST_DIR=dist ./art/test/testrunner/run_build_test_target.py -j50 art-gtest
Change-Id: I15d5a2c28321ff7f0f8d7d99dc697bd0393380cb
diff --git a/test/testrunner/run_build_test_target.py b/test/testrunner/run_build_test_target.py
index 3160079..f262059 100755
--- a/test/testrunner/run_build_test_target.py
+++ b/test/testrunner/run_build_test_target.py
@@ -68,6 +68,8 @@
   build_command += ' -j' + str(n_threads)
   build_command += ' -C ' + env.ANDROID_BUILD_TOP
   build_command += ' ' + target.get('make')
+  if env.DIST_DIR:
+    build_command += ' dist'
   sys.stdout.write(str(build_command) + '\n')
   sys.stdout.flush()
   if subprocess.call(build_command.split()):