URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=17245>
Summary: $(notdir foo/) should return . instead of blank
Project: make
Submitted by: None
Submitted on: Monday 07/31/2006 at 21:11 UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Component Version: 3.79.1
Operating System: POSIX-Based
Fixed Release: None
_______________________________________________________
Details:
Documentation for notdir says:
"A file name that ends with a slash becomes an empty string. This is
unfortunate, because it means that the result does not always have the same
number of whitespace-separated file names as the argument had; but we do not
see any other valid alternative."
Wrong. $(notdir foo/) should return . (a period).
This way, $(dir name)/$(notdir name) = name always.
A path ending in / is only really valid if it is a directory. If it is a
directory, then it contains . and .. so returning . should be valid if the
original path was valid. And foo/./bar is the same as foo/bar unless a
filesystem is screwed up.
So the . should be returned instead of nothing, to keep the number of
filenames the same, and to allow join to rejoin them correctly.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=17245>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Bug-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-make