def _process_script_args(self, name: str, args: T.List[T.Union[(str, mesonlib.File, CustomTargetHolder, CustomTargetIndexHolder, ConfigureFileHolder, ExternalProgramHolder, ExecutableHolder)]], allow_built: bool=False) -> T.List[str]:
    script_args = []
    new = False
    for a in args:
        a = unholder(a)
        if isinstance(a, str):
            script_args.append(a)
        elif isinstance(a, mesonlib.File):
            new = True
            script_args.append(a.rel_to_builddir(self.interpreter.environment.source_dir))
        elif isinstance(a, (build.BuildTarget, build.CustomTarget, build.CustomTargetIndex)):
            if (not allow_built):
                raise InterpreterException('Arguments to {} cannot be built'.format(name))
            new = True
            script_args.extend([os.path.join(a.get_subdir(), o) for o in a.get_outputs()])
            if isinstance(a, build.CustomTargetIndex):
                a.target.build_by_default = True
            else:
                a.build_by_default = True
        elif isinstance(a, build.ConfigureFile):
            new = True
            script_args.append(os.path.join(a.subdir, a.targetname))
        elif isinstance(a, dependencies.ExternalProgram):
            script_args.extend(a.command)
            new = True
        else:
            raise InterpreterException('Arguments to {} must be strings, Files, CustomTargets, Indexes of CustomTargets, or ConfigureFiles'.format(name))
    if new:
        FeatureNew('Calling "{}" with File, CustomTaget, Index of CustomTarget, ConfigureFile, Executable, or ExternalProgram'.format(name), '0.55.0').use(self.interpreter.subproject)
    return script_args
def _process_script_args(self, name: str, args: T.List[T.Union[(str, mesonlib.File, CustomTargetHolder, CustomTargetIndexHolder, ConfigureFileHolder, ExternalProgramHolder, ExecutableHolder)]], allow_built: bool=False) -> T.List[str]:
    script_args = []
    new = False
    for a in args:
        a = unholder(a)
        if isinstance(a, str):
            script_args.append(a)
        elif isinstance(a, mesonlib.File):
            new = True
            script_args.append(a.rel_to_builddir(self.interpreter.environment.source_dir))
        elif isinstance(a, (build.BuildTarget, build.CustomTarget, build.CustomTargetIndex)):
            if (not allow_built):
                raise InterpreterException('Arguments to {} cannot be built'.format(name))
            new = True
            script_args.extend([os.path.join(a.get_subdir(), o) for o in a.get_outputs()])
            if isinstance(a, build.CustomTargetIndex):
                a.target.build_by_default = True
            else:
                a.build_by_default = True
        elif isinstance(a, build.ConfigureFile):
            new = True
            script_args.append(os.path.join(a.subdir, a.targetname))
        elif isinstance(a, dependencies.ExternalProgram):
            script_args.extend(a.command)
            new = True
        else:
            raise InterpreterException('Arguments to {} must be strings, Files, CustomTargets, Indexes of CustomTargets, or ConfigureFiles'.format(name))
    if new:
        FeatureNew('Calling "{}" with File, CustomTaget, Index of CustomTarget, ConfigureFile, Executable, or ExternalProgram'.format(name), '0.55.0').use(self.interpreter.subproject)
    return script_args