* Makefile.in (TARGET_TOOLPREFIX): No longer define.
(AR_FOR_TARGET, RANLIB_FOR_TARGET): Define to use versions in
the build tree if they exist.
(AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): Update
appropriately.
(objdir): Let configure substitute value.
(FLOAT_H): Let configure select a pre-built version from the
config subdir.
* build-make (INSTALL_TARGET, ALL): Disable, no longer needed.
* configure.in: Substitute for objdir.
* cp/Makefile.in (program_transform_name, objdir): Define.
From-SVN: r19828
Mon May 18 01:23:33 1998 Jeffrey A Law (law@cygnus.com)
+ * Makefile.in (TARGET_TOOLPREFIX): No longer define.
+ (AR_FOR_TARGET, RANLIB_FOR_TARGET): Define to use versions in
+ the build tree if they exist.
+ (AR, AR_FLAGS, OLDAR, OLDAR_FLAGS, RANLIB, RANLIB_TEST): Update
+ appropriately.
+ (objdir): Let configure substitute value.
+ (FLOAT_H): Let configure select a pre-built version from the
+ config subdir.
+ * build-make (INSTALL_TARGET, ALL): Disable, no longer needed.
+ * configure.in: Substitute for objdir.
+
* Makefile.in (build_canonical, host_canonical): Let configure
substitute values for these variables.
* configure.in: Substitute for build_canonical, host_canonical
# These are used because `configure' appends `cross-make'
# to the makefile when making a cross-compiler.
-TARGET_TOOLPREFIX = $(tooldir)/bin/
-AR_FOR_TARGET = $(TARGET_TOOLPREFIX)ar
+# Use the tools from the build tree, if they are available.
+
+# objdir is set by configure.
+objdir = @objdir@
+
+AR_FOR_TARGET = ` \
+ if [ -f $(objdir)/../binutils/ar ] ; then \
+ echo $(objdir)/../binutils/ar ; \
+ else \
+ if [ "$(host_canonical)" = "$(target)" ] ; then \
+ echo ar; \
+ else \
+ t='$(program_transform_name)'; echo ar | sed -e $$t ; \
+ fi; \
+ fi`
AR_FOR_TARGET_FLAGS = rc
-RANLIB_FOR_TARGET = $(TARGET_TOOLPREFIX)ranlib
-RANLIB_TEST_FOR_TARGET = [ -f $(TARGET_TOOLPREFIX)ranlib ]
-
+RANLIB_FOR_TARGET = ` \
+ if [ -f $(objdir)/../binutils/ranlib ] ; then \
+ echo $(objdir)/../binutils/ranlib ; \
+ else \
+ if [ "$(host_canonical)" = "$(target)" ] ; then \
+ echo ranlib; \
+ else \
+ t='$(program_transform_name)'; echo ranlib | sed -e $$t ; \
+ fi; \
+ fi`
+RANLIB_TEST_FOR_TARGET = \
+ [ -f $(RANLIB_FOR_TARGET) ] \
+ || ( [ "$(host_canonical)" = "$(target)" ] \
+ && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
+
+# We always act like a cross-compiler, even when we're
+# compiling native. This is because we want to use our own tools if
+# we can. We don't just set RANLIB to a complicated expression,
+# because the top level Makefile.in might override RANLIB_FOR_TARGET.
+# These are from the FSF file "cross-make".
+AR = $(AR_FOR_TARGET)
+AR_FLAGS = $(AR_FOR_TARGET_FLAGS)
+OLDAR = $(AR_FOR_TARGET)
+OLDAR_FLAGS = $(AR_FOR_TARGET_FLAGS)
+RANLIB = $(RANLIB_FOR_TARGET)
+RANLIB_TEST = $(RANLIB_TEST_FOR_TARGET)
+
# Dir to search for system headers. Overridden by cross-make.
SYSTEM_HEADER_DIR = /usr/include
# Source for float.h. Overridden by cross-make.
FLOAT_H=float.h-nat
+# We do not try to build float.h anymore. Let configure select the
+# appropriate pre-built float.h file for the target.
+FLOAT_H=$(srcdir)/config/float-@float_format@.h
# Setup the testing framework, if you have one
EXPECT = `if [ -f $${rootme}/../expect/expect ] ; then \
STMP_FIXPROTO =
# Cause installation using install-build. We do nothing here.
-INSTALL_TARGET = install-build
+#INSTALL_TARGET = install-build
# Don't try to compile the things we can't compile or we have made
# while making gcc with the cross-compiler.
-ALL = all.build
+#ALL = all.build
done
fi
+# Nothing to do for FLOAT_H, float_format already handled.
+objdir=`pwd`
+
+
# Process the language and host/target makefile fragments.
${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
s%@inhibit_libc@%$inhibit_libc%g
s%@sched_prefix@%$sched_prefix%g
s%@sched_cflags@%$sched_cflags%g
+s%@objdir@%$objdir%g
s%@subdirs@%$subdirs%g
s%@all_languages@%$all_languages%g
s%@all_boot_languages@%$all_boot_languages%g
done
fi
+# Nothing to do for FLOAT_H, float_format already handled.
+objdir=`pwd`
+AC_SUBST(objdir)
+
# Process the language and host/target makefile fragments.
${CONFIG_SHELL-/bin/sh} $srcdir/configure.frag $srcdir "$subdirs" "$dep_host_xmake_file" "$dep_tmake_file"
Mon May 18 01:24:08 1998 Jeffrey A Law (law@cygnus.com)
+ * Makefile.in (program_transform_name, objdir): Define.
+
* Makefile.in (BISON): Use bison from the build tree if it exists.
(FLEX): Similarly.
# These are used because `configure' appends `cross-make'
# to the makefile when making a cross-compiler.
+# We don't use cross-make. Instead we use the tools
+# from the build tree, if they are available.
+# program_transform_name and objdir are set by configure.in.
+program_transform_name =
+objdir = .
+
target=@target@
xmake_file=@dep_host_xmake_file@
tmake_file=@dep_tmake_file@