OSDN Git Service

Move the dist-as-droid handling from make to ninja
authorColin Cross <ccross@android.com>
Wed, 30 Sep 2015 00:11:42 +0000 (17:11 -0700)
committerColin Cross <ccross@android.com>
Wed, 30 Sep 2015 00:15:09 +0000 (17:15 -0700)
commit80e46c7c5cb7b1d80114876d301798a8624b4200
tree02acacfc0360fa0c5134e10e6c1c6169b8d5715f
parent8f9f01bbc3968be4e99fbd9bb2ba38314875e8dc
Move the dist-as-droid handling from make to ninja

dist is a strange dual-use target, as both a flag and a goal.  make dist
<target> means build <target>, but copy any dist-for-goals files to
$DIST_DIR.  make dist without a target means build droid with
dist-for-goals files.  This requires special handling of MAKECMDGOALS to
detect the case where dist is the only goal, which breaks when ninja.mk
doesn't pass all the goals to kati.  Instead, let ninja handle the
default goal.  Pass dist to kati if it is specified in order to turn on
the dist-for-goal rules, but filter it out of the goals passed to
ninja.  If there are any other goals, ninja will build them.  If there
are no goals, ninja will fall back to the default goal, which is droid.

Change-Id: Iafb184d28cb312cb7c5682cd3ff4f310b2d9f7e9
core/distdir.mk
core/ninja.mk