[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to get a directory's "full" name?
From: |
Paul D. Smith |
Subject: |
Re: how to get a directory's "full" name? |
Date: |
Fri, 12 May 2006 13:16:49 -0400 |
%% "Robert P. J. Day" <address@hidden> writes:
rpjd> as part of my multi-arch build, i need to convert a (probably)
rpjd> relative directory name to its full name. that is, if someone
rpjd> refers to "..", i need to get the full directory name of ".."
rpjd> this "function" seems to work:
rpjd> real-dir = $(shell cd ${1} ; echo $${PWD})
This is not portable; not all shells set or track the PWD environment
variable.
rpjd> cd to arg, then echo full dir name. is there a simpler or built-in
rpjd> way that's better?
If you're willing to limit your makefiles to newer versions of make you
can use the $(abspath ...) or $(abspath ...) functions.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist