see devo/configure 1.11

This commit is contained in:
K. Richard Pixley
1991-05-14 14:14:40 +00:00
parent 7df723106b
commit c422030318
5 changed files with 422 additions and 163 deletions

96
bfd/configure vendored
View File

@@ -44,6 +44,8 @@ symbolic_link='ln -s'
#hard_link="echo ln" #hard_link="echo ln"
#symbolic_link="echo ln -s" #symbolic_link="echo ln -s"
progname=$0
# clear some things potentially inherited from environment. # clear some things potentially inherited from environment.
ansi= ansi=
defaulttargets= defaulttargets=
@@ -69,7 +71,8 @@ do
-destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*) -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'` destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
;; ;;
-forcesubdirs | +forcesubdirs | +f) -forcesubdirs | +forcesubdirs | +forcesubdir | +forcesubdi | +forcesubd \
| +forcesub | +forcesu | +forces | +force | +forc | +for | +fo | +f)
forcesubdirs=${arg} forcesubdirs=${arg}
;; ;;
-languages=* | +languages=* | +language=* | +languag=* \ -languages=* | +languages=* | +language=* | +languag=* \
@@ -178,7 +181,7 @@ fi
srctrigger=libbfd.c srctrigger=libbfd.c
srcname="bfd" srcname="bfd"
## end of common part ## end of common part.
# are we rebuilding config itself? # are we rebuilding config itself?
if [ -n "${template}" ] ; then if [ -n "${template}" ] ; then
@@ -187,12 +190,17 @@ if [ -n "${template}" ] ; then
exit 1 exit 1
fi fi
mv configure configure.old # prep the template
echo "#!/bin/sh" > configure sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
echo "# Please do not edit this file. It is generated automatically from" >> configure #### configure.in common parts come in here.\
echo "# configure.in and a configure template." >> configure ## end of common part.' \
echo "configdirs=" >> configure -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
echo >> configure #### configure.in per-host parts come in here.\
## end of per-host part.' \
-e '/^#### configure.in per-target parts come in here.$/,/^## end of per-target part.$/c\
#### configure.in per-target parts come in here.\
## end of per-target part.' \
< ${template} > template.new
if [ -r configure.in ] ; then if [ -r configure.in ] ; then
if [ -z "`grep '^# per\-host:' configure.in`" ] ; then if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
@@ -211,10 +219,10 @@ if [ -n "${template}" ] ; then
sed -e '1,/^# per\-target:/d' configure.in > configure.tgt sed -e '1,/^# per\-target:/d' configure.in > configure.tgt
# and insert them # and insert them
sed -e '/^#### configure.in common part/ r configure.com' \ sed -e '/^#### configure.in common parts come in here.$/ r configure.com' \
-e '/^#### configure.in per\-host part/ r configure.hst' \ -e '/^#### configure.in per\-host parts come in here.$/ r configure.hst' \
-e '/^#### configure.in per\-target part/ r configure.tgt' \ -e '/^#### configure.in per\-target parts come in here.$/ r configure.tgt' \
${template} >> configure template.new > configure.new
rm -f configure.com configure.tgt configure.hst rm -f configure.com configure.tgt configure.hst
else else
@@ -222,8 +230,10 @@ if [ -n "${template}" ] ; then
cat ${template} >> configure cat ${template} >> configure
fi fi
chmod a+x configure chmod a+x configure.new
rm configure.old rm template.new
# mv configure configure.old
mv configure.new configure
echo Rebuilt configure in `pwd` echo Rebuilt configure in `pwd`
if [ -z "${norecurse}" ] ; then if [ -z "${norecurse}" ] ; then
@@ -266,7 +276,7 @@ for host in ${hosts} ; do
#### configure.in per-host parts come in here. #### configure.in per-host parts come in here.
## end of per-target part ## end of per-host part.
for target in ${targets} ; do for target in ${targets} ; do
@@ -279,18 +289,22 @@ for host in ${hosts} ; do
files= files=
links= links=
## end of per-target part ## end of per-target part.
# Temporarily, we support only direct subdir builds. # Temporarily, we support only direct subdir builds.
hostsubdir=Host-${host} hostsubdir=Host-${host}
targetsubdir=Target-${target} targetsubdir=Target-${target}
if [ -n "${removing}" ] ; then if [ -n "${removing}" ] ; then
if [ -d "${hostsubdir}/${targetsubdir}" ] ; then if [ -n "${forcesubdirs}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir} if [ -d "${hostsubdir}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir}
if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then
rm -rf ${hostsubdir} rm -rf ${hostsubdir}
fi
else
echo Warning: no `pwd`/${hostsubdir} to remove.
fi fi
else else
rm -f Makefile config.status ${links} rm -f Makefile config.status ${links}
@@ -329,11 +343,12 @@ links=
if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
if [ -z "${srcdirdefaulted}" ] ; then if [ -z "${srcdirdefaulted}" ] ; then
echo "${progname}: Can't find ${srcname} sources in \`${srcdir}'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
else else
echo "${progname}: Can't find ${srcname} sources in \`.' or \`..'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
fi fi
echo \(At least ${srctrigger} is missing.\) 1>&2
exit 1 exit 1
fi fi
@@ -477,8 +492,22 @@ links=
originaldir=`pwd` originaldir=`pwd`
cd ${srcdir} cd ${srcdir}
fi fi
done done # for each target
done
# # Now build a Makefile for this host.
# if [ -n "${forcesubdirs}" ] ; then
# cd ${hostsubdir}
# cat > GNUmakefile << E!O!F
## Makefile generated by configure for host ${host}.
#
#%:
# for i in ${targets} ; do \
# $(MAKE) -C Target-\$i \$@
#
#all clean stage1 stage2 stage3 stage4etags tags TAGS
#E!O!F
# fi
done # for each host
# If there are subdirectories, then recurse. # If there are subdirectories, then recurse.
@@ -554,8 +583,23 @@ exit 0
# #
# $Log$ # $Log$
# Revision 1.7 1991/04/17 01:41:18 rich # Revision 1.8 1991/05/14 14:14:25 rich
# Fixed a problem with host dependent parts. # see devo/configure 1.11
#
# Revision 1.10 1991/05/04 00:58:38 rich
# Fix program name bug.
#
# Revision 1.9 1991/05/03 19:14:18 rich
# Changed getopt to libiberty, commented out an aborted attempt at host
# level Makefiles because it caused errors on +rm, add a warning for
# directories expected to be removed on +rm but that don't exist.
#
# Revision 1.8 1991/04/24 16:50:59 rich
# Three staging checkpoint.
#
# Revision 1.7 1991/04/17 01:34:47 rich
# Added getopt for binutils, fixed problem with host dependancies in
# configure.template.
# #
# Revision 1.6 1991/04/16 00:18:44 rich # Revision 1.6 1991/04/16 00:18:44 rich
# Now handles multiple hosts and targets. # Now handles multiple hosts and targets.

96
binutils/configure vendored
View File

@@ -44,6 +44,8 @@ symbolic_link='ln -s'
#hard_link="echo ln" #hard_link="echo ln"
#symbolic_link="echo ln -s" #symbolic_link="echo ln -s"
progname=$0
# clear some things potentially inherited from environment. # clear some things potentially inherited from environment.
ansi= ansi=
defaulttargets= defaulttargets=
@@ -69,7 +71,8 @@ do
-destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*) -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'` destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
;; ;;
-forcesubdirs | +forcesubdirs | +f) -forcesubdirs | +forcesubdirs | +forcesubdir | +forcesubdi | +forcesubd \
| +forcesub | +forcesu | +forces | +force | +forc | +for | +fo | +f)
forcesubdirs=${arg} forcesubdirs=${arg}
;; ;;
-languages=* | +languages=* | +language=* | +languag=* \ -languages=* | +languages=* | +language=* | +languag=* \
@@ -178,7 +181,7 @@ fi
srctrigger=ar.c srctrigger=ar.c
srcname="binutils" srcname="binutils"
## end of common part ## end of common part.
# are we rebuilding config itself? # are we rebuilding config itself?
if [ -n "${template}" ] ; then if [ -n "${template}" ] ; then
@@ -187,12 +190,17 @@ if [ -n "${template}" ] ; then
exit 1 exit 1
fi fi
mv configure configure.old # prep the template
echo "#!/bin/sh" > configure sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
echo "# Please do not edit this file. It is generated automatically from" >> configure #### configure.in common parts come in here.\
echo "# configure.in and a configure template." >> configure ## end of common part.' \
echo "configdirs=" >> configure -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
echo >> configure #### configure.in per-host parts come in here.\
## end of per-host part.' \
-e '/^#### configure.in per-target parts come in here.$/,/^## end of per-target part.$/c\
#### configure.in per-target parts come in here.\
## end of per-target part.' \
< ${template} > template.new
if [ -r configure.in ] ; then if [ -r configure.in ] ; then
if [ -z "`grep '^# per\-host:' configure.in`" ] ; then if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
@@ -211,10 +219,10 @@ if [ -n "${template}" ] ; then
sed -e '1,/^# per\-target:/d' configure.in > configure.tgt sed -e '1,/^# per\-target:/d' configure.in > configure.tgt
# and insert them # and insert them
sed -e '/^#### configure.in common part/ r configure.com' \ sed -e '/^#### configure.in common parts come in here.$/ r configure.com' \
-e '/^#### configure.in per\-host part/ r configure.hst' \ -e '/^#### configure.in per\-host parts come in here.$/ r configure.hst' \
-e '/^#### configure.in per\-target part/ r configure.tgt' \ -e '/^#### configure.in per\-target parts come in here.$/ r configure.tgt' \
${template} >> configure template.new > configure.new
rm -f configure.com configure.tgt configure.hst rm -f configure.com configure.tgt configure.hst
else else
@@ -222,8 +230,10 @@ if [ -n "${template}" ] ; then
cat ${template} >> configure cat ${template} >> configure
fi fi
chmod a+x configure chmod a+x configure.new
rm configure.old rm template.new
# mv configure configure.old
mv configure.new configure
echo Rebuilt configure in `pwd` echo Rebuilt configure in `pwd`
if [ -z "${norecurse}" ] ; then if [ -z "${norecurse}" ] ; then
@@ -266,7 +276,7 @@ for host in ${hosts} ; do
#### configure.in per-host parts come in here. #### configure.in per-host parts come in here.
## end of per-target part ## end of per-host part.
for target in ${targets} ; do for target in ${targets} ; do
@@ -280,18 +290,22 @@ for host in ${hosts} ; do
files= files=
links= links=
## end of per-target part ## end of per-target part.
# Temporarily, we support only direct subdir builds. # Temporarily, we support only direct subdir builds.
hostsubdir=Host-${host} hostsubdir=Host-${host}
targetsubdir=Target-${target} targetsubdir=Target-${target}
if [ -n "${removing}" ] ; then if [ -n "${removing}" ] ; then
if [ -d "${hostsubdir}/${targetsubdir}" ] ; then if [ -n "${forcesubdirs}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir} if [ -d "${hostsubdir}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir}
if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then
rm -rf ${hostsubdir} rm -rf ${hostsubdir}
fi
else
echo Warning: no `pwd`/${hostsubdir} to remove.
fi fi
else else
rm -f Makefile config.status ${links} rm -f Makefile config.status ${links}
@@ -330,11 +344,12 @@ links=
if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
if [ -z "${srcdirdefaulted}" ] ; then if [ -z "${srcdirdefaulted}" ] ; then
echo "${progname}: Can't find ${srcname} sources in \`${srcdir}'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
else else
echo "${progname}: Can't find ${srcname} sources in \`.' or \`..'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
fi fi
echo \(At least ${srctrigger} is missing.\) 1>&2
exit 1 exit 1
fi fi
@@ -478,8 +493,22 @@ links=
originaldir=`pwd` originaldir=`pwd`
cd ${srcdir} cd ${srcdir}
fi fi
done done # for each target
done
# # Now build a Makefile for this host.
# if [ -n "${forcesubdirs}" ] ; then
# cd ${hostsubdir}
# cat > GNUmakefile << E!O!F
## Makefile generated by configure for host ${host}.
#
#%:
# for i in ${targets} ; do \
# $(MAKE) -C Target-\$i \$@
#
#all clean stage1 stage2 stage3 stage4etags tags TAGS
#E!O!F
# fi
done # for each host
# If there are subdirectories, then recurse. # If there are subdirectories, then recurse.
@@ -555,8 +584,23 @@ exit 0
# #
# $Log$ # $Log$
# Revision 1.7 1991/04/17 01:41:03 rich # Revision 1.8 1991/05/14 14:14:18 rich
# Fixed a problem with host dependent parts. # see devo/configure 1.11
#
# Revision 1.10 1991/05/04 00:58:38 rich
# Fix program name bug.
#
# Revision 1.9 1991/05/03 19:14:18 rich
# Changed getopt to libiberty, commented out an aborted attempt at host
# level Makefiles because it caused errors on +rm, add a warning for
# directories expected to be removed on +rm but that don't exist.
#
# Revision 1.8 1991/04/24 16:50:59 rich
# Three staging checkpoint.
#
# Revision 1.7 1991/04/17 01:34:47 rich
# Added getopt for binutils, fixed problem with host dependancies in
# configure.template.
# #
# Revision 1.6 1991/04/16 00:18:44 rich # Revision 1.6 1991/04/16 00:18:44 rich
# Now handles multiple hosts and targets. # Now handles multiple hosts and targets.

