readline/Makefile gets absolute path when configured with relative srcdir

Doug Evans dje@transmeta.com
Thu May 30 14:56: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]

readline/configure.in has this:

case "$host_os" in
msdosdjgpp*)	BUILD_DIR=`pwd.exe` ;;	# to prevent //d/path/file
*)		BUILD_DIR=`pwd` ;;
esac

AC_SUBST(BUILD_DIR)

which then causes dependencies on config.h in Makefile to be
based on an absolute path.  tsk tsk.

Studying Makefile.in I don't understand why you would want BUILD_DIR
to ever be something other than ".".
There's no comment explaining the raison d'etre of BUILD_DIR.

What's up?



More information about the Gdb mailing list