Configure for gdb.

This commit is contained in:
K. Richard Pixley
1991-05-19 00:16:46 +00:00
parent 7cb9aa509c
commit 912e0732be
4 changed files with 179 additions and 50 deletions

115
gdb/configure vendored
View File

@ -173,14 +173,12 @@ if [ -n "${fatal}" -o "${hosts}" = "help" ] ; then
fi
#### configure.in common parts come in here.
# This file is a shell script fragment that supplies the information
# necessary to tailor a template configure script into the configure
# script appropriate for this directory. For more information, check
# any existing configure script.
srcname="GDB"
srctrigger=main.c
configdirs="libiberty bfd binutils ld gas gcc gnulib clib"
srctrigger=README.configure
srcname="gnu development package"
if [ -z "${template}" ] ; then
make -f Makefile.dist Makefile.in
fi
## end of common part.
@ -249,11 +247,15 @@ if [ -n "${template}" ] ; then
fi
for i in ${configdir} ${targetspecificdirs} ; do
if [ -r $i/configure ] ; then
(cd $i ;
./configure +template=${template} ${verbose})
if [ -d $i ] ; then
if [ -r $i/configure ] ; then
(cd $i ;
./configure +template=${template} ${verbose})
else
echo No configure script in `pwd`/$i
fi
else
echo No configure script in `pwd`/$i
echo Warning: directory $i is missing.
fi
done
done
@ -277,6 +279,17 @@ for host in ${hosts} ; do
#### configure.in per-host parts come in here.
if [ ! -f xconfig/${host} ]; then
echo "No such host ${host}"
exit 1
fi
targetfile=`awk '
$1 == "XM_FILE=" { print $2 }' <xconfig/$host`
if [ "${targetfile}" = "/" ] ; then
targetfile=/dev/null
fi
## end of per-host part.
@ -288,6 +301,35 @@ for host in ${hosts} ; do
#### configure.in per-target parts come in here.
if [ ! -f tconfig/${target} ]; then
echo "No such target ${target}"
exit 1
fi
if [ -z "${removing}" ] ; then
cat xconfig/${host} tconfig/${target} | awk '$1 == "#msg" {
print substr($0,6)}'
fi
hostfile=`awk '
$1 == "TM_FILE=" { print $2 }' <tconfig/$target`
if [ "${hostfile}" = "/" ] ; then
hostfile=/dev/null
fi
if [ ! -d readline ]; then
mkdir readline
# This could be a symlink, but getting the name right (because
# srcdir can be either relative or absolute) would be hairy.
cp ${srcdir}/readline/Makefile readline
fi
host_makefile_frag=xconfig/${host}
target_makefile_frag=tconfig/${target}
files="${hostfile} ${targetfile}"
links="xm.h tm.h"
## end of per-target part.
# Temporarily, we support only direct subdir builds.
@ -424,18 +466,23 @@ for host in ${hosts} ; do
cat ${srcdir}/Makefile.in >> Makefile
# and shake thoroughly.
host_var_file=hmake-${host}
target_var_file=tmake-${target}
if [ -z "${host_makefile_frag}" ] ; then
host_makefile_frag=config/hmake-${host}
fi
if [ -z "${target_makefile_frag}" ] ; then
target_makefile_frag=config/tmake-${target}
fi
# Conditionalize the makefile for this host.
if [ -f ${srcdir}/config/${host_var_file} ] ; then
sed -e "/^####/ r ${srcdir}/config/${host_var_file}" Makefile > Makefile.tem
if [ -f ${srcdir}/${host_makefile_frag} ] ; then
sed -e "/^####/ r ${srcdir}/${host_makefile_frag}" Makefile > Makefile.tem
mv Makefile.tem Makefile
fi
# Conditionalize the makefile for this target.
if [ -f ${srcdir}/config/${target_var_file} ] ; then
sed -e "/^####/ r ${srcdir}/config/${target_var_file}" Makefile > Makefile.tem
if [ -f ${srcdir}/${target_makefile_frag} ] ; then
sed -e "/^####/ r ${srcdir}/${target_makefile_frag}" Makefile > Makefile.tem
mv Makefile.tem Makefile
fi
@ -462,15 +509,15 @@ for host in ${hosts} ; do
mv Makefile.tem Makefile
using=
if [ -f ${srcdir}/config/${host_var_file} ] ; then
using=" using \"${host_var_file}\""
if [ -f ${srcdir}/${host_makefile_frag} ] ; then
using=" using \"${host_makefile_frag}\""
fi
if [ -f ${srcdir}/config/${target_var_file} ] ; then
if [ -f ${srcdir}/${target_makefile_frag} ] ; then
if [ -z "${using}" ] ; then
andusing=" using \"${target_var_file}\""
andusing=" using \"${target_makefile_frag}\""
else
andusing="${using} and \"${target_var_file}\""
andusing="${using} and \"${target_makefile_frag}\""
fi
else
andusing=${using}
@ -530,9 +577,13 @@ for configdir in ${configdirs} ; do
done # for each host
if [ -n "${commons}" ] ; then
(cd ${configdir} ;
./configure ${commons} ${verbose} ${forcesubdirs} ${removing}) \
| sed 's/^/ /'
if [ -d ${configdir} ] ; then
(cd ${configdir} ;
./configure ${commons} ${verbose} ${forcesubdirs} ${removing}) \
| sed 's/^/ /'
else
echo Warning: directory \"${configdir}\" is missing.
fi
fi # if any common hosts
if [ -n "${specifics}" ] ; then
@ -562,9 +613,13 @@ for configdir in ${configdirs} ; do
fi # if verbose
if [ -n "${commons}" ] ; then
(cd ${configdir} ;
./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} ${commons}) \
| sed 's/^/ /'
if [ -d ${configdir} ] ; then
(cd ${configdir} ;
./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} ${commons}) \
| sed 's/^/ /'
else
echo Warning: directory \"${configdir}\" is missing.
fi
fi # if any commons
if [ -n "${specifics}" ] ; then
@ -582,8 +637,8 @@ exit 0
#
# $Log$
# Revision 1.3 1991/05/14 14:14:40 rich
# see devo/configure 1.11
# Revision 1.4 1991/05/19 00:16:45 rich
# Configure for gdb.
#
# Revision 1.10 1991/05/04 00:58:38 rich
# Fix program name bug.