Commit graph

24 commits

Author SHA1 Message Date
Bob Badour
40d38b48ec Revert "Revert "Target dist files not dist goals.""
This reverts commit 9f1fad04ce.

Reason for revert: Fixed latent bug in OTA test

This change creates license texts and lists of projects to share for
individual files in dist instead of for dist goals.

If a distribution needs the license texts for part of a dist file or
for a combination of multiple files, whoever is distributing will have
to create a suitable text notice using `gen_notice{}` or `testnotice`
and include it among the dist files for the goal using `dist-for-goals`
or equivalent.

Bug: 151177513
Bug: 210912771
Bug: 235333302
Bug: 232138105
Bug: 235302632

Test: m cts dist

Test: m droid dist

Test: tapas google-tradefed-all && m dist

Change-Id: I9fbcb07acfa7b14a140563cb031374160b6b23c2
Merged-in: I9fbcb07acfa7b14a140563cb031374160b6b23c2
2022-06-28 01:17:56 +00:00
Bob Badour
9f1fad04ce Revert "Target dist files not dist goals."
This reverts commit 0b907f3944.

Reason for revert: Possible cause of b/236556224

Bug: 236556224

Change-Id: I2faefbdf58202d0033bee15a2eda7a75e44a1bec
2022-06-21 22:27:59 +00:00
Bob Badour
0b907f3944 Target dist files not dist goals.
It turns out dist goals do not map well to units of code distributed.
They often build a combination of files to distribute and files for
internal use only.

This change creates license texts and lists of projects to share for
individual files in dist instead of for dist goals.

If a distribution needs the license texts for part of a dist file or
for a combination of multiple files, whoever is distributing will have
to create a suitable text notice using `gen_notice{}` or `testnotice`
and include it among the dist files for the goal using `dist-for-goals`
or equivalent.

Bug: 151177513
Bug: 210912771
Bug: 235333302
Bug: 232138105
Bug: 235302632

Test: m cts dist

Test: m droid dist

Test: tapas google-tradefed-all && m dist

Change-Id: Id78f032575a2ac1a3cc70643b3ae4d2e6c32da04
2022-06-17 13:11:22 -07:00
Bob Badour
dce80abbe3 Revert "Revert "Record license text for every dist target.""
This reverts commit 1e27f4fff9.

Reason for revert: Rolling forward again without 'all' target.

Bug: 151177513
Bug: 210912771
Bug: 235333302
Bug: 232138105

Test: m droid dist reportmissinglicenses

Test: tapas google-tradefed-all && m dist

Change-Id: I392047ec50ac6e74b9accf260c62e77aef1640d5
2022-06-15 13:06:18 -07:00
Bob Badour
d227fac95b Revert "Revert "Revert "Revert "Create lists of projects to share per dist target""""
This reverts commit 398bd87950.

Reason for revert: Rolling forward again without 'all' target.

Bug: 151177513
Bug: 210912771
Bug: 235333302
Bug: 232138105

Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_coral_hwasan TARGET_BUILD_VARIANT=userdebug droid dist with-license platform_tests continuous_instrumentation_tests continuous_native_tests

Test: tapas google-tradefed-all && m dist

Change-Id: I1e5f5639ebf1fa61060124a5183f6f0a2ece04b5
2022-06-14 11:33:54 -07:00
Bob Badour
398bd87950 Revert "Revert "Revert "Create lists of projects to share per dist target"""
This reverts commit 82040d9882.

Reason for revert: Advised to switch to using TARGET_BUILD_APPS

Change-Id: If56a1fceb5da66b90b7b0ec2275ec429661515b4
2022-06-14 00:03:23 +00:00
Bob Badour
1e27f4fff9 Revert "Record license text for every dist target."
This reverts commit 5c0ec6a5a6.

Reason for revert: Advised to switch to using TARGET_BUILD_APPS

Change-Id: I1442998bbafe909a0796abdb2e9691a0c4c099d6
2022-06-13 19:38:01 +00:00
Bob Badour
5c0ec6a5a6 Record license text for every dist target.
Bug: 151177513
Bug: 210912771
Bug: 235333302
Bug: 232138105

Test: build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_coral_hwasan TARGET_BUILD_VARIANT=userdebug droid dist with-license platform_tests continuous_instrumentation_tests continuous_native_tests