96
gas/configure vendored
View File

@@ -44,6 +44,8 @@ symbolic_link='ln -s'
#hard_link="echo ln" #hard_link="echo ln"
#symbolic_link="echo ln -s" #symbolic_link="echo ln -s"
progname=$0
# clear some things potentially inherited from environment. # clear some things potentially inherited from environment.
ansi= ansi=
defaulttargets= defaulttargets=
@@ -69,7 +71,8 @@ do
-destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*) -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'` destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
;; ;;
-forcesubdirs | +forcesubdirs | +f) -forcesubdirs | +forcesubdirs | +forcesubdir | +forcesubdi | +forcesubd \
| +forcesub | +forcesu | +forces | +force | +forc | +for | +fo | +f)
forcesubdirs=${arg} forcesubdirs=${arg}
;; ;;
-languages=* | +languages=* | +language=* | +languag=* \ -languages=* | +languages=* | +language=* | +languag=* \
@@ -178,7 +181,7 @@ fi
srctrigger=as.c srctrigger=as.c
srcname="gas" srcname="gas"
## end of common part ## end of common part.
# are we rebuilding config itself? # are we rebuilding config itself?
if [ -n "${template}" ] ; then if [ -n "${template}" ] ; then
@@ -187,12 +190,17 @@ if [ -n "${template}" ] ; then
exit 1 exit 1
fi fi
mv configure configure.old # prep the template
echo "#!/bin/sh" > configure sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
echo "# Please do not edit this file. It is generated automatically from" >> configure #### configure.in common parts come in here.\
echo "# configure.in and a configure template." >> configure ## end of common part.' \
echo "configdirs=" >> configure -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
echo >> configure #### configure.in per-host parts come in here.\
## end of per-host part.' \
-e '/^#### configure.in per-target parts come in here.$/,/^## end of per-target part.$/c\
#### configure.in per-target parts come in here.\
## end of per-target part.' \
< ${template} > template.new
if [ -r configure.in ] ; then if [ -r configure.in ] ; then
if [ -z "`grep '^# per\-host:' configure.in`" ] ; then if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
@@ -211,10 +219,10 @@ if [ -n "${template}" ] ; then
sed -e '1,/^# per\-target:/d' configure.in > configure.tgt sed -e '1,/^# per\-target:/d' configure.in > configure.tgt
# and insert them # and insert them
sed -e '/^#### configure.in common part/ r configure.com' \ sed -e '/^#### configure.in common parts come in here.$/ r configure.com' \
-e '/^#### configure.in per\-host part/ r configure.hst' \ -e '/^#### configure.in per\-host parts come in here.$/ r configure.hst' \
-e '/^#### configure.in per\-target part/ r configure.tgt' \ -e '/^#### configure.in per\-target parts come in here.$/ r configure.tgt' \
${template} >> configure template.new > configure.new
rm -f configure.com configure.tgt configure.hst rm -f configure.com configure.tgt configure.hst
else else
@@ -222,8 +230,10 @@ if [ -n "${template}" ] ; then
cat ${template} >> configure cat ${template} >> configure
fi fi
chmod a+x configure chmod a+x configure.new
rm configure.old rm template.new
# mv configure configure.old
mv configure.new configure
echo Rebuilt configure in `pwd` echo Rebuilt configure in `pwd`
if [ -z "${norecurse}" ] ; then if [ -z "${norecurse}" ] ; then
@@ -266,7 +276,7 @@ for host in ${hosts} ; do
#### configure.in per-host parts come in here. #### configure.in per-host parts come in here.
## end of per-target part ## end of per-host part.
for target in ${targets} ; do for target in ${targets} ; do
@@ -331,18 +341,22 @@ files="config/ho-${host}.h config/tc-${cpu_type}.c \
config/atof-${atof}.c" config/atof-${atof}.c"
links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c" links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-targ.c"
## end of per-target part ## end of per-target part.
# Temporarily, we support only direct subdir builds. # Temporarily, we support only direct subdir builds.
hostsubdir=Host-${host} hostsubdir=Host-${host}
targetsubdir=Target-${target} targetsubdir=Target-${target}
if [ -n "${removing}" ] ; then if [ -n "${removing}" ] ; then
if [ -d "${hostsubdir}/${targetsubdir}" ] ; then if [ -n "${forcesubdirs}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir} if [ -d "${hostsubdir}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir}
if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then
rm -rf ${hostsubdir} rm -rf ${hostsubdir}
fi
else
echo Warning: no `pwd`/${hostsubdir} to remove.
fi fi
else else
rm -f Makefile config.status ${links} rm -f Makefile config.status ${links}
@@ -381,11 +395,12 @@ links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-ta
if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
if [ -z "${srcdirdefaulted}" ] ; then if [ -z "${srcdirdefaulted}" ] ; then
echo "${progname}: Can't find ${srcname} sources in \`${srcdir}'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
else else
echo "${progname}: Can't find ${srcname} sources in \`.' or \`..'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
fi fi
echo \(At least ${srctrigger} is missing.\) 1>&2
exit 1 exit 1
fi fi
@@ -529,8 +544,22 @@ links="host.h targ-cpu.c targ-cpu.h targ-env.h obj-format.h obj-format.c atof-ta
originaldir=`pwd` originaldir=`pwd`
cd ${srcdir} cd ${srcdir}
fi fi
done done # for each target
done
# # Now build a Makefile for this host.
# if [ -n "${forcesubdirs}" ] ; then
# cd ${hostsubdir}
# cat > GNUmakefile << E!O!F
## Makefile generated by configure for host ${host}.
#
#%:
# for i in ${targets} ; do \
# $(MAKE) -C Target-\$i \$@
#
#all clean stage1 stage2 stage3 stage4etags tags TAGS
#E!O!F
# fi
done # for each host
# If there are subdirectories, then recurse. # If there are subdirectories, then recurse.
@@ -606,8 +635,23 @@ exit 0
# #
# $Log$ # $Log$
# Revision 1.8 1991/04/17 01:40:45 rich # Revision 1.9 1991/05/14 14:14:08 rich
# Fixed a problem with host dependent parts. # see devo/configure 1.11
#
# Revision 1.10 1991/05/04 00:58:38 rich
# Fix program name bug.
#
# Revision 1.9 1991/05/03 19:14:18 rich
# Changed getopt to libiberty, commented out an aborted attempt at host
# level Makefiles because it caused errors on +rm, add a warning for
# directories expected to be removed on +rm but that don't exist.
#
# Revision 1.8 1991/04/24 16:50:59 rich
# Three staging checkpoint.
#
# Revision 1.7 1991/04/17 01:34:47 rich
# Added getopt for binutils, fixed problem with host dependancies in
# configure.template.
# #
# Revision 1.6 1991/04/16 00:18:44 rich # Revision 1.6 1991/04/16 00:18:44 rich
# Now handles multiple hosts and targets. # Now handles multiple hosts and targets.

201
gdb/configure vendored
View File

@@ -44,8 +44,11 @@ symbolic_link='ln -s'
#hard_link="echo ln" #hard_link="echo ln"
#symbolic_link="echo ln -s" #symbolic_link="echo ln -s"
progname=$0
# clear some things potentially inherited from environment. # clear some things potentially inherited from environment.
ansi= ansi=
defaulttargets=
destdir= destdir=
fatal= fatal=
hostsubdir= hostsubdir=
@@ -68,7 +71,8 @@ do
-destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*) -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'` destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
;; ;;
-forcesubdirs | +forcesubdirs | +f) -forcesubdirs | +forcesubdirs | +forcesubdir | +forcesubdi | +forcesubd \
| +forcesub | +forcesu | +forces | +force | +forc | +for | +fo | +f)
forcesubdirs=${arg} forcesubdirs=${arg}
;; ;;
-languages=* | +languages=* | +language=* | +languag=* \ -languages=* | +languages=* | +language=* | +languag=* \
@@ -174,13 +178,11 @@ fi
# script appropriate for this directory. For more information, check # script appropriate for this directory. For more information, check
# any existing configure script. # any existing configure script.
configdirs="bfd binutils ld gas gnulib gcc clib" configdirs="libiberty bfd binutils ld gas gcc gnulib clib"
srctrigger=README.configure srctrigger=README.configure
srcname="gnu development package" srcname="gnu development package"
# per-host: ## end of common part.
## end of common part
# are we rebuilding config itself? # are we rebuilding config itself?
if [ -n "${template}" ] ; then if [ -n "${template}" ] ; then
@@ -189,12 +191,17 @@ if [ -n "${template}" ] ; then
exit 1 exit 1
fi fi
mv configure configure.old # prep the template
echo "#!/bin/sh" > configure sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
echo "# Please do not edit this file. It is generated automatically from" >> configure #### configure.in common parts come in here.\
echo "# configure.in and a configure template." >> configure ## end of common part.' \
echo "configdirs=" >> configure -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
echo >> configure #### configure.in per-host parts come in here.\
## end of per-host part.' \
-e '/^#### configure.in per-target parts come in here.$/,/^## end of per-target part.$/c\
#### configure.in per-target parts come in here.\
## end of per-target part.' \
< ${template} > template.new
if [ -r configure.in ] ; then if [ -r configure.in ] ; then
if [ -z "`grep '^# per\-host:' configure.in`" ] ; then if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
@@ -207,21 +214,27 @@ if [ -n "${template}" ] ; then
exit 1 exit 1
fi fi
sed -e '/^# per\-target:/,$d' configure.in > configure.com # split configure.in into common, per-host, and per-target parts
sed -e '/^# per\-host:/,$d' configure.in > configure.com
sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' configure.in > configure.hst
sed -e '1,/^# per\-target:/d' configure.in > configure.tgt sed -e '1,/^# per\-target:/d' configure.in > configure.tgt
sed -e '/^#### configure.in common parts/ r configure.com' \ # and insert them
-e '/^##### / r configure.tgt' \ sed -e '/^#### configure.in common parts come in here.$/ r configure.com' \
${template} >> configure -e '/^#### configure.in per\-host parts come in here.$/ r configure.hst' \
-e '/^#### configure.in per\-target parts come in here.$/ r configure.tgt' \
template.new > configure.new
rm -f configure.top configure.bot rm -f configure.com configure.tgt configure.hst
else else
echo Warning: no configure.in in `pwd` echo Warning: no configure.in in `pwd`
cat ${template} >> configure cat ${template} >> configure
fi fi
chmod a+x configure chmod a+x configure.new
rm configure.old rm template.new
# mv configure configure.old
mv configure.new configure
echo Rebuilt configure in `pwd` echo Rebuilt configure in `pwd`
if [ -z "${norecurse}" ] ; then if [ -z "${norecurse}" ] ; then
@@ -257,12 +270,14 @@ fi
for host in ${hosts} ; do for host in ${hosts} ; do
# Default other arg # Default other arg
if [ -z "${targets}" ] ; then if [ -z "${targets}" -o -n "${defaulttargets}" ] ; then
targets=${host} targets=${host}
defaulttargets=true
fi fi
#### configure.in per-host parts come in here. #### configure.in per-host parts come in here.
## end of per-target part
## end of per-host part.
for target in ${targets} ; do for target in ${targets} ; do
@@ -272,18 +287,23 @@ for host in ${hosts} ; do
fi fi
#### configure.in per-target parts come in here. #### configure.in per-target parts come in here.
## end of per-target part
## end of per-target part.
# Temporarily, we support only direct subdir builds. # Temporarily, we support only direct subdir builds.
hostsubdir=Host-${host} hostsubdir=Host-${host}
targetsubdir=Target-${target} targetsubdir=Target-${target}
if [ -n "${removing}" ] ; then if [ -n "${removing}" ] ; then
if [ -d "${hostsubdir}/${targetsubdir}" ] ; then if [ -n "${forcesubdirs}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir} if [ -d "${hostsubdir}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir}
if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then
rm -rf ${hostsubdir} rm -rf ${hostsubdir}
fi
else
echo Warning: no `pwd`/${hostsubdir} to remove.
fi fi
else else
rm -f Makefile config.status ${links} rm -f Makefile config.status ${links}
@@ -322,11 +342,12 @@ for host in ${hosts} ; do
if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
if [ -z "${srcdirdefaulted}" ] ; then if [ -z "${srcdirdefaulted}" ] ; then
echo "${progname}: Can't find ${srcname} sources in \`${srcdir}'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
else else
echo "${progname}: Can't find ${srcname} sources in \`.' or \`..'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
fi fi
echo \(At least ${srctrigger} is missing.\) 1>&2
exit 1 exit 1
fi fi
@@ -470,8 +491,22 @@ for host in ${hosts} ; do
originaldir=`pwd` originaldir=`pwd`
cd ${srcdir} cd ${srcdir}
fi fi
done done # for each target
done
# # Now build a Makefile for this host.
# if [ -n "${forcesubdirs}" ] ; then
# cd ${hostsubdir}
# cat > GNUmakefile << E!O!F
## Makefile generated by configure for host ${host}.
#
#%:
# for i in ${targets} ; do \
# $(MAKE) -C Target-\$i \$@
#
#all clean stage1 stage2 stage3 stage4etags tags TAGS
#E!O!F
# fi
done # for each host
# If there are subdirectories, then recurse. # If there are subdirectories, then recurse.
@@ -483,44 +518,92 @@ for configdir in ${configdirs} ; do
specifics= specifics=
commons= commons=
for target in ${targets} ; do if [ -n "${defaulttargets}" ] ; then
# check for target specific dir override for host in ${hosts} ; do
if [ -d ${configdir}.${target} ] ; then if [ -d ${configdir}.${host} ] ; then
newspecifics="${specifics} ${target}" newspecifics="${specifics} ${host}"
specifics=${newspecifics} specifics=${newspecifics}
else else
newcommons="${commons} +target=${target}" newcommons="${commons} ${host}"
commons=${newcommons} commons=${newcommons}
fi fi # if target specific
done # for each host
done if [ -n "${commons}" ] ; then
(cd ${configdir} ;
if [ -n "${verbose}" ] ; then ./configure ${commons} ${verbose} ${forcesubdirs} ${removing}) \
echo " "commons=\"${commons}\"
echo " "specifics=\"${specifics}\"
fi
if [ -n "${commons}" ] ; then
(cd ${configdir} ;
./configure ${host} ${verbose} ${forcesubdirs} ${removing} ${commons}) \
| sed 's/^/ /'
fi
if [ -n "${specifics}" ] ; then
for target in ${specifics} ; do
echo Configuring target specific directory ${configdir}.${target}...
(cd ${configdir}.${target} ;
./configure ${host} ${verbose} ${forcesubdirs} ${removing} "+target=${target}") \
| sed 's/^/ /' | sed 's/^/ /'
done fi # if any common hosts
fi
if [ -n "${specifics}" ] ; then
for host in ${specifics} ; do
echo Configuring target specific directory ${configdir}.${host}...
(cd ${configdir}.${host} ;
./configure ${host} ${verbose} ${forcesubdirs} ${removing}) \
| sed 's/^/ /'
done # for host in specifics
fi # if there are any specifics
else
for target in ${targets} ; do
if [ -d ${configdir}.${target} ] ; then
newspecifics="${specifics} ${target}"
specifics=${newspecifics}
else
newcommons="${commons} +target=${target}"
commons=${newcommons}
fi
done # check for target specific dir override
if [ -n "${verbose}" ] ; then
echo " "commons=\"${commons}\"
echo " "specifics=\"${specifics}\"
fi # if verbose
if [ -n "${commons}" ] ; then
(cd ${configdir} ;
./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} ${commons}) \
| sed 's/^/ /'
fi # if any commons
if [ -n "${specifics}" ] ; then
for target in ${specifics} ; do
echo Configuring target specific directory ${configdir}.${target}...
(cd ${configdir}.${target} ;
./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} "+target=${target}") \
| sed 's/^/ /'
done
fi # if any specifics
fi # not default targets
done done
exit 0 exit 0
# #
# $Log$ # $Log$
# Revision 1.2 1991/04/15 23:46:48 rich # Revision 1.3 1991/05/14 14:14:40 rich
# see devo/configure 1.11
#
# Revision 1.10 1991/05/04 00:58:38 rich
# Fix program name bug.
#
# Revision 1.9 1991/05/03 19:14:18 rich
# Changed getopt to libiberty, commented out an aborted attempt at host
# level Makefiles because it caused errors on +rm, add a warning for
# directories expected to be removed on +rm but that don't exist.
#
# Revision 1.8 1991/04/24 16:50:59 rich
# Three staging checkpoint.
#
# Revision 1.7 1991/04/17 01:34:47 rich
# Added getopt for binutils, fixed problem with host dependancies in
# configure.template.
#
# Revision 1.6 1991/04/16 00:18:44 rich
# Now handles multiple hosts and targets.
#
# Revision 1.5 1991/04/15 23:43:44 rich
# Now handles multiple hosts and targets. # Now handles multiple hosts and targets.
# #
# Revision 1.4 1991/04/13 02:11:03 rich # Revision 1.4 1991/04/13 02:11:03 rich

96
ld/configure vendored
View File

@@ -44,6 +44,8 @@ symbolic_link='ln -s'
#hard_link="echo ln" #hard_link="echo ln"
#symbolic_link="echo ln -s" #symbolic_link="echo ln -s"
progname=$0
# clear some things potentially inherited from environment. # clear some things potentially inherited from environment.
ansi= ansi=
defaulttargets= defaulttargets=
@@ -69,7 +71,8 @@ do
-destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*) -destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'` destdir=`echo ${arg} | sed 's/[+-]d[a-z]*=//'`
;; ;;
-forcesubdirs | +forcesubdirs | +f) -forcesubdirs | +forcesubdirs | +forcesubdir | +forcesubdi | +forcesubd \
| +forcesub | +forcesu | +forces | +force | +forc | +for | +fo | +f)
forcesubdirs=${arg} forcesubdirs=${arg}
;; ;;
-languages=* | +languages=* | +language=* | +languag=* \ -languages=* | +languages=* | +language=* | +languag=* \
@@ -179,7 +182,7 @@ configdirs=
srctrigger=ldversion.c srctrigger=ldversion.c
srcname="linker" srcname="linker"
## end of common part ## end of common part.
# are we rebuilding config itself? # are we rebuilding config itself?
if [ -n "${template}" ] ; then if [ -n "${template}" ] ; then
@@ -188,12 +191,17 @@ if [ -n "${template}" ] ; then
exit 1 exit 1
fi fi
mv configure configure.old # prep the template
echo "#!/bin/sh" > configure sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
echo "# Please do not edit this file. It is generated automatically from" >> configure #### configure.in common parts come in here.\
echo "# configure.in and a configure template." >> configure ## end of common part.' \
echo "configdirs=" >> configure -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
echo >> configure #### configure.in per-host parts come in here.\
## end of per-host part.' \
-e '/^#### configure.in per-target parts come in here.$/,/^## end of per-target part.$/c\
#### configure.in per-target parts come in here.\
## end of per-target part.' \
< ${template} > template.new
if [ -r configure.in ] ; then if [ -r configure.in ] ; then
if [ -z "`grep '^# per\-host:' configure.in`" ] ; then if [ -z "`grep '^# per\-host:' configure.in`" ] ; then
@@ -212,10 +220,10 @@ if [ -n "${template}" ] ; then
sed -e '1,/^# per\-target:/d' configure.in > configure.tgt sed -e '1,/^# per\-target:/d' configure.in > configure.tgt
# and insert them # and insert them
sed -e '/^#### configure.in common part/ r configure.com' \ sed -e '/^#### configure.in common parts come in here.$/ r configure.com' \
-e '/^#### configure.in per\-host part/ r configure.hst' \ -e '/^#### configure.in per\-host parts come in here.$/ r configure.hst' \
-e '/^#### configure.in per\-target part/ r configure.tgt' \ -e '/^#### configure.in per\-target parts come in here.$/ r configure.tgt' \
${template} >> configure template.new > configure.new
rm -f configure.com configure.tgt configure.hst rm -f configure.com configure.tgt configure.hst
else else
@@ -223,8 +231,10 @@ if [ -n "${template}" ] ; then
cat ${template} >> configure cat ${template} >> configure
fi fi
chmod a+x configure chmod a+x configure.new
rm configure.old rm template.new
# mv configure configure.old
mv configure.new configure
echo Rebuilt configure in `pwd` echo Rebuilt configure in `pwd`
if [ -z "${norecurse}" ] ; then if [ -z "${norecurse}" ] ; then
@@ -267,7 +277,7 @@ for host in ${hosts} ; do
#### configure.in per-host parts come in here. #### configure.in per-host parts come in here.
## end of per-target part ## end of per-host part.
for target in ${targets} ; do for target in ${targets} ; do
@@ -278,18 +288,22 @@ for host in ${hosts} ; do
#### configure.in per-target parts come in here. #### configure.in per-target parts come in here.
## end of per-target part ## end of per-target part.
# Temporarily, we support only direct subdir builds. # Temporarily, we support only direct subdir builds.
hostsubdir=Host-${host} hostsubdir=Host-${host}
targetsubdir=Target-${target} targetsubdir=Target-${target}
if [ -n "${removing}" ] ; then if [ -n "${removing}" ] ; then
if [ -d "${hostsubdir}/${targetsubdir}" ] ; then if [ -n "${forcesubdirs}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir} if [ -d "${hostsubdir}" ] ; then
rm -rf ${hostsubdir}/${targetsubdir}
if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then
rm -rf ${hostsubdir} rm -rf ${hostsubdir}
fi
else
echo Warning: no `pwd`/${hostsubdir} to remove.
fi fi
else else
rm -f Makefile config.status ${links} rm -f Makefile config.status ${links}
@@ -328,11 +342,12 @@ for host in ${hosts} ; do
if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; then
if [ -z "${srcdirdefaulted}" ] ; then if [ -z "${srcdirdefaulted}" ] ; then
echo "${progname}: Can't find ${srcname} sources in \`${srcdir}'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/${srcdir}" 1>&2
else else
echo "${progname}: Can't find ${srcname} sources in \`.' or \`..'." 1>&2 echo "${progname}: Can't find ${srcname} sources in `pwd`/. or `pwd`/.." 1>&2
fi fi
echo \(At least ${srctrigger} is missing.\) 1>&2
exit 1 exit 1
fi fi
@@ -476,8 +491,22 @@ for host in ${hosts} ; do
originaldir=`pwd` originaldir=`pwd`
cd ${srcdir} cd ${srcdir}
fi fi
done done # for each target
done
# # Now build a Makefile for this host.
# if [ -n "${forcesubdirs}" ] ; then
# cd ${hostsubdir}
# cat > GNUmakefile << E!O!F
## Makefile generated by configure for host ${host}.
#
#%:
# for i in ${targets} ; do \
# $(MAKE) -C Target-\$i \$@
#
#all clean stage1 stage2 stage3 stage4etags tags TAGS
#E!O!F
# fi
done # for each host
# If there are subdirectories, then recurse. # If there are subdirectories, then recurse.
@@ -553,8 +582,23 @@ exit 0
# #
# $Log$ # $Log$
# Revision 1.8 1991/04/17 01:41:32 rich # Revision 1.9 1991/05/14 14:14:30 rich
# Fixed a problem with host dependent parts. # see devo/configure 1.11
#
# Revision 1.10 1991/05/04 00:58:38 rich
# Fix program name bug.
#
# Revision 1.9 1991/05/03 19:14:18 rich
# Changed getopt to libiberty, commented out an aborted attempt at host
# level Makefiles because it caused errors on +rm, add a warning for
# directories expected to be removed on +rm but that don't exist.
#
# Revision 1.8 1991/04/24 16:50:59 rich
# Three staging checkpoint.
#
# Revision 1.7 1991/04/17 01:34:47 rich
# Added getopt for binutils, fixed problem with host dependancies in
# configure.template.
# #
# Revision 1.6 1991/04/16 00:18:44 rich # Revision 1.6 1991/04/16 00:18:44 rich
# Now handles multiple hosts and targets. # Now handles multiple hosts and targets.