aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorK. Richard Pixley <rich@cygnus>1991-05-14 14:09:59 +0000
committerK. Richard Pixley <rich@cygnus>1991-05-14 14:09:59 +0000
commit7df723106b620970603c2d6a52f31103055ff150 (patch)
treec4157f65d31c141e0d9700c304111437d62d9eda /configure
parent852f8c2121cee55660ab7957cd3314c8676c671a (diff)
downloadfsf-binutils-gdb-7df723106b620970603c2d6a52f31103055ff150.zip
fsf-binutils-gdb-7df723106b620970603c2d6a52f31103055ff150.tar.gz
fsf-binutils-gdb-7df723106b620970603c2d6a52f31103055ff150.tar.bz2
Many small changes including the removal of configure.template. Any
valid configure script can now be used as a template.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure51
1 files changed, 34 insertions, 17 deletions
diff --git a/configure b/configure
index a4a2178..7ae2ba5 100755
--- a/configure
+++ b/configure
@@ -44,6 +44,8 @@ symbolic_link='ln -s'
#hard_link="echo ln"
#symbolic_link="echo ln -s"
+progname=$0
+
# clear some things potentially inherited from environment.
ansi=
defaulttargets=
@@ -69,7 +71,8 @@ do
-destdir=* | +destdir=* | +destdi=* | +destd=* | +dest=* | +des=* | +de=* | +d=*)
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}
;;
-languages=* | +languages=* | +language=* | +languag=* \
@@ -179,7 +182,7 @@ configdirs="libiberty bfd binutils ld gas gcc gnulib clib"
srctrigger=README.configure
srcname="gnu development package"
-## end of common part
+## end of common part.
# are we rebuilding config itself?
if [ -n "${template}" ] ; then
@@ -188,12 +191,17 @@ if [ -n "${template}" ] ; then
exit 1
fi
- mv configure configure.old
- echo "#!/bin/sh" > configure
- echo "# Please do not edit this file. It is generated automatically from" >> configure
- echo "# configure.in and a configure template." >> configure
- echo "configdirs=" >> configure
- echo >> configure
+# prep the template
+ sed -e '/^#### configure.in common parts come in here.$/,/^## end of common part.$/c\
+#### configure.in common parts come in here.\
+## end of common part.' \
+ -e '/^#### configure.in per-host parts come in here.$/,/^## end of per-host part.$/c\
+#### 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 [ -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
# and insert them
- sed -e '/^#### configure.in common part/ r configure.com' \
- -e '/^#### configure.in per\-host part/ r configure.hst' \
- -e '/^#### configure.in per\-target part/ r configure.tgt' \
- ${template} >> configure
+ sed -e '/^#### configure.in common parts come in here.$/ r configure.com' \
+ -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.com configure.tgt configure.hst
else
@@ -223,8 +231,10 @@ if [ -n "${template}" ] ; then
cat ${template} >> configure
fi
- chmod a+x configure
- rm configure.old
+ chmod a+x configure.new
+ rm template.new
+# mv configure configure.old
+ mv configure.new configure
echo Rebuilt configure in `pwd`
if [ -z "${norecurse}" ] ; then
@@ -267,7 +277,7 @@ for host in ${hosts} ; do
#### configure.in per-host parts come in here.
-## end of per-target part
+## end of per-host part.
for target in ${targets} ; do
@@ -278,7 +288,7 @@ for host in ${hosts} ; do
#### 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.
hostsubdir=Host-${host}
@@ -572,7 +582,14 @@ exit 0
#
# $Log$
-# Revision 1.10 1991/05/03 19:14:21 rich
+# Revision 1.11 1991/05/14 14:09:59 rich
+# Many small changes including the removal of configure.template. Any
+# valid configure script can now be used as a template.
+#
+# 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.