Change-Id: Ibd737c0dd0a35e19529ab08472f4d1bc1195efbd
2022-06-08 18:49:37 -07:00
Bob Badour
82040d9882 Revert "Revert "Create lists of projects to share per dist target""
This reverts commit 59e4951021.

Reason for revert: Attempt to roll forward again.

Test: m droid dist reportmissinglicenses

Change-Id: Ibf5a9869d03726e279fb23bf68ca66547b972138
2022-06-08 18:49:20 -07:00
Bob Badour
59e4951021 Revert "Create lists of projects to share per dist target"
This reverts commit 1fd4bda634.

Reason for revert: Causes flaky build breakages

Bug: 229319921

Change-Id: I82e660e95c8d4d72b88d2de58d82e0d4be901869
2022-04-15 17:29:26 +00:00
Bob Badour
1fd4bda634 Create lists of projects to share per dist target
Bug: 151177513
Bug: 213388645
Bug: 210912771

Test: m droid dist reportmissinglicenses
Change-Id: I23ee3a983c205ee2a62e47edc2039b7cc713c420
2022-04-13 11:27:59 -07:00
Dan Willemsen
a3f6632de9 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Test: treehugger
Change-Id: Iea6caf3c08252a560155e095135c5ddaad712991
Merged-In: Iea6caf3c08252a560155e095135c5ddaad712991
2020-08-11 01:12:01 +00:00
Dan Willemsen
c904e48cc5 Fix dist-for-goals with no targets
Bug: 117463001
Test: m dist vts
Change-Id: I9bfe01472dcf3d3729a109e4de383d35e3af9df0
2018-10-20 16:59:41 -07:00
Dan Willemsen
78c40be560 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
2018-10-20 21:44:44 +00:00
Jayant Chowdhary
85fbcf4a68 Export DIST_DIR to soong on dist builds.
Bug: 64267858

Test: Adding DistDir to build/soong/android/variable.go enables access
      to DIST_DIR_SOONG.

Change-Id: I74faea11255edf37db6a4eaf193df300c363bfb7
2017-11-28 11:26:24 -08:00
Dan Willemsen
562baccae8 Remove the rest of showcommands, dist goal
showcommands is all handled in soong_ui, make/kati/ninja never see the
argument.

Remove the dist goal, since we'll never pass it to ninja, only to Kati
as a modifier.

Remove DUMP_%, since that's not used anywhere (it appears to be in our
code search via the NDK build system)

Test: m -j showcommands dist
Change-Id: I0d1498128caece685e98c2c2b5b0c3f545da0e11
2017-05-26 12:57:04 -07:00
Ying Wang
4a4a0bc38f Sort out ANDROID_GOALS, KATI_GOALS and NINJA_GOALS.
ANDROID_GOALS: any Android goals that need to be built.
KATI_GOALS: goals that we need to pass to Kati.
NINJA_GOALS: goals we need to pass to Ninja.

For modifier Android goals (dist, INTERNAL_MODIFIER_TARGETS),
we don't need to pass them to Ninja. See also commit
80e46c7c5c.
Restore the dist rule removed by the above commit.

Previously "droid" was never passed to Ninja. That's incorrect.
"make droid docs" should build both docs and droiod.
Fixed with this change.

Change-Id: I5c28061fe0ebe7848872ee349056d029b787ff71
2015-11-03 17:10:28 -08:00
Colin Cross
80e46c7c5c 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
2015-09-29 17:15:09 -07:00
Ying Wang
534fcd766e Allow to call dist-for-goals multiple times for the same file
You can dist the same file for multiple goals in multiple calls to
dist-for-goals. The first call will establish the real copy rule, while
the rest call just establishes the goals' dependency on the dest file.
This enable uss to remove the bizarre $(if ..) enclosing the droid and
sdk dist while avoiding make's multiple rules warning.

Change-Id: I76475db76a9e6167e0e606dd582b54e80dfcdd22
2013-03-01 16:51:26 -08:00
The Android Open Source Project
88b607994a auto import from //depot/cupcake/@135843 2009-03-03 19:28:42 -08:00
The Android Open Source Project
05806d7af6 auto import from //depot/cupcake/@135843 2009-03-03 18:28:14 -08:00
The Android Open Source Project
475fa12ade auto import from //branches/cupcake/...@130745 2009-02-10 15:43:57 -08:00
The Android Open Source Project
dcc08f073b Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:49 -08:00
The Android Open Source Project
b6c1cf6de7 Initial Contribution 2008-10-21 07:00:00 -07:00