From 319432bc61cbd65303e5e91e141805dc64b43acb Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Wed, 28 Jan 2026 08:18:25 -0500 Subject: [PATCH] Add Util.absolute_path() --- lib/rscons/util.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/rscons/util.rb b/lib/rscons/util.rb index c199e1c..20c4434 100644 --- a/lib/rscons/util.rb +++ b/lib/rscons/util.rb @@ -16,6 +16,20 @@ module Rscons end end + # Return the absolute path for a given target if not a phony target. + # + # @param path [String, Symbol] + # Given target name. + # + # @return Absolute path of given target. + def absolute_path(path) + if Rscons.phony_target?(path) + path + else + File.expand_path(path) + end + end + # Colorize a builder run message. # # @param message [String]