code: def write_makeconfig(_path):
      
      http_proxy = str(CFG["gentoo"]["http_proxy"])
      ftp_proxy = str(CFG["gentoo"]["ftp_proxy"])
      rsync_proxy = str(CFG["gentoo"]["rsync_proxy"])
  
      path.mkfile_uchroot(local.path('/') / _path)
      with open(_path, 'w') as makeconf:
          lines = '''
  PORTAGE_USERNAME=root
  PORTAGE_GROUPNAME=root
  CFLAGS="-O2 -pipe"
  CXXFLAGS="${CFLAGS}"
  FEATURES="nostrip -xattr"
  CHOST="x86_64-pc-linux-gnu"
  USE="bindist mmx sse sse2"
  PORTDIR="/usr/portage"
  DISTDIR="/mnt/distfiles"
  PKGDIR="${PORTDIR}/packages"
  '''
  
          makeconf.write(lines)
  
          mounts = CFG["container"]["mounts"].value
          tmp_dir = str(CFG["tmp_dir"])
          mounts.append({"src": tmp_dir, "tgt": "/mnt/distfiles"})
          CFG["container"]["mounts"] = mounts
  
          if http_proxy is not None:
              http_s = "http_proxy={0}".format(http_proxy)
              https_s = "https_proxy={0}".format(http_proxy)
              makeconf.write(http_s + "\n")
              makeconf.write(https_s + "\n")
  
          if ftp_proxy is not None:
              fp_s = "ftp_proxy={0}".format(ftp_proxy)
              makeconf.write(fp_s + "\n")
  
          if rsync_proxy is not None:
              rp_s = "RSYNC_PROXY={0}".format(rsync_proxy)
              makeconf.write(rp_s + "\n")
docs: Write a valid gentoo make.conf file to :path:.
  
      Args:
          path - The output path of the make.conf