diff options
Diffstat (limited to 'src/makefile/input.rs')
-rw-r--r-- | src/makefile/input.rs | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/makefile/input.rs b/src/makefile/input.rs index fccea3b..25d33e4 100644 --- a/src/makefile/input.rs +++ b/src/makefile/input.rs @@ -24,7 +24,7 @@ use super::r#macro::ExportConfig; use super::r#macro::{Macro, Set as MacroSet}; use super::target::{StaticTargetSet, Target}; use super::token::{Token, TokenString}; -use super::ItemSource; +use super::{builtin_targets, ItemSource}; enum LineType { Rule, @@ -262,18 +262,10 @@ impl<'a, 'parent, R: BufRead> MakefileReader<'a, 'parent, R> { }; // TODO be smart about this instead, please if !args.no_builtin_rules { - reader.built_in_targets.insert( - ".SUFFIXES".to_owned(), - Target { - name: ".SUFFIXES".into(), - prerequisites: vec![".o", ".c", ".y", ".l", ".a", ".sh", ".f"] - .into_iter() - .map(String::from) - .collect(), - commands: vec![], - stem: None, - already_updated: Cell::new(false), - }, + reader.built_in_targets.extend( + builtin_targets() + .into_iter() + .map(|target| (target.name.clone(), target)), ); } reader |