Eli,
Thank you for your constructive criticism regarding my submission to GNU Make.
I perceive the critiques to fall into three categories (documentation,
justification and code improvements) which I will respond to in order.
*Documentation*: You are correct, these functions remove only "redundant" or
"unnecessary" . and .. components. The suggested documentation should instead
read:
$(trimpath names|...|)
For each file name innames,returns a name that does not contain
any|unnecessary.|or|..|components, nor any repeated path separators (|/|).
Canonical absolute names remain canonical absolute, and relative names
remain relative.
$(relpath names|...|)
For each file name innames,returns the relative path to the file. This
relative path does not contain anyunnecessary |.|or|..|components, nor any
repeated path separators (|/|).
*Justification (trimpath)*: trimpath can be used to shorten the input strings
to compilers/linkers, as well as improve readability to the user. Certain
compilers have a maximum number of characters which can be passed into a
single invocation of their compiler. In my project, I had a dozen or so
-include<search_path> which contained many unnecessary . and .. components,
which caused the compiler to overflow the input buffer. While it is
unfortunate compilers exist with unreasonably small input buffers, trimpath
allowed me to only pass in the minimum number of characters required
to successfully compile.