parameters: (env)
return_statement: return opts
docstring: Parse MAKEFLAGS from the environment into a sequence of command-line arguments.
docstring_summary: Parse MAKEFLAGS from the environment into a sequence of command-line arguments.
docstring_tokens: Parse MAKEFLAGS from the environment into a sequence of command - line arguments .
function: def parsemakeflags(env):
      """
      Parse MAKEFLAGS from the environment into a sequence of command-line arguments.
      """
  
      makeflags = env.get('MAKEFLAGS', '')
      makeflags = makeflags.strip()
  
      if makeflags == '':
          return []
  
      if _simpleopts.match(makeflags):
          makeflags = '-' + makeflags
  
      opts = []
      curopt = ''
  
      i = 0
      while i < len(makeflags):
          c = makeflags[i]
          if c.isspace():
              opts.append(curopt)
              curopt = ''
              i += 1
              while i < len(makeflags) and makeflags[i].isspace():
                  i += 1
              continue
  
          if c == '\\':
              i += 1
              if i == len(makeflags):
                  raise data.DataError("MAKEFLAGS has trailing backslash")
              c = makeflags[i]
              
          curopt += c
          i += 1
  
      if curopt != '':
          opts.append(curopt)
  
      return opts
function_tokens: def parsemakeflags ( env ) : makeflags = env . get ( 'MAKEFLAGS' , '' ) makeflags = makeflags . strip ( ) if makeflags == '' : return [ ] if _simpleopts . match ( makeflags ) : makeflags = '-' + makeflags opts = [ ] curopt = '' i = 0 while i < len ( makeflags ) : c = makeflags [ i ] if c . isspace ( ) : opts . append ( curopt ) curopt = '' i += 1 while i < len ( makeflags ) and makeflags [ i ] . isspace ( ) : i += 1 continue if c == '\\' : i += 1 if i == len ( makeflags ) : raise data . DataError ( "MAKEFLAGS has trailing backslash" ) c = makeflags [ i ] curopt += c i += 1 if curopt != '' : opts . append ( curopt ) return opts