In configure{.in} {host|target}_makefile_frag should name a file
authorK. Richard Pixley <rich@cygnus>
Sat, 8 Feb 1992 08:57:08 +0000 (08:57 +0000)
committerK. Richard Pixley <rich@cygnus>
Sat, 8 Feb 1992 08:57:08 +0000 (08:57 +0000)
relative to srcdir.  I think it now does.  configure has been
corrected.  configure.texi has been clarified.

Makefile.in
configure
configure.in
configure.texi
gdb/configure.in

index 318f8d9..5472d9c 100644 (file)
@@ -91,6 +91,7 @@ configure.info: configure.texi
 install-info: install-info-dirs force
        $(MAKE) subdir_do DO=install-info "DODIRS=$(SUBDIRS)"
        $(INSTALL_DATA) cfg-paper.info $(infodir)/cfg-paper.info
+       $(INSTALL_DATA) configure.info $(infodir)/configure.info
        $(MAKE) dir.info install-dir.info
 
 install-dir.info:
@@ -1548,6 +1549,7 @@ install-fileutils: force
 .PHONY: all-libg++ just-libg++
 all-libg++: just-gcc just-libg++
 # NOTE!  We have added GXX= and XTRAFLAGS to the $(MAKE) line!!!
+# and CC == GXX
 # Do not clone this one.
 just-libg++: force
        if [ -d $(unsubdir)/libg++ ] ; then \
@@ -1561,7 +1563,7 @@ just-libg++: force
                        "against=$(against)" \
                        "AR=$(AR)" \
                        "AR_FLAGS=$(AR_FLAGS)" \
-                       "CC=$(CC)" \
+                       CC=`cd $(unsubdir)/..$(subdir); pwd`"/gcc/gcc -B"`cd $(unsubdir)/..$(subdir);pwd`"/gcc/" \
                        "RANLIB=$(RANLIB)" \
                        "LOADLIBES=$(LOADLIBES)" \
                        "LDFLAGS=$(LDFLAGS)" \
index f9a3989..6db69d3 100755 (executable)
--- a/configure
+++ b/configure
@@ -535,8 +535,9 @@ EOF
                        case "${host_makefile_frag}" in
                        "") mv Makefile.tem ${Makefile} ;;
                        *)
+                               host_makefile_frag=${srcdir}/${host_makefile_frag}
                                if [ -f ${host_makefile_frag} ] ; then
-                                       sed -e "/^####/  r ${host_makefile_frag}" Makefile.tem >> ${Makefile}
+                                       sed -e "/^####/  r ${host_makefile_frag}" Makefile.tem > ${Makefile}
                                else
                                        echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
                                        echo '***' is missing in ${PWD}. 1>&2
@@ -546,13 +547,18 @@ EOF
                        # working copy now in ${Makefile}
 
                        # Conditionalize the makefile for this target.
-                       target_makefile_frag=${srcdir}/${target_makefile_frag}
-                       if [ -f ${target_makefile_frag} ] ; then
-                               sed -e "/^####/  r ${target_makefile_frag}" ${Makefile} >> Makefile.tem
-                       else
-                               mv ${Makefile} Makefile.tem
-                               target_makefile_frag=
-                       fi
+                       case "${target_makefile_frag}" in
+                       "") mv ${Makefile} Makefile.tem ;;
+                       *)
+                               target_makefile_frag=${srcdir}/${target_makefile_frag}
+                               if [ -f ${target_makefile_frag} ] ; then
+                                       sed -e "/^####/  r ${target_makefile_frag}" ${Makefile} >> Makefile.tem
+                               else
+                                       mv ${Makefile} Makefile.tem
+                                       target_makefile_frag=
+                               fi
+                               ;;
+                       esac
                        # real copy now in Makefile.tem
 
                        # prepend warning about editting, and a bunch of variables.
index fa0e3b6..cacfd02 100644 (file)
@@ -25,11 +25,8 @@ case "${host_vendor}" in
 sco*)          host_makefile_frag=config/mh-sco ;;
 esac
 
-host_makefile_frag=${srcdir}/${host_makefile_frag}
-
 # per-target:
 
-
 bfd_target=
 
 case "${target_vendor}" in
@@ -50,9 +47,7 @@ case "${target_cpu}" in
        ;;
 esac
 
-
-target_makefile_frag=${srcdir}/config/mt-${bfd_target}
-
+target_makefile_frag=config/mt-${bfd_target}
 
 #
 # Local Variables:
index 25aad8b..2b524fa 100644 (file)
@@ -791,9 +791,9 @@ configuration files.  If not, add it.  Also see @ref{configure.in}.
 Look in @file{configure.in} for the variables @samp{files},
 @samp{links}, @samp{host_makefile_frag}, and
 @samp{target_makefile_frag}.  The values assigned to these variables are
-the names of the configuration files that the program uses.  Make sure
-that copies of the files exist for your host.  If not, create them.  See
-also @ref{Configure Variables}.
+the names of the configuration files, relative to @code{srcdir} that the
+program uses.  Make sure that copies of the files exist for your host.
+If not, create them.  See also @ref{Configure Variables}.
 @end itemize
 
 This should be enough to configure for a new host or target
@@ -1207,17 +1207,17 @@ either the @code{-srcdir=} or the @code{-subdirs} options.  Note that
 @end defvar
 
 @defvar{host_makefile_frag}
-If set by @file{configure.in}, this variable should name a file to be
-included in the resulting Makefile.  If the named file does not exist,
-@code{configure} will print a warning message.  This variable is not set
-by @code{configure}.
+If set by @file{configure.in}, this variable should be the name a file,
+relative to @code{srcdir} to be included in the resulting Makefile.  If
+the named file does not exist, @code{configure} will print a warning
+message.  This variable is not set by @code{configure}.
 @end defvar
 
 @defvar{target_makefile_frag}
-If set by @file{configure.in}, this variable should name a file to be
-included in the resulting Makefile.  If the named file does not exist,
-@code{configure} will print a warning message.  This variable is not set
-by @code{configure}.
+If set by @file{configure.in}, this variable should be the name of a
+file, relative to @code{srcdir}, to be included in the resulting
+Makefile.  If the named file does not exist, @code{configure} will print
+a warning message.  This variable is not set by @code{configure}.
 @end defvar
 
 @defvar{site_makefile_frag} 
index 4128c07..e906434 100644 (file)
@@ -311,8 +311,8 @@ fi
 #  We really shouldn't depend on there being a space after TM_FILE= ...
 targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/config/mt-${gdb_target}`
 
-host_makefile_frag=${srcdir}/config/mh-${gdb_host}
-target_makefile_frag=${srcdir}/config/mt-${gdb_target}
+host_makefile_frag=config/mh-${gdb_host}
+target_makefile_frag=config/mt-${gdb_target}
 
 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) is not set in the
 # ?config/* file, we don't make the corresponding links.  But we have