Re: using realpath/abspath in 3.81
Krzysztof Nosek <[email protected]>
| Newsgroups | gmane.comp.gnu.make.windows |
|---|---|
| Message-ID | <[email protected]> |
>>> GNU Make 3.81 >>> ... >>> $ make -f - >>> $(info $(realpath d:/temp)) >>> ^Z >>> c:/progs/cygwin/home/nosek/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: > > http://lists.gnu.org/archive/html/make-w32/2006-05/msg00042.html 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... Regards, Krzysztof Nosek