This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH to top level: don't use dirname in configure
- To: msokolov at ivan dot Harhan dot ORG (Michael Sokolov)
- Subject: Re: PATCH to top level: don't use dirname in configure
- From: Eli Zaretskii <eliz at delorie dot com>
- Date: Sat, 22 Jul 2000 05:19:53 -0400 (EDT)
- CC: binutils at sources dot redhat dot com, gcc-patches at gcc dot gnu dot org, gdb-patches at sources dot redhat dot com
- References: <0007212229.AA04846@ivan.Harhan.ORG>
- Reply-to: Eli Zaretskii <eliz at is dot elta dot co dot il>
> 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.
In contrast, `dirname' (when it exists) will always DTRT, because it
is tailored to the host system.