This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 3.2 PATCH: Avoid hardcoded uses of pwd
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 14 May 2002 18:43:07 -0700
- Subject: Re: 3.2 PATCH: Avoid hardcoded uses of pwd
--On Wednesday, May 15, 2002 12:23:11 AM +0200 Rainer Orth
<ro@TechFak.Uni-Bielefeld.DE> wrote:
> Mark Mitchell writes:
>
>> Can we not simply set PWDCMD correctly on one place, and then invoke
>> it as ${PWDCMD} -- without the "pwd" fallback?
>>
>> If necessary, we could even have the top-level configure create a script
>> that does the right thing, and then have the Makefiles invoke
>> $objdir/pwd, or some such.
>
> This could work as a GCC-only approach, but has the disadvantage that it
> won't be able to be easily integrated into autoconf, automake, and
> libtool.
I don't understand. Why couldn't libtool use the same idea? All you
need is:
PWDCMD=@PWDCMD@
in your Makefile.in, and then let configure substitute the right thing,
it would seem to me. Or, if you really want to determine this at "make"
time, you could do something like:
PWDCMD=`${SHELL} echo ${PWDCMD:-}`
The point is that all of the Makefile rules should be able to use $PWDCMD,
rather than having to have each one of them be conditional.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com