def add_target(self, name, tobj):
    if (name == ''):
        raise InterpreterException('Target name must not be empty.')
    if (name.strip() == ''):
        raise InterpreterException('Target name must not consist only of whitespace.')
    if name.startswith('meson-'):
        raise InvalidArguments("Target names starting with 'meson-' are reserved for Meson's internal use. Please rename.")
    if (name in coredata.forbidden_target_names):
        raise InvalidArguments(("Target name '%s' is reserved for Meson's internal use. Please rename." % name))
    idname = tobj.get_id()
    if (idname in self.build.targets):
        raise InvalidCode(('Tried to create target "%s", but a target of that name already exists.' % name))
    self.build.targets[idname] = tobj
    if (idname not in self.coredata.target_guids):
        self.coredata.target_guids[idname] = str(uuid.uuid4()).upper()
def add_target(self, name, tobj):
    if (name == ):
        raise InterpreterException('Target name must not be empty.')
    if (name.strip() == ):
        raise InterpreterException('Target name must not consist only of whitespace.')
    if name.startswith('meson-'):
        raise InvalidArguments("Target names starting with 'meson-' are reserved for Meson's internal use. Please rename.")
    if (name in coredata.forbidden_target_names):
        raise InvalidArguments(("Target name '%s' is reserved for Meson's internal use. Please rename." % name))
    idname = tobj.get_id()
    if (idname in self.build.targets):
        raise InvalidCode(('Tried to create target "%s", but a target of that name already exists.' % name))
    self.build.targets[idname] = tobj
    if (idname not in self.coredata.target_guids):
        self.coredata.target_guids[idname] = str(uuid.uuid4()).upper()