]> Git Repo - binutils.git/blobdiff - ld/configure
fixed a bug in multiple targets
[binutils.git] / ld / configure
index 8e25e74f662ab42254fb55695ae1ce3dcd846fa2..ba073e13bee2d9b83d7fc55c4c2db02fe35957b7 100755 (executable)
@@ -3,6 +3,9 @@
 # configure.in and a configure template.
 configdirs=
 
+# the debugger.
+#set -x
+
 #!/bin/sh
 
 # Configuration script template
@@ -179,7 +182,7 @@ fi
 # any existing configure script.
 
 configdirs=
-srctrigger=ldver.c
+srctrigger=ldversion.c
 srcname="linker"
 
 ## end of common part.
@@ -249,11 +252,15 @@ if [ -n "${template}" ] ; then
                        fi
 
                        for i in ${configdir} ${targetspecificdirs} ; do
-                               if [ -r $i/configure ] ; then
-                                       (cd $i ;
-                                               ./configure +template=${template} ${verbose})
+                               if [ -d $i ] ; then
+                                       if [ -r $i/configure ] ; then
+                                               (cd $i ;
+                                                       ./configure +template=${template} ${verbose})
+                                       else
+                                               echo No configure script in `pwd`/$i
+                                       fi
                                else
-                                       echo No configure script in `pwd`/$i
+                                       echo Warning: directory $i is missing.
                                fi
                        done
                done
@@ -275,6 +282,8 @@ for host in ${hosts} ; do
                defaulttargets=true
        fi
 
+       host_makefile_frag=config/hmake-${host}
+
 #### configure.in per-host parts come in here.
 
 ## end of per-host part.
@@ -283,9 +292,11 @@ for host in ${hosts} ; do
        for target in ${targets} ; do
 
                if [ -n "${verbose}" ] ; then
-                       echo "  "target=\"${target}\"
+                       echo host \= \"${host}\", target \= \"${target}\".
                fi
 
+               target_makefile_frag=config/tmake-${target}
+
 #### configure.in per-target parts come in here.
 
 ## end of per-target part.
@@ -424,18 +435,15 @@ for host in ${hosts} ; do
                        cat ${srcdir}/Makefile.in >> Makefile
 
                        # and shake thoroughly.
-                       host_var_file=hmake-${host}
-                       target_var_file=tmake-${target}
-
                        # Conditionalize the makefile for this host.
-                       if [ -f ${srcdir}/config/${host_var_file} ] ; then
-                               sed -e "/^####/  r ${srcdir}/config/${host_var_file}" Makefile > Makefile.tem
+                       if [ -f ${srcdir}/${host_makefile_frag} ] ; then
+                               sed -e "/^####/  r ${srcdir}/${host_makefile_frag}" Makefile > Makefile.tem
                                mv Makefile.tem Makefile
                        fi
 
                        # Conditionalize the makefile for this target.
-                       if [ -f ${srcdir}/config/${target_var_file} ] ; then
-                               sed -e "/^####/  r ${srcdir}/config/${target_var_file}" Makefile > Makefile.tem
+                       if [ -f ${srcdir}/${target_makefile_frag} ] ; then
+                               sed -e "/^####/  r ${srcdir}/${target_makefile_frag}" Makefile > Makefile.tem
                                mv Makefile.tem Makefile
                        fi
 
@@ -462,15 +470,15 @@ for host in ${hosts} ; do
                        mv Makefile.tem Makefile
 
                        using=
-                       if [ -f ${srcdir}/config/${host_var_file} ] ; then
-                               using=" using \"${host_var_file}\""
+                       if [ -f ${srcdir}/${host_makefile_frag} ] ; then
+                               using=" using \"${host_makefile_frag}\""
                        fi
 
-                       if [ -f ${srcdir}/config/${target_var_file} ] ; then
+                       if [ -f ${srcdir}/${target_makefile_frag} ] ; then
                                if [ -z "${using}" ] ; then
-                                       andusing=" using \"${target_var_file}\""
+                                       andusing=" using \"${target_makefile_frag}\""
                                else
-                                       andusing="${using} and \"${target_var_file}\""
+                                       andusing="${using} and \"${target_makefile_frag}\""
                                fi
                        else
                                andusing=${using}
@@ -530,9 +538,13 @@ for configdir in ${configdirs} ; do
                done # for each host
 
                if [ -n "${commons}" ] ; then
-                       (cd ${configdir} ;
-                               ./configure ${commons} ${verbose} ${forcesubdirs} ${removing}) \
-                               | sed 's/^/     /'
+                       if [ -d ${configdir} ] ; then
+                               (cd ${configdir} ;
+                                       ./configure ${commons} ${verbose} ${forcesubdirs} ${removing}) \
+                                       | sed 's/^/     /'
+                       else
+                               echo Warning: directory \"${configdir}\" is missing.
+                       fi
                fi # if any common hosts
 
                if [ -n "${specifics}" ] ; then
@@ -562,9 +574,13 @@ for configdir in ${configdirs} ; do
                fi # if verbose
 
                if [ -n "${commons}" ] ; then
-                       (cd ${configdir} ;
-                               ./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} ${commons}) \
-                               | sed 's/^/     /'
+                       if [ -d ${configdir} ] ; then
+                               (cd ${configdir} ;
+                                       ./configure ${hosts} ${verbose} ${forcesubdirs} ${removing} ${commons}) \
+                                       | sed 's/^/     /'
+                       else
+                               echo Warning: directory \"${configdir}\" is missing.
+                       fi
                fi # if any commons
 
                if [ -n "${specifics}" ] ; then
@@ -582,12 +598,21 @@ exit 0
 
 #
 # $Log$
-# Revision 1.10  1991/05/14 18:53:32  steve
-# Added make dep
-# Made filenames suitable for PCs
+# Revision 1.12  1991/05/27 20:54:42  rich
+# fixed a bug in multiple targets
+#
+# Revision 1.14  1991/05/22  01:44:04  rich
+# remove gdb until config issues resolve.
+#
+# Revision 1.13  1991/05/19  08:00:09  rich
+# Added gdb.
+#
+# Revision 1.12  1991/05/19  00:32:13  rich
+# Changes to deal with missing subdirs gracefully, and changes dictated
+# from dropping configure over gdb.
 #
-# Revision 1.9  1991/05/14  14:14:30  rich
-# see devo/configure 1.11
+# Revision 1.4  1991/05/19  00:16:45  rich
+# Configure for gdb.
 #
 # Revision 1.10  1991/05/04  00:58:38  rich
 # Fix program name bug.
This page took 0.029696 seconds and 4 git commands to generate.