1#
2# Copyright (C) 2019 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8#      http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17shareduid_violation_modules_filename := $(PRODUCT_OUT)/shareduid_violation_modules.json
18
19$(shareduid_violation_modules_filename): $(INSTALLED_SYSTEMIMAGE_TARGET) \
20    $(INSTALLED_RAMDISK_TARGET) \
21    $(INSTALLED_BOOTIMAGE_TARGET) \
22    $(INSTALLED_USERDATAIMAGE_TARGET) \
23    $(INSTALLED_VENDORIMAGE_TARGET) \
24    $(INSTALLED_PRODUCTIMAGE_TARGET) \
25    $(INSTALLED_SYSTEM_EXTIMAGE_TARGET)
26
27$(shareduid_violation_modules_filename): $(HOST_OUT_EXECUTABLES)/find_shareduid_violation
28$(shareduid_violation_modules_filename): $(AAPT2)
29	$(HOST_OUT_EXECUTABLES)/find_shareduid_violation \
30		--product_out $(PRODUCT_OUT) \
31		--aapt $(AAPT2) \
32		--copy_out_system $(TARGET_COPY_OUT_SYSTEM) \
33		--copy_out_vendor $(TARGET_COPY_OUT_VENDOR) \
34		--copy_out_product $(TARGET_COPY_OUT_PRODUCT) \
35		--copy_out_system_ext $(TARGET_COPY_OUT_SYSTEM_EXT) \
36		> $@
37
38$(call dist-for-goals,droidcore,$(shareduid_violation_modules_filename))
39