diff options
Diffstat (limited to 'src/makefile/mod.rs')
-rw-r--r-- | src/makefile/mod.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs index 270dd46..d9c9b46 100644 --- a/src/makefile/mod.rs +++ b/src/makefile/mod.rs @@ -85,17 +85,17 @@ fn inference_match<'a>( } } -pub(crate) struct Makefile<'a> { +pub struct Makefile<'a> { inference_rules: Vec<InferenceRule>, macros: MacroSet<'static, 'static>, targets: RefCell<HashMap<String, Rc<RefCell<Target>>>>, - pub(crate) first_non_special_target: Option<String>, + pub first_non_special_target: Option<String>, args: &'a Args, // TODO borrow warnings from Python version } impl<'a> Makefile<'a> { - pub(crate) fn new(args: &'a Args) -> Self { + pub fn new(args: &'a Args) -> Self { let mut inference_rules = vec![]; let mut macros = MacroSet::new(); let mut targets = HashMap::new(); @@ -132,7 +132,7 @@ impl<'a> Makefile<'a> { } } - pub(crate) fn and_read_file(&mut self, path: impl AsRef<Path>) -> anyhow::Result<()> { + pub fn and_read_file(&mut self, path: impl AsRef<Path>) -> anyhow::Result<()> { let file = File::open(path); // TODO handle errors let file = file.context("couldn't open makefile!")?; @@ -140,7 +140,7 @@ impl<'a> Makefile<'a> { self.and_read(file_reader) } - pub(crate) fn and_read(&mut self, source: impl BufRead) -> anyhow::Result<()> { + pub fn and_read(&mut self, source: impl BufRead) -> anyhow::Result<()> { let mut lines_iter = source .lines() .enumerate() @@ -416,7 +416,7 @@ impl<'a> Makefile<'a> { } } - pub(crate) fn get_target(&self, name: &str) -> anyhow::Result<Rc<RefCell<Target>>> { + pub fn get_target(&self, name: &str) -> anyhow::Result<Rc<RefCell<Target>>> { // TODO implement .POSIX let follow_gnu = true; @@ -514,7 +514,7 @@ impl<'a> Makefile<'a> { Ok(targets.get(name).context("Target not found!")?.clone()) } - pub(crate) fn update_target(&self, name: &str) -> anyhow::Result<()> { + pub fn update_target(&self, name: &str) -> anyhow::Result<()> { self.get_target(name)?.borrow().update(self) } |