From: K. Richard Pixley Date: Sat, 8 Feb 1992 08:57:08 +0000 (+0000) Subject: In configure{.in} {host|target}_makefile_frag should name a file X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bcdbe02f820a40a3f01374cfdf7d18c0d7183117;p=binutils-gdb.git 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. --- diff --git a/Makefile.in b/Makefile.in index 318f8d99f5b..5472d9ce0f7 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 f9a3989dd35..6db69d31ffc 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 fa0e3b6aebf..cacfd0265cb 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 25aad8b1a35..2b524fa8d38 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 4128c0724b6..e906434e347 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