1# Copyright (c) 2021 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/config/python.gni") 15import("//build/ohos/build_var.gni") 16 17_sa_profile_info_file = "$root_out_dir/src_sa_infos_tmp.json" 18generated_file("generated_src_sa_profile") { 19 deps = [ "//build/ohos/common:generate_src_installed_info" ] 20 21 outputs = [ _sa_profile_info_file ] 22 data_keys = [ "sa_install_info" ] 23 output_conversion = "json" 24} 25 26action_with_pydeps("src_sa_infos_process") { 27 deps = [ ":generated_src_sa_profile" ] 28 script = "//build/ohos/sa_profile/src_sa_profile_process.py" 29 sa_profile_src_infos_file = "${product_output_dir}/src_sa_infos.json" 30 31 # variants-toolchain-file from //build/ohos/build_var.gni 32 sources = [ _sa_profile_info_file ] 33 outputs = [ sa_profile_src_infos_file ] 34 depfile = "$target_gen_dir/$target_name.d" 35 args = [ 36 "--sa-profile-infos-file", 37 rebase_path(_sa_profile_info_file, root_build_dir), 38 "--variants-toolchain-file", 39 rebase_path(variants_toolchain_file, root_build_dir), 40 "--output-file", 41 rebase_path(sa_profile_src_infos_file, root_build_dir), 42 "--depfile", 43 rebase_path(depfile, root_build_dir), 44 ] 45} 46