I am submitting a patch which adds two new functions to GNU Make. The following description of these two functions is written as documentation, and is intended for that purpose:
$(trimpath names...) For each file name in names, returns a name that does not contain any . or .. components, nor any repeated path separators (/). Canonical absolute names remain canonical absolute, and relative names remain relative. $(relpath names...) For each file name in names, returns the relative path to the file. This relative path does not contain any . or .. components, nor any repeated path separators (/). These functions contain capabilities which are significantly different from the existing abspath and realpath, in that they do not convert what could be an extremely short relative path (e.g. ".") into a long absolute path. relpath is in fact the inverse of abspath, and adding it would make the set of path conversion functions more complete. In addition, trimpath can be applied to paths both absolute and relative, and eliminate needless characters which can improve readability and performance. The attached patch file includes the source changes to the single file "function.c", as well as the addition to the file "ChangeLog". In addition, I have attached test scripts for both functions (which have been tested on Windows and Linux), and should be placed into the <make>/tests/scripts/functions/ directory. I would love to contribute to the open source community, Regards, Ben Robinson, Ph.D.
patch.diff
Description: Binary data
relpath
Description: Binary data
trimpath
Description: Binary data
_______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make