import("$tizen_core/build/hash.gni")
template("merge_configs") {
    forward_variables_from(invoker, [ "configFiles" ])

    target = target_name
    out_file = "${root_out_dir}/$web_out_dir/config.xml"
    action(target) {
        command = "$tizen_core/uutils cp"
        description = "Config {{output}}"
        args = []
        args += rebase_path(configFiles, root_out_dir)
        args += rebase_path([ out_file ], root_out_dir)
        sources = configFiles
        outputs = [ out_file ]
    }

    calc_hash("$target.hash") {
        file_to_hash = out_file
        deps = [ ":$target" ]
    }
}
