[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Removing . and .. from paths
From: |
Vegard Nossum |
Subject: |
Re: Removing . and .. from paths |
Date: |
Sun, 11 Nov 2007 20:08:49 +0100 |
Hi,
On Nov 11, 2007 7:52 PM, Philip Guenther <address@hidden> wrote:
> 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?
Well, I don't know exactly how inefficient it is. And I doubt it's
actually a performance bottleneck. But it would be nice to write it
properly. On grounds of principle. In my opinion, it's really a hack.
Vegard