configure with relative srcdir causing absolute pathname in gcc/Makefile
Doug Evans
dje@transmeta.com
Thu May 30 13:43:00 GMT 2002
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.
More information about the Binutils
mailing list