Relative Path to Absolute path problem [message #150048] |
Tue, 26 July 2005 13:59 |
Eclipse User |
|
|
|
Originally posted by: thulasidhar.soc-soft.com
Hi all,
I am trying to get a simple thing work, but in vain.
i dont know whether this has to something with eclipse, so bear with me if
it doesnt.
iam writing a makefile in which i need to get the absolute path of the top
directory of my archive.
so i simply wrote a piece of shell script that goes like this
$(MAKE) -C $(ROOT_DIR) $@ ROOT_DIR="`cd \"$(ROOT_DIR)\" && pwd`"
this should run make in the top-directory (ROOT_DIR).
the point is that the make is run from any directory within the archive and
all should start from the top-dir.
and i find it easier to give the relative path.
iam using cygwin environment and eclipse 3.0.2.
When i run this makefile in the cygwin shell from a directory that is 3
levels inside the top-dir, like this...
$ make test ROOT_DIR=../../..
the conversion of relative path to absolute path happens perfectly.
but when i run the same using make targets of CDT. i get a strange error.
the value that gets assigned to ROOT_DIR is
"D:../../"
how is this possible?
i.e., when i do `cd ../../.. && pwd` in the makefile and run it using
eclipse make targets, the evaluation returns D:../..
can somebody please explain this?
|
|
|
Powered by
FUDForum. Page generated in 0.05197 seconds