pub fn mk_output_path(what: OutputType, where: Target,
                      crate_id: &CrateId, workspace: Path) -> Path {
    let short_name_with_version = crate_id.short_name_with_version();
    // Not local_path.dir_path()! For package foo/bar/blat/, we want
    // the executable blat-0.5 to live under blat/
    let dir = match where {
        // If we're installing, it just goes under <workspace>...
        Install => workspace,
        // and if we're just building, it goes in a package-specific subdir
        Build => workspace.join(crate_id.path.as_slice())
    };
    debug!("[{:?}:{:?}] mk_output_path: name = {}, path = {}", what, where,
           if what == Lib { short_name_with_version.clone() } else { crate_id.name.clone() },
           dir.display());
    let mut output_path = match what {
        // this code is duplicated from elsewhere; fix this
        Lib => dir.join(os::dll_filename(short_name_with_version)),
        // executable names *aren't* versioned
        _ => dir.join(format!("{}{}{}", crate_id.name,
                           match what {
                               Test => "test",
                               Bench => "bench",
                               _     => ""
                           },
                           os::consts::EXE_SUFFIX))
    };
    if !output_path.is_absolute() {
        output_path = os::getcwd().join(&output_path);
    }
    debug!("mk_output_path: returning {}", output_path.display());
    output_path
}
/// Return the output file for a given directory name,
/// given whether we're building a library and whether we're building tests
Return the output file for a given directory name,
given whether we're building a library and whether we're building tests
Return the output file for a given directory name given whether we ' re building a library and whether we ' re building tests
pub fn mk_output_path(what: OutputType, where: Target,
                      crate_id: &CrateId, workspace: Path) -> Path {
    let short_name_with_version = crate_id.short_name_with_version();
    // Not local_path.dir_path()! For package foo/bar/blat/, we want
    // the executable blat-0.5 to live under blat/
    let dir = match where {
        // If we're installing, it just goes under <workspace>...
        Install => workspace,
        // and if we're just building, it goes in a package-specific subdir
        Build => workspace.join(crate_id.path.as_slice())
    };
    debug!("[{:?}:{:?}] mk_output_path: name = {}, path = {}", what, where,
           if what == Lib { short_name_with_version.clone() } else { crate_id.name.clone() },
           dir.display());
    let mut output_path = match what {
        // this code is duplicated from elsewhere; fix this
        Lib => dir.join(os::dll_filename(short_name_with_version)),
        // executable names *aren't* versioned
        _ => dir.join(format!("{}{}{}", crate_id.name,
                           match what {
                               Test => "test",
                               Bench => "bench",
                               _     => ""
                           },
                           os::consts::EXE_SUFFIX))
    };
    if !output_path.is_absolute() {
        output_path = os::getcwd().join(&output_path);
    }
    debug!("mk_output_path: returning {}", output_path.display());
    output_path
}
pub fn mk_output_path ( what : OutputType , where : Target , crate_id : & CrateId , workspace : Path ) -> Path { let short_name_with_version = crate_id . short_name_with_version ( ) ; // Not local_path.dir_path()! For package foo/bar/blat/, we want // the executable blat-0.5 to live under blat/ let dir = match where { // If we're installing, it just goes under <workspace>... Install => workspace , // and if we're just building, it goes in a package-specific subdir Build => workspace . join ( crate_id . path . as_slice ( ) ) } ; debug ! ( " " what where if what Lib { short_name_with_version clone ( ) } else { crate_id name clone ( ) } dir display ( ) ) ; let mut output_path = match what { // this code is duplicated from elsewhere; fix this Lib => dir . join ( os :: dll_filename ( short_name_with_version ) ) , // executable names *aren't* versioned _ => dir . join ( format ! ( " " crate_id name match what { Test " " Bench " " " " } os consts EXE_SUFFIX ) ) } ; if ! output_path . is_absolute ( ) { output_path = os :: getcwd ( ) . join ( & output_path ) ; } debug ! ( " " output_path display ( ) ) ; output_path }
Return the output file for a given directory name,
given whether we're building a library and whether we're building tests
Return the output file for a given directory name given whether we ' re building a library and whether we ' re building tests
what
OutputType
where
Target
crate_id
&CrateId
workspace
Path
what
OutputType
where
Target
crate_id
&CrateId
workspace
Path