This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: PATCH to top level: don't use dirname in configure



  In message <200007220919.FAA12005@indy.delorie.com>you write:
  > > Date: Fri, 21 Jul 00 17:29:14 CDT
  > > From: msokolov@ivan.Harhan.ORG (Michael Sokolov)
  > > 
  > > ! topsrcdir=`cd \`echo ${progname} | sed 's:/configure$::'\`; pwd`
  > 
  > This assumes that (a) $(progname) always expands to "configure", and
  > (b) that the last delimiter is '/'.  I don't know whether the first
  > assumption is true on each supported system, but the second might be
  > wrong on DOS/Windows where a backslash might be used instead.
I believe we can use something like this to deal with the first problem:

## this sed command emulates the dirname command
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`

The second problem exists in many places in the various configure & install
scripts and probably should be attacked and fixed en-masse.

Michael -- can you verify the sed command I provided above does the right
thing for you?

Also I'd like to have a comment which references dirname (like the one above)
to make these things easier to find (either when updating them to handle
DOS filesystems in the future, or when we need to find a suitable sed command
to emulate dirname elsewhere).

Thanks,
jeff


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