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

View file

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

115
gdb/configure vendored
View file

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