|
@@ -366,7 +366,9 @@ func (a *AndroidMkEntries) getDistContributions(mod blueprint.Module) *distContr
|
|
// Collate the contributions this module makes to the dist.
|
|
// Collate the contributions this module makes to the dist.
|
|
distContributions := &distContributions{}
|
|
distContributions := &distContributions{}
|
|
|
|
|
|
- distContributions.licenseMetadataFile = amod.licenseMetadataFile
|
|
|
|
|
|
+ if !exemptFromRequiredApplicableLicensesProperty(mod.(Module)) {
|
|
|
|
+ distContributions.licenseMetadataFile = amod.licenseMetadataFile
|
|
|
|
+ }
|
|
|
|
|
|
// Iterate over this module's dist structs, merged from the dist and dists properties.
|
|
// Iterate over this module's dist structs, merged from the dist and dists properties.
|
|
for _, dist := range amod.Dists() {
|
|
for _, dist := range amod.Dists() {
|
|
@@ -458,10 +460,12 @@ func generateDistContributionsForMake(distContributions *distContributions) []st
|
|
ret = append(ret, fmt.Sprintf(".PHONY: %s\n", d.goals))
|
|
ret = append(ret, fmt.Sprintf(".PHONY: %s\n", d.goals))
|
|
// Create dist-for-goals calls for each of the copy instructions.
|
|
// Create dist-for-goals calls for each of the copy instructions.
|
|
for _, c := range d.copies {
|
|
for _, c := range d.copies {
|
|
- ret = append(
|
|
|
|
- ret,
|
|
|
|
- fmt.Sprintf("$(if $(strip $(ALL_TARGETS.%s.META_LIC)),,$(eval ALL_TARGETS.%s.META_LIC := %s))\n",
|
|
|
|
- c.from.String(), c.from.String(), distContributions.licenseMetadataFile.String()))
|
|
|
|
|
|
+ if distContributions.licenseMetadataFile != nil {
|
|
|
|
+ ret = append(
|
|
|
|
+ ret,
|
|
|
|
+ fmt.Sprintf("$(if $(strip $(ALL_TARGETS.%s.META_LIC)),,$(eval ALL_TARGETS.%s.META_LIC := %s))\n",
|
|
|
|
+ c.from.String(), c.from.String(), distContributions.licenseMetadataFile.String()))
|
|
|
|
+ }
|
|
ret = append(
|
|
ret = append(
|
|
ret,
|
|
ret,
|
|
fmt.Sprintf("$(call dist-for-goals,%s,%s:%s)\n", d.goals, c.from.String(), c.dest))
|
|
fmt.Sprintf("$(call dist-for-goals,%s,%s:%s)\n", d.goals, c.from.String(), c.dest))
|