bug-make
[Top][All Lists]
Advanced

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

New Feature Submission for GNU Make


From: Ben Robinson
Subject: New Feature Submission for GNU Make
Date: Sun, 29 May 2011 21:45:38 -0700

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.


Attachment: patch.diff
Description: Binary data

Attachment: relpath
Description: Binary data

Attachment: trimpath
Description: Binary data


reply via email to

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