[Top][All Lists]

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

[bug #17245] $(notdir foo/) should return . instead of blank

From: anonymous
Subject: [bug #17245] $(notdir foo/) should return . instead of blank
Date: Mon, 31 Jul 2006 21:11:02 +0000
User-agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021203


                 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



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:


  Message sent via/by Savannah

reply via email to

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