configure: For in-source builds, make a subdir and re-exec there.

2002-06-18  Phil Edwards  <pme@gcc.gnu.org>

	* configure:  For in-source builds, make a subdir and re-exec there.
	* Makefile:  New file.  Pass targets through to build directory.
	* .cvsignore:  No longer ignore "Makefile".

From-SVN: r54761
This commit is contained in:
Phil Edwards 2002-06-18 20:02:49 +00:00
parent 0a62a06c62
commit 5f974d3781
3 changed files with 38 additions and 2 deletions

View File

@ -26,7 +26,6 @@ configure.tps
configure.vr
configure.vrs
dir.info
Makefile
lost+found
update.out
LAST_UPDATED

View File

@ -1,3 +1,9 @@
2002-06-18 Phil Edwards <pme@gcc.gnu.org>
* configure: For in-source builds, make a subdir and re-exec there.
* Makefile: New file. Pass targets through to build directory.
* .cvsignore: No longer ignore "Makefile".
2002-06-05 Loren J. Rittle <ljrittle@acm.org>
* ltmain.sh: Detect and handle object name conflicts while

33
configure vendored
View File

@ -89,7 +89,7 @@ subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
version="$Revision: 1.39 $"
version="$Revision: 1.40 $"
x11=default
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
@ -573,6 +573,37 @@ case "${srcdir}" in
fi
esac
# If it's an in-source build, make a directory and configure there instead.
# Name the build directory after the host for clarity's sake. Remember that
# name for the redirecting makefile's use, since the makefile shouldn't have
# to duplicate the work of figuring out host_alias.
#
# Also remember if this is a native build or not. Variations on "or not"
# are performed later in this script so we can't test them here. In
# particular, build_alias will still be empty unless specified by the user,
# so do not try in-source builds when making a host-x-host compiler.
# For a cross compile, "make all" = "all". Otherwise, "all" = "bootstrap".
if test "${srcdir}" = "." ; then
builddir=${host_alias}
if test ! -d ${builddir}; then
mkdir ${builddir} || exit 1
fi
if test ${host_alias} != ${target_alias}; then
t=all
else
t=bootstrap
fi
# stamp-builddir is too long for #$&!*@ 8.3 filesystems
echo "builddir=${builddir}" > s-buildd
echo "defaulttarget=$t" >> s-buildd
cd ${builddir}
echo host $host_alias
echo target $target_alias
echo t $t
sleep 20
exec ${config_shell} ../configure $arguments
fi
### warn about some conflicting configurations.
case "${srcdir}" in