Read cross-core files on Mach 386.
[deliverable/binutils-gdb.git] / configure
index 068c3c0b0499f5c8f9ae5b44b421069faa2d9dde..6586640ed2b8b8859d74642e477d9e77154bf67a 100755 (executable)
--- a/configure
+++ b/configure
@@ -33,7 +33,7 @@
 #      config.status is removed.
 #
 
-set -e
+set -e
 
 remove=rm
 hard_link=ln
@@ -165,25 +165,21 @@ fi
 
 if (echo $0 | grep '^/' > /dev/null) ; then
        progname=$0
-       configsub=`echo $0 | sed -e 's:[^/]*$:config.sub:'`
 else
        if (echo $0 | grep '/' > /dev/null) ; then
                progname=`pwd`/$0
-
-               if [ ! -f config.sub ] ; then
-                       echo '***' can not find config.sub.
-                       echo 1
-               fi
-
-               configsub=`pwd`/config.sub
        else
                progname=$0
-               configsub="config.sub"
                PATH=$PATH:`pwd` ; export PATH
        fi
 fi
 
-echo configure = ${progname}, config.sub = ${configsub}
+configsub=`echo ${progname} | sed 's/configure\$/config.sub/'`
+
+if [ ! -f ${configsub} ] ; then
+       echo '***' cannot find config.sub.
+       echo 1
+fi
 
 # process host and target only if not removing.
 if [ -z "${removing}" -a -z "${fatal}" ] ; then
@@ -209,7 +205,9 @@ if [ -n "${fatal}" -o "${hosts}" = "help" ] ; then
        echo " +norecursion     configure this directory only. [recurse]" ;
        echo " +objdir=ODIR     configure in a parallel tree rooted in ODIR. [rooted in \".\"]" ;
        echo " +rm              remove this configuration. [build a configuration]" ;
-       echo " +subdirs         configure in subdirectories.  [in source directories]" ;
+       echo " +site            configure with site specific makefile" ;
+# This is correctly aligned in the output, even though it isn't here.
+       echo " +subdirs configure in subdirectories.  [in source directories]" ;
        echo " +target=TARGET   configure for TARGET.  [TARGET = HOST]" ;
        echo " +tmpdir=TMPDIR   create temporary files in TMPDIR.  [ TMPDIR = \"/tmp\" ]" ;
        echo ;
@@ -487,7 +485,7 @@ for host in ${hosts} ; do
 
                                if [ -f ${srcdir}/${site_makefile_frag} ] ; then
                                        (echo "site_makefile_frag = ${srcdir}/${site_makefile_frag}" ; 
-                                               sed -e "/^####/  r ${srcdir}/${target_makefile_frag}" ${Makefile}) > Makefile.tem
+                                               sed -e "/^####/  r ${srcdir}/${site_makefile_frag}" ${Makefile}) > Makefile.tem
                                        mv Makefile.tem ${Makefile}
                                fi
                        fi
@@ -536,7 +534,7 @@ for host in ${hosts} ; do
                                        andandusing="${andusing} and \"${site_makefile_frag}\""
                                fi
                        else
-                               andandusing=${using}
+                               andandusing=${andusing}
                        fi
 
                        if [ -n "${verbose}" -o -z "${recurring}" ] ; then
@@ -575,12 +573,22 @@ for host in ${hosts} ; do
                                                fi
                                        fi
 
-                                       (cd ${configdir} ;
-                                               ${progname} +recurring ${host_alias} +target=${target_alias} \
-                                                       ${verbose} ${subdirs} ${removing} +destdir=${destdir} \
-                                                       `if [ -n "${objdir}" ] ; then echo +objdir=${objdir}/${configdir} ; fi` \
-                                                       ${tmpdiroption}) \
-                                               | sed 's/^/     /'
+                                       POPDIR=`pwd`
+                                       cd ${configdir} 
+
+                                       ${progname} +recurring ${host_alias} +target=${target_alias} \
+                                               ${verbose} ${subdirs} ${removing} +destdir=${destdir} \
+                                               `if [ -n "${objdir}" ] ; then echo +objdir=${objdir}/${configdir} ; fi` \
+                                               ${tmpdiroption}
+
+                                       cd ${POPDIR}
+
+#                                      (cd ${configdir} ;
+#                                              if (${progname} +recurring ${host_alias} +target=${target_alias} \
+#                                                      ${verbose} ${subdirs} ${removing} +destdir=${destdir} \
+#                                                      `if [ -n "${objdir}" ] ; then echo +objdir=${objdir}/${configdir} ; fi` \
+#                                                      ${tmpdiroption}) ; then true ; else exit 1 ; fi) \
+#                                              | sed 's/^/     /'
                                else
                                        if [ -n "${verbose}" ] ; then
                                                echo Warning: directory \"${configdir}\" is missing.
@@ -622,7 +630,29 @@ exit 0
 #
 #
 # $Log$
-# Revision 1.49  1991/10/04 22:52:09  rich
+# Revision 1.55  1991/10/10 04:57:23  rich
+# * Die when sub-configure's do.
+# * get the makefile building message line correct.
+# * set -e
+#
+# Revision 1.54  1991/10/10  01:04:42  rich
+# Backed out the "/bin/sh config.sub" change.  Fails when config.sub was
+# on PATH.
+#
+# Revision 1.53  1991/10/10  00:38:08  rich
+# Call config.sub as "/bin/sh config.sub" instead of directly.  This
+# protects us from the case where config.sub isn't executable.
+#
+# Revision 1.52  1991/10/09  00:48:26  rich
+# Another patch from jim.
+#
+# Revision 1.51  1991/10/08  06:07:58  wilson
+# Fix bug in smake- file code.
+#
+# Revision 1.50  1991/10/04  23:49:37  rich
+# Per's patch for my config.sub botch.
+#
+# Revision 1.49  1991/10/04  22:52:09  rich
 # Use john's heuristic for finding ourselves.  kinda like hare krishna.
 #
 # Revision 1.48  1991/10/02  13:17:28  rich
This page took 0.024843 seconds and 4 git commands to generate.