delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/11/27/06:30:16

From: Richard Dawe <rich AT phekda DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Expansion of "$srcdir" and '${DJDIR}' in
gnu\binutl-2.121\build.djg\djconfig.sh
Date: Wed, 27 Nov 2002 09:29:52 +0000
Lines: 33
Message-ID: <3DE49090.5DFAC762@phekda.freeserve.co.uk>
References: <RzQE9.782$xb7 DOT 268286996 AT news DOT netcarrier DOT net>
NNTP-Posting-Host: 62.136.89.126
Mime-Version: 1.0
X-Trace: newsg1.svr.pol.co.uk 1038388508 11967 62.136.89.126 (27 Nov 2002 09:15:08 GMT)
NNTP-Posting-Date: 27 Nov 2002 09:15:08 GMT
X-Complaints-To: abuse AT theplanet DOT net
X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19 i586)
X-Accept-Language: de,fr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello.

Ed Manlove wrote:
> 
> How does the configure script expand or what results from the expansion
> of --srcdir="$srcdir" --prefix='${DJDIR}' in the configure script for
> binutils, gnu\binutl-2.121\build.djg\djconfig.sh?
> 
> I want to add the --with-headers parameter to gcc configure script.  The
> directory I wish to add is
> /dev/env/DJDIR/lib/gcc-lib/h8300-hitachi-hms/2.952/include. I an trying to
> understand how the above terms are expanded by configure and the difference
> between the single quotes '' and the double quotes"".  This looks like Perl
> but my Perl knowledge is very basic so any help would be appreciated.

Actually, it's shell-expanded. The double quotes undergo parameter
substitution, so the configure script is passed the value of $srcdir. The
single quotes are not parameter substituted, so the configure script is passed
the text ${DJDIR} as the prefix.

I'm not sure why the prefix is passed like this. Perhaps it's so that the
configure script can be run unchanged if ${DJDIR} changes? If so, why not use
--prefix=/dev/env/DJDIR instead?

Maybe this will do what you want, using /dev/env/DJDIR instead of '${DJDIR}':

<whatever> --srcdir="$srcdir" --prefix=/dev/env/DJDIR
--with-headers=/dev/env/DJDIR/lib/gcc-lib/h8300-hitachi-hms/2.952/include

Regards,

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019