Name

mk_pretty_path — Convert path to pretty form

Synopsis

MODULES="... core ..."

mk_pretty_path path

Description

Converts path to a more compact form. This is similar to mk_pretty_target with two differences. First, path is a plain file path and not in target notation. Second, paths that do not reference the object, source, or stage directories yield a slightly different result. Sets result to the result.

Examples

# Assume MK_SOURCE_DIR='..'

mk_pretty_file stage/usr/bin/foo
# result='/usr/bin/foo'

mk_pretty_file object/src/foo.o
# result='src/foo.o'

mk_pretty_file ../src/foo.c
# result='src/foo.c'

mk_pretty_file foo/bar.baz
# result='./foo/bar.baz'