From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Lance Taylor To: phdm@mail.macqel.be Cc: egcs@cygnus.com Subject: Re: dejagnu runtest and runtest.exp Date: Fri, 10 Oct 1997 09:08:00 -0000 Message-id: <199710101608.MAA21480@subrogation.cygnus.com> References: <199710101117.NAA03413@mail.macqel.be> X-SW-Source: 1997-10/msg00410.html Date: Fri, 10 Oct 1997 13:17:24 +0200 (MET DST) From: "Philippe De Muyter" That is not true; runtest.exp exists and is located in /usr/local/share/dejagnu, but runtest does not find it because it does not look there !!! I can see runtest trying to find its installation directory by looking at $0, but as it is invoked as runtest, $0 is merely runtest; that is not very useful. Why does it not look directly in a hard-coded directory written in runtest script at instatllation time ? On many systems, if a shell script is invoked because it is found on PATH, $0 is set with the PATH element prepended to the script name. Evidently that is not true on your system. I think that if runtest finds that $0 is just "runtest", it should look through PATH looking for itself. A hard coded data directory could be another backup to search. In general, though, I think it's best to avoid hard coded paths when possible, since it makes it difficult to move the installed directories to another disk or another machine. Ian