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

View file

@ -16,8 +16,14 @@
# along with GDB; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#### host and target dependent Makefile fragments come in here.
##
srcdir = .
destdir = /usr/local
# Place to install binaries.
bindir=/usr/local/bin
bindir=$(destdir)/bin
# System V: If you compile gdb with a compiler which uses the coff
# encapsulation feature (this is a function of the compiler used, NOT
@ -278,16 +284,22 @@ rapp: $(RAPP_OBS)
${srcdir}/munch ${RAPP_OBS} > rapp_init.c
${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
Makefiles= Makefile.sdir $(M_MAKEFILE) \
${srcdir}/alldeps.mak ${srcdir}/Makefile.dist
Makefiles= ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist
MAKE_MAKEFILE= echo "M_MAKEFILE=$(M_MAKEFILE)" | \
cat - ${Makefiles} ${srcdir}/depend >Makefile
MAKE_MAKEFILE_IN= cat ${Makefiles} ${srcdir}/depend > $(srcdir)/Makefile.in
Makefile: $(Makefiles)
$(MAKE_MAKEFILE)
$(srcdir)/Makefile.in: $(Makefiles)
$(MAKE_MAKEFILE_IN)
alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
# with the gnu make, this is done automatically.
Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
(cd $(srcdir) ; \
./configure +destdir=$(destdir) +norecurse \
`if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
$(host) +target=$(target))
$(srcdir)/alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \
${srcdir}/xconfig/*[0-9A-Za-z] | grep -v RCS` ; do \
@ -332,6 +344,7 @@ alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
NR == 0 {printf $$0;} \
NR != 0 {printf "\\\n" $$0} \
END {printf "\n\n"}' >>alldeps.mak;
if [ "$(srcdir)" != "." ] ; then mv alldeps.mak $(srcdir) ; fi
rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
# The sed script makes everything which depends on {x,t}m.h depend on
@ -352,8 +365,8 @@ depend: $(SOURCES) Makefile.dist
-e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
-e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
-e 's; \./; $${srcdir}/;g' \
>depend
$(MAKE_MAKEFILE)
>$(srcdir)/depend
$(MAKE_MAKEFILE_IN)
rm depend.tmp
config.status:

View file

@ -16,8 +16,14 @@
# along with GDB; see the file COPYING. If not, write to
# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
#### host and target dependent Makefile fragments come in here.
##
srcdir = .
destdir = /usr/local
# Place to install binaries.
bindir=/usr/local/bin
bindir=$(destdir)/bin
# System V: If you compile gdb with a compiler which uses the coff
# encapsulation feature (this is a function of the compiler used, NOT
@ -278,16 +284,22 @@ rapp: $(RAPP_OBS)
${srcdir}/munch ${RAPP_OBS} > rapp_init.c
${CC-LD} $(LDFLAGS) -o $@ rapp_init.c $(RAPP_OBS)
Makefiles= Makefile.sdir $(M_MAKEFILE) \
${srcdir}/alldeps.mak ${srcdir}/Makefile.dist
Makefiles= ${srcdir}/alldeps.mak ${srcdir}/Makefile.dist
MAKE_MAKEFILE= echo "M_MAKEFILE=$(M_MAKEFILE)" | \
cat - ${Makefiles} ${srcdir}/depend >Makefile
MAKE_MAKEFILE_IN= cat ${Makefiles} ${srcdir}/depend > $(srcdir)/Makefile.in
Makefile: $(Makefiles)
$(MAKE_MAKEFILE)
$(srcdir)/Makefile.in: $(Makefiles)
$(MAKE_MAKEFILE_IN)
alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
# with the gnu make, this is done automatically.
Makefile: $(srcdir)/Makefile.in $(srcdir)/configure
(cd $(srcdir) ; \
./configure +destdir=$(destdir) +norecurse \
`if [ "$(srcdir)" != "." ] ; then echo +f; fi` \
$(host) +target=$(target))
$(srcdir)/alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
rm -f alldeps.mak alldeps.tmp allparam.tmp allconfig.tmp
for i in `ls -d ${srcdir}/tconfig/*[0-9A-Za-z] \
${srcdir}/xconfig/*[0-9A-Za-z] | grep -v RCS` ; do \
@ -332,6 +344,7 @@ alldeps.mak: ${srcdir}/tconfig ${srcdir}/xconfig
NR == 0 {printf $$0;} \
NR != 0 {printf "\\\n" $$0} \
END {printf "\n\n"}' >>alldeps.mak;
if [ "$(srcdir)" != "." ] ; then mv alldeps.mak $(srcdir) ; fi
rm -f alldeps.tmp alldeps2.tmp allparam.tmp allconfig.tmp
# The sed script makes everything which depends on {x,t}m.h depend on
@ -352,8 +365,8 @@ depend: $(SOURCES) Makefile.dist
-e 's; $(INCLUDE_DIR)/; $(INCLUDE_DEP)/;g' \
-e 's; [a-z0-9./]*bfd/; $(BFD_DEP)/;g' \
-e 's; \./; $${srcdir}/;g' \
>depend
$(MAKE_MAKEFILE)
>$(srcdir)/depend
$(MAKE_MAKEFILE_IN)
rm depend.tmp
config.status:

95
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,12 +247,16 @@ if [ -n "${template}" ] ; then
fi
for i in ${configdir} ${targetspecificdirs} ; do
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 Warning: directory $i is missing.
fi
done
done
fi
@ -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
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
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.

View file

@ -1,3 +1,51 @@
srcname="GDB"
srctrigger=main.c
if [ -z "${template}" ] ; then
make -f Makefile.dist Makefile.in
fi
# per-host:
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
# per-target:
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"