diff options
author | K. Richard Pixley <rich@cygnus> | 1991-05-14 14:14:40 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1991-05-14 14:14:40 +0000 |
commit | c4220303188899ce5d0088cf9cedf162e22d4d1d (patch) | |
tree | 6e0fb53e083ebefc73fd754af4d172a3413b1629 /ld/configure | |
parent | 7df723106b620970603c2d6a52f31103055ff150 (diff) | |
download | gdb-c4220303188899ce5d0088cf9cedf162e22d4d1d.zip gdb-c4220303188899ce5d0088cf9cedf162e22d4d1d.tar.gz gdb-c4220303188899ce5d0088cf9cedf162e22d4d1d.tar.bz2 |
see devo/configure 1.11
Diffstat (limited to 'ld/configure')
-rwxr-xr-x | ld/configure | 96 |
1 files changed, 70 insertions, 26 deletions
diff --git a/ld/configure b/ld/configure index 5a938b5..75d5755 100755 --- a/ld/configure +++ b/ld/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= srctrigger=ldversion.c srcname="linker" -## 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,18 +288,22 @@ 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} targetsubdir=Target-${target} if [ -n "${removing}" ] ; then - if [ -d "${hostsubdir}/${targetsubdir}" ] ; then - rm -rf ${hostsubdir}/${targetsubdir} + if [ -n "${forcesubdirs}" ] ; then + if [ -d "${hostsubdir}" ] ; then + rm -rf ${hostsubdir}/${targetsubdir} - if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then - rm -rf ${hostsubdir} + if [ -z "`(ls ${hostsubdir}) 2>&1 | grep Target-`" ] ; then + rm -rf ${hostsubdir} + fi + else + echo Warning: no `pwd`/${hostsubdir} to remove. fi else rm -f Makefile config.status ${links} @@ -328,11 +342,12 @@ for host in ${hosts} ; do if [ -n "${srctrigger}" -a ! -r ${srcdir}/${srctrigger} ] ; 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 - 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 + echo \(At least ${srctrigger} is missing.\) 1>&2 exit 1 fi @@ -476,8 +491,22 @@ for host in ${hosts} ; do originaldir=`pwd` cd ${srcdir} fi - done -done + done # for each target + +# # 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. @@ -553,8 +582,23 @@ exit 0 # # $Log$ -# Revision 1.8 1991/04/17 01:41:32 rich -# Fixed a problem with host dependent parts. +# Revision 1.9 1991/05/14 14:14:30 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. |