# file      : build/export.build
# license   : MIT; see accompanying LICENSE file

if ($import.target == exe{b})
{
  $out_root/
  {
    include b/
  }

  export $out_root/b/exe{b}
}
elif ($import.target == exe{bx})
{
  $out_root/
  {
    include bx/
  }

  export $out_root/bx/exe{bx}
}
else
{
  $out_root/
  {
    include libbuild2/
  }

  d = [dir_path] $out_root/libbuild2/
  if ($name($import.target) != 'build2')
  {
    # Assume one of the modules.
    #
    d += $regex.replace($name($import.target), '^build2-(.+)', '\1')
  }

  export $d/$import.target
}
