Simran Basi | 03f5253 | 2018-09-06 12:23:11 -0700 | [diff] [blame] | 1 | # Copyright (C) 2018 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
Florian Mayer | 5e3f57c | 2023-02-22 00:18:08 +0000 | [diff] [blame] | 14 | # Create an artifact to include OWNERS files in source tree. |
Simran Basi | 03f5253 | 2018-09-06 12:23:11 -0700 | [diff] [blame] | 15 | |
| 16 | .PHONY: owners |
| 17 | |
| 18 | intermediates := $(call intermediates-dir-for,PACKAGING,owners) |
| 19 | owners_zip := $(intermediates)/owners.zip |
| 20 | owners_list := $(OUT_DIR)/.module_paths/OWNERS.list |
| 21 | owners := $(file <$(owners_list)) |
| 22 | $(owners_zip) : PRIVATE_owners := $(subst $(newline),\n,$(owners)) |
| 23 | |
| 24 | $(owners_zip) : $(owners) $(SOONG_ZIP) |
| 25 | @echo "Building artifact to include OWNERS files." |
| 26 | rm -rf $@ |
| 27 | echo -e "$(PRIVATE_owners)" > $@.list |
| 28 | $(SOONG_ZIP) -o $@ -C . -l $@.list |
| 29 | rm -f $@.list |
| 30 | |
| 31 | owners : $(owners_zip) |
| 32 | |
| 33 | $(call dist-for-goals, general-tests, $(owners_zip)) |
Bob Badour | 3a0f0c1 | 2022-04-05 10:43:45 -0700 | [diff] [blame] | 34 | |
| 35 | $(call declare-0p-target,$(owners_zip)) |