From bcdbe02f820a40a3f01374cfdf7d18c0d7183117 Mon Sep 17 00:00:00 2001 From: "K. Richard Pixley" Date: Sat, 8 Feb 1992 08:57:08 +0000 Subject: [PATCH] In configure{.in} {host|target}_makefile_frag should name a file relative to srcdir. I think it now does. configure has been corrected. configure.texi has been clarified. --- Makefile.in | 4 +++- configure | 22 ++++++++++++++-------- configure.in | 7 +------ configure.texi | 22 +++++++++++----------- gdb/configure.in | 4 ++-- 5 files changed, 31 insertions(+), 28 deletions(-) diff --git a/Makefile.in b/Makefile.in index 318f8d9..5472d9c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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)" \ diff --git a/configure b/configure index f9a3989..6db69d3 100755 --- 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. diff --git a/configure.in b/configure.in index fa0e3b6..cacfd02 100644 --- a/configure.in +++ b/configure.in @@ -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: diff --git a/configure.texi b/configure.texi index 25aad8b..2b524fa 100644 --- a/configure.texi +++ b/configure.texi @@ -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} diff --git a/gdb/configure.in b/gdb/configure.in index 4128c07..e906434 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -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 -- 2.7.4