This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]