This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
configure with relative srcdir causing absolute pathname in gcc/Makefile
- From: Doug Evans <dje at transmeta dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 30 May 2002 13:43:41 -0700
- Subject: configure with relative srcdir causing absolute pathname in gcc/Makefile
When you configure with a relative srcdir, as in
mkdir obj
cd obj
../src/configure blah
this is supposed to avoid absolute pathnames appearing in Makefiles.
This makes it easy to move the tree around.
[at least things used to work that way, dunno if this is a documented rule]
src/configure is breaking this for gcc_version_trigger
src/configure has this:
## the sed command below emulates the dirname command
topsrcdir=`cd \`echo ${progname} | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'\`; ${PWDCMD-pwd}`
and this:
# Define the trigger file to make sure configure will re-run whenever
# the gcc version number changes.
if [ "${with_gcc_version_trigger+set}" = set ]; then
gcc_version_trigger="$with_gcc_version_trigger"
gcc_version=`grep version_string ${with_gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
else
# If gcc's sources are available, define the trigger file.
if [ -f ${topsrcdir}/gcc/version.c ] ; then
gcc_version_trigger=${topsrcdir}/gcc/version.c
gcc_version=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/'`
case "$arguments" in
*--with-gcc-version-trigger=$gcc_version_trigger* )
;;
* )
# Make sure configure.in knows about this.
arguments="--with-gcc-version-trigger=$gcc_version_trigger $arguments"
;;
esac
withoptions="--with-gcc-version-trigger=$gcc_version_trigger $withoptions"
fi
fi
thus causing the top level configure to pass
--with-gcc-version-trigger=/foo/bar/baz/gcc/version.c
to gcc's configure.