[Top][All Lists]

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

Re: using realpath/abspath in 3.81

From: Krzysztof Nosek
Subject: Re: using realpath/abspath in 3.81
Date: Fri, 15 Feb 2008 13:45:58 +0100
User-agent: Thunderbird (Windows/20071031)

GNU Make 3.81
$ make -f -
$(info $(realpath d:/temp))

I've tried it with:
  * Cygwin's make,
  * GnuWin32 binary release make,
  * make.exe built with MSVC++ from 3.81 sources.

I don't know if it's a win32 specific problem, or a general make 3.81
"feature" (or just lack of feature).
  It's the is-a-colon-a-path-separator-or-is-it-a-drive-letter-identifier
problem discussed in the thread "VPATH of the form C:/foo" on this list over
the last few days, check the archives.

No, this is a different problem: $realpath and $abspath are broken on
Windows in Make 3.81, except in the Cygwin port with Posix file names
(that start with a slash).  (It cannot be the same problem, since
$abspath takes a single file name, not a list of directories, so the
significance of a colon as path separator is not an issue here.)

The next version will hopefully have this fixed.  If you must have
$abspath now, try the patch here:

If anybody cares for a pure-make patch-wrapper against that, the following:

myrealpath = $(join \
             $(filter %:,$(subst :,: ,$1)),\
             $(realpath $(filter-out %:,$(subst :,: ,$1))))

seems to work for me, even if the style ain't that cool at all...

Krzysztof Nosek

reply via email to

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