Lines Matching full:path
66 use std::path::{Path, PathBuf};
101 /// Writes a line telling Cargo to rerun the build script if `path` changes.
103 /// This looks like: `cargo:rerun-if-changed=PATH`
107 pub fn rerun_path(path: &str) {
108 println!("cargo:rerun-if-changed={}", path);
136 /// - `rustc` can't be executed, from `RUSTC` or in the `PATH`.
151 /// - `rustc` can't be executed, from `RUSTC` or in the `PATH`.
166 return Err(error::from_str("output path is not a writable directory"));
258 /// Tests whether the given path can be used.
263 /// pub use PATH;
265 pub fn probe_path(&self, path: &str) -> bool {
266 self.probe(format!("pub use {};", path)).unwrap_or(false)
271 /// Any non-identifier characters in the `path` will be replaced with
273 pub fn emit_has_path(&self, path: &str) {
274 if self.probe_path(path) {
275 emit(&format!("has_{}", mangle(path)));
280 pub fn emit_path_cfg(&self, path: &str, cfg: &str) {
281 if self.probe_path(path) {
394 dir: &Path,
414 fn rustflags(target: &Option<OsString>, dir: &Path) -> Vec<String> {