• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
14# Create an artifact to include TEST_MAPPING files in source tree.
15
16.PHONY: owners
17
18intermediates := $(call intermediates-dir-for,PACKAGING,owners)
19owners_zip := $(intermediates)/owners.zip
20owners_list := $(OUT_DIR)/.module_paths/OWNERS.list
21owners := $(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
31owners : $(owners_zip)
32
33$(call dist-for-goals, general-tests, $(owners_zip))
34