aboutsummaryrefslogtreecommitdiff
path: root/src/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/makefile')
-rw-r--r--src/makefile/functions.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/makefile/functions.rs b/src/makefile/functions.rs
index c111fba..51bf0f9 100644
--- a/src/makefile/functions.rs
+++ b/src/makefile/functions.rs
@@ -85,6 +85,10 @@ pub fn expand_call(
assert_eq!(args.len(), 1);
file_name::realpath(macros, &args[0])
}
+ "abspath" => {
+ assert_eq!(args.len(), 1);
+ file_name::abspath(macros, &args[0])
+ }
"if" => {
assert!(args.len() == 2 || args.len() == 3);
@@ -382,6 +386,11 @@ mod file_name {
.collect::<Vec<_>>();
Ok(results.join(" "))
}
+
+ pub fn abspath(macros: &MacroSet, targets: &TokenString) -> Result<String> {
+ // TODO don't resolve symlinks
+ realpath(macros, targets)
+ }
}
// Functions for Conditionals