parameters: (env, name, flag, append=True)
docstring: Cause `flag` to be added to the CXXFLAGS-style env var named
      `name` held in the `env` dict.  `append` specifies whether the
      flag is added to the end (the default) or should be prepended if
      `name` already exists.
docstring_summary: Cause `flag` to be added to the CXXFLAGS-style env var named
      `name` held in the `env` dict.  `append` specifies whether the
      flag is added to the end (the default) or should be prepended if
      `name` already exists.
docstring_tokens: Cause flag to be added to the CXXFLAGS - style env var named name held in the env dict . append specifies whether the flag is added to the end ( the default ) or should be prepended if name already exists .
function: def add_flag(env, name, flag, append=True):
      """Cause `flag` to be added to the CXXFLAGS-style env var named
      `name` held in the `env` dict.  `append` specifies whether the
      flag is added to the end (the default) or should be prepended if
      `name` already exists."""
      val = shlex.split(env.get(name, ""))
      if append:
          val.append(flag)
      else:
          val.insert(0, flag)
      env.set(name, " ".join(val))
function_tokens: def add_flag ( env , name , flag , append = True ) : val = shlex . split ( env . get ( name , "" ) ) if append : val . append ( flag ) else : val . insert ( 0 , flag ) env . set ( name , " " . join ( val ) )