This is the mail archive of the gcc@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: What does PWD = $${PWDCMD-pwd} do in make?


"H. J. Lu" <hjl@lucon.org> writes:

> On Wed, Jul 02, 2003 at 06:13:03PM -0700, Roland McGrath wrote:
>> > Hi Roland,
>> > 
>> > I have a strange make related problem. In gcc, there is
>> > 
>> > PWD = $${PWDCMD-pwd}
>> 
>> This is surely ill-advised, but what it means is clear enough.
>> $$ means a literal $, and make has nothing more to do with this.
>> If this string is used in a sh command, then ${PWDCMD-pwd} is
>> sh syntax meaning $PWDCMD if that's defined and pwd otherwise.
...

I don't think there's any reason why we couldn't change this to read

PWDCMD = $${PWDCMD-pwd}

and change all uses of ${PWD} to ${PWDCMD}.  Anyone know different?
Would this solve the problem you are seeing?

zw


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