Hello. 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))) Then, $(call normpath,src/lib/../a.c src/lib/../b.c)) will return "src/a.c src/b.c", which is what I want. (In the case that .. moves out of the top-level directory where make was run from, it returns an absolute path). 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? Thanks. Kind regards, Vegard Nossum _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
