help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Removing . and .. from paths


From: Philip Guenther
Subject: Re: Removing . and .. from paths
Date: Sun, 11 Nov 2007 11:52:58 -0700

On Nov 11, 2007 7:53 AM, Vegard Nossum <address@hidden> wrote:
> I am looking for a function that removes . and .. components from a
> list of paths, without requiring the path to exist, and without making
> the path absolute. I find the following function to do what I want:
>
> normpath = $(patsubst $(abspath .)/%,%,$(abspath $(1)))

Nice.

...
> However, this can be implemented a lot more efficient
> if it was a part of core make. Why does this not exist already? Or did
> I just miss it? If I write the function, will it be included in core
> make?

What's inefficient about what you wrote?  Is it actually a performance
bottleneck?  If not, then why hardcode it in C, where it would be more
work to maintain, less flexible in behavior, and another reserved word
for Makefile writers to avoid?


Philip Guenther




reply via email to

[Prev in Thread] Current Thread [Next in Thread]