def kwarg_strings_to_includedirs(self, kwargs):
    if ('d_import_dirs' in kwargs):
        items = mesonlib.extract_as_list(kwargs, 'd_import_dirs')
        cleaned_items = []
        for i in items:
            if isinstance(i, str):
                if os.path.normpath(i).startswith(self.environment.get_source_dir()):
                    mlog.warning('Building a path to the source dir is not supported. Use a relative path instead.\nThis will become a hard error in the future.', location=self.current_node)
                    i = os.path.relpath(i, os.path.join(self.environment.get_source_dir(), self.subdir))
                    i = self.build_incdir_object([i])
            cleaned_items.append(i)
        kwargs['d_import_dirs'] = cleaned_items
def kwarg_strings_to_includedirs(self, kwargs):
    if ('d_import_dirs' in kwargs):
        items = mesonlib.extract_as_list(kwargs, 'd_import_dirs')
        cleaned_items = []
        for i in items:
            if isinstance(i, str):
                if os.path.normpath(i).startswith(self.environment.get_source_dir()):
                    mlog.warning('Building a path to the source dir is not supported. Use a relative path instead.\nThis will become a hard error in the future.', location=self.current_node)
                    i = os.path.relpath(i, os.path.join(self.environment.get_source_dir(), self.subdir))
                    i = self.build_incdir_object([i])
            cleaned_items.append(i)
        kwargs['d_import_dirs'] = cleaned_items