* configure: If CC and CXX are not set in the environment, set
them, based on either an existing Makefile or on searching for gcc in PATH. Substitute for CC and CXX in Makefile. * configure.in: Remove libm from target_libs. Separate target_configdirs from configdirs. If CC is not set in environment, try to get it from a host Makefile fragment. Rewrite changes of configdirs to use skipdirs instead. A few minor tweaks. Take directories out of target_configdirs as they are taken out of configdirs. Remove existing Makefile files from subdirectories. Substitute for TARGET_CONFIGDIRS and CONFIG_ARGUMENTS in Makefile. * Makefile.in (TARGET_CONFIGDIRS): New variable, automatically set by configure.in. (CONFIG_ARGUMENTS): Likewise. (CONFIGURE_TARGET_MODULES): New variable. ($(DO_X)): Loop over TARGET_CONFIGDIRS as well as SUBDIRS. ($(CONFIGURE_TARGET_MODULES)): New target. (configure-libg++, configure-libio): New targets. (all-libg++): Depend upon configure-libg++. (all-libio): Depend upon configure-libio. (configure-libgloss, all-libgloss): New targets. (configure-libstdc++): New target. (all-libstdc++): Depend upon configure-libstdc++. (configure-librx, all-librx): New targets. (configure-newlib): New target. (all-newlib): Depend upon configure-newlib (configure-xiberty): New target. (all-xiberty): Depend upon configure-xiberty.
This commit is contained in:
parent
243b35d7a1
commit
ca2ce3b317
4 changed files with 245 additions and 58 deletions
36
ChangeLog
36
ChangeLog
|
@ -1,3 +1,39 @@
|
|||
Wed Oct 4 11:52:31 1995 Ian Lance Taylor <ian@cygnus.com>
|
||||
|
||||
* configure: If CC and CXX are not set in the environment, set
|
||||
them, based on either an existing Makefile or on searching for gcc
|
||||
in PATH. Substitute for CC and CXX in Makefile.
|
||||
* configure.in: Remove libm from target_libs. Separate
|
||||
target_configdirs from configdirs. If CC is not set in
|
||||
environment, try to get it from a host Makefile fragment. Rewrite
|
||||
changes of configdirs to use skipdirs instead. A few minor
|
||||
tweaks. Take directories out of target_configdirs as they are
|
||||
taken out of configdirs. Remove existing Makefile files from
|
||||
subdirectories. Substitute for TARGET_CONFIGDIRS and
|
||||
CONFIG_ARGUMENTS in Makefile.
|
||||
* Makefile.in (TARGET_CONFIGDIRS): New variable, automatically set
|
||||
by configure.in.
|
||||
(CONFIG_ARGUMENTS): Likewise.
|
||||
(CONFIGURE_TARGET_MODULES): New variable.
|
||||
($(DO_X)): Loop over TARGET_CONFIGDIRS as well as SUBDIRS.
|
||||
($(CONFIGURE_TARGET_MODULES)): New target.
|
||||
(configure-libg++, configure-libio): New targets.
|
||||
(all-libg++): Depend upon configure-libg++.
|
||||
(all-libio): Depend upon configure-libio.
|
||||
(configure-libgloss, all-libgloss): New targets.
|
||||
(configure-libstdc++): New target.
|
||||
(all-libstdc++): Depend upon configure-libstdc++.
|
||||
(configure-librx, all-librx): New targets.
|
||||
(configure-newlib): New target.
|
||||
(all-newlib): Depend upon configure-newlib
|
||||
(configure-xiberty): New target.
|
||||
(all-xiberty): Depend upon configure-xiberty.
|
||||
|
||||
Sat Sep 30 04:32:59 1995 Jason Molenda (crash@phydeaux.cygnus.com)
|
||||
|
||||
* configure.in (host i[345]86-*-win32): Expand the
|
||||
noconfigdirs again.
|
||||
|
||||
Thu Sep 28 21:18:49 1995 Stan Shebs <shebs@andros.cygnus.com>
|
||||
|
||||
* mpw-configure: Fix sed command file name.
|
||||
|
|
95
Makefile.in
95
Makefile.in
|
@ -133,6 +133,13 @@ CXX_FOR_BUILD = $(CXX)
|
|||
SUBDIRS = "this is set via configure, don't edit this"
|
||||
OTHERS =
|
||||
|
||||
# This is set by the configure script to the list of directories which
|
||||
# should be built using the target tools.
|
||||
TARGET_CONFIGDIRS = xiberty libgloss newlib libio librx libstdc++ libg++
|
||||
|
||||
# This is set by the configure script to the arguments passed to configure.
|
||||
CONFIG_ARGUMENTS =
|
||||
|
||||
ALL = all.normal
|
||||
INSTALL_TARGET = install-dirs \
|
||||
$(INSTALL_MODULES) \
|
||||
|
@ -536,9 +543,6 @@ INSTALL_X11_MODULES = \
|
|||
# This is a list of the targets for all of the modules which are compiled
|
||||
# using $(TARGET_FLAGS_TO_PASS).
|
||||
ALL_TARGET_MODULES = \
|
||||
$(start-sanitize-chill) \
|
||||
all-chillrt \
|
||||
$(end-sanitize-chill) \
|
||||
all-libio \
|
||||
all-libstdc++ \
|
||||
all-librx \
|
||||
|
@ -547,12 +551,20 @@ ALL_TARGET_MODULES = \
|
|||
all-libgloss \
|
||||
all-xiberty
|
||||
|
||||
# This is a list of the configure targets for all of the modules which
|
||||
# are compiled using the target tools.
|
||||
CONFIGURE_TARGET_MODULES = \
|
||||
configure-libio \
|
||||
configure-libstdc++ \
|
||||
configure-librx \
|
||||
configure-libg++ \
|
||||
configure-newlib \
|
||||
configure-libgloss \
|
||||
configure-xiberty
|
||||
|
||||
# This is a list of the check targets for all of the modules which are
|
||||
# compiled using $(TARGET_FLAGS_TO_PASS).
|
||||
CHECK_TARGET_MODULES = \
|
||||
$(start-sanitize-chill) \
|
||||
check-chillrt \
|
||||
$(end-sanitize-chill) \
|
||||
check-libio \
|
||||
check-libstdc++ \
|
||||
check-libg++ \
|
||||
|
@ -562,9 +574,6 @@ CHECK_TARGET_MODULES = \
|
|||
# This is a list of the install targets for all of the modules which are
|
||||
# compiled using $(TARGET_FLAGS_TO_PASS).
|
||||
INSTALL_TARGET_MODULES = \
|
||||
$(start-sanitize-chill) \
|
||||
install-chillrt \
|
||||
$(end-sanitize-chill) \
|
||||
install-libio \
|
||||
install-libstdc++ \
|
||||
install-libg++ \
|
||||
|
@ -575,9 +584,6 @@ INSTALL_TARGET_MODULES = \
|
|||
# This is a shell case of all modules which are compiled using
|
||||
# $(TARGET_FLAGS_TO_PASS), used in the do-X rule.
|
||||
TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty
|
||||
# start-sanitize-chill
|
||||
TARGET_LIBS = chillrt | libio | libstdc++ | librx | libg++ | newlib | xiberty
|
||||
# end-sanitize-chill
|
||||
|
||||
# The first rule in the file had better be this one. Don't put any above it.
|
||||
all: all.normal
|
||||
|
@ -606,14 +612,14 @@ DO_X = \
|
|||
do-install-info \
|
||||
do-installcheck \
|
||||
do-mostlyclean \
|
||||
do-realclean \
|
||||
do-maintainer-clean \
|
||||
do-TAGS
|
||||
.PHONY: $(DO_X)
|
||||
$(DO_X):
|
||||
@target=`echo $@ | sed -e 's/^do-//'`; \
|
||||
r=`pwd`; export r; \
|
||||
srcroot=`cd $(srcdir); pwd`; export srcroot; \
|
||||
for i in $(SUBDIRS); do \
|
||||
for i in $(SUBDIRS) $(TARGET_CONFIGDIRS); do \
|
||||
if [ -f ./$$i/Makefile ]; then \
|
||||
case $$i in \
|
||||
$(TARGET_LIBS) ) \
|
||||
|
@ -645,7 +651,8 @@ $(DO_X):
|
|||
# Here are the targets which correspond to the do-X targets.
|
||||
|
||||
.PHONY: info installcheck dvi install-info
|
||||
.PHONY: clean distclean mostlyclean realclean local-clean local-distclean
|
||||
.PHONY: clean distclean mostlyclean maintainer-clean realclean
|
||||
.PHONY: local-clean local-distclean local-maintainer-clean
|
||||
info: do-info
|
||||
installcheck: do-installcheck
|
||||
dvi: do-dvi
|
||||
|
@ -662,10 +669,16 @@ local-clean:
|
|||
local-distclean:
|
||||
-rm -f Makefile config.status
|
||||
|
||||
local-maintainer-clean:
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
clean: do-clean local-clean
|
||||
mostlyclean: do-mostlyclean local-clean
|
||||
distclean: do-distclean local-clean local-distclean
|
||||
realclean: do-realclean local-clean local-distclean
|
||||
maintainer-clean: local-maintainer-clean do-maintainer-clean local-clean
|
||||
maintainer-clean: local-distclean
|
||||
realclean: maintainer-clean
|
||||
|
||||
# Check target.
|
||||
|
||||
|
@ -795,6 +808,31 @@ $(INSTALL_MODULES): install-dirs
|
|||
true; \
|
||||
fi
|
||||
|
||||
# This rule is used to configure the modules which are built with the
|
||||
# target tools.
|
||||
.PHONY: $(CONFIGURE_TARGET_MODULES)
|
||||
$(CONFIGURE_TARGET_MODULES):
|
||||
@dir=`echo $@ | sed -e 's/configure-//'`; \
|
||||
if [ -f ./$${dir}/Makefile ] ; then \
|
||||
true; \
|
||||
elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
|
||||
if [ -d ./$${dir} ]; then true; else mkdir $${dir}; fi; \
|
||||
r=`pwd`; export r; \
|
||||
srcroot=`cd $(srcdir); pwd`; export srcroot; \
|
||||
AR="$(AR_FOR_TARGET)"; export AR; \
|
||||
AS="$(AS_FOR_TARGET)"; export AS; \
|
||||
CC="$(CC_FOR_TARGET)"; export CC; \
|
||||
CFLAGS="$(CFLAGS_FOR_TARGET)"; export CFLAGS; \
|
||||
CXX="$(CXX_FOR_TARGET)"; export CXX; \
|
||||
CXXFLAGS="$(CXXFLAGS_FOR_TARGET)"; export CXXFLAGS; \
|
||||
NM="$(NM_FOR_TARGET)"; export NM; \
|
||||
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
|
||||
cd $${dir}; \
|
||||
$${srcroot}/configure $(CONFIG_ARGUMENTS) --srcdir=$${srcroot}/$${dir}; \
|
||||
else \
|
||||
true; \
|
||||
fi
|
||||
|
||||
# This rule is used to build the modules which use TARGET_FLAGS_TO_PASS.
|
||||
# To build a target all-X means to cd to X and make all.
|
||||
.PHONY: $(ALL_TARGET_MODULES)
|
||||
|
@ -931,9 +969,6 @@ all-autoconf: all-m4
|
|||
all-bfd:
|
||||
all-binutils: all-libiberty all-opcodes all-bfd all-flex all-byacc
|
||||
all-byacc:
|
||||
# start-sanitize-chill
|
||||
all-chillrt: all-binutils all-gas all-gcc all-newlib
|
||||
# end-sanitize-chill
|
||||
all-cvs:
|
||||
all-dejagnu: all-tcl all-expect all-tk
|
||||
all-diff: all-libiberty
|
||||
|
@ -957,14 +992,22 @@ all-hello: all-libiberty
|
|||
all-indent:
|
||||
all-ispell: all-emacs19
|
||||
all-ld: all-libiberty all-bfd all-byacc all-flex
|
||||
all-libg++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++
|
||||
all-libio: all-gas all-ld all-gcc all-xiberty all-newlib
|
||||
configure-libg++: all-gcc
|
||||
all-libg++: configure-libg++ all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++
|
||||
configure-libgloss: all-gcc
|
||||
all-libgloss: configure-libgloss
|
||||
configure-libio: all-gcc
|
||||
all-libio: configure-libio all-gas all-ld all-gcc all-xiberty all-newlib
|
||||
all-libiberty:
|
||||
all-libstdc++: all-gas all-ld all-gcc all-xiberty all-newlib all-libio
|
||||
configure-librx: all-gcc all-newlib
|
||||
all-librx: configure-librx
|
||||
configure-libstdc++: all-gcc
|
||||
all-libstdc++: configure-libstdc++ all-gas all-ld all-gcc all-xiberty all-newlib all-libio
|
||||
all-m4: all-libiberty
|
||||
all-make: all-libiberty
|
||||
all-mmalloc:
|
||||
all-newlib: all-binutils all-gas all-gcc
|
||||
configure-newlib: all-gcc
|
||||
all-newlib: configure-newlib all-binutils all-gas all-gcc
|
||||
all-opcodes: all-bfd
|
||||
all-patch:
|
||||
all-prms: all-libiberty
|
||||
|
@ -985,7 +1028,8 @@ all-tgas: all-libiberty all-bfd
|
|||
all-time:
|
||||
all-wdiff:
|
||||
all-uudecode: all-libiberty
|
||||
all-xiberty: all-gcc all-ld all-newlib
|
||||
configure-xiberty: all-gcc
|
||||
all-xiberty: configure-xiberty all-gcc all-ld all-newlib
|
||||
|
||||
### other supporting targets
|
||||
|
||||
|
@ -1178,9 +1222,10 @@ gnats.tar.gz: $(DIST_SUPPORT) $(GNATS_SUPPORT_DIRS) gnats
|
|||
|
||||
.PHONY: gdb.tar.gz
|
||||
GDB_SUPPORT_DIRS= bfd include libiberty mmalloc opcodes readline sim utils
|
||||
GDBTK_SUPPORT_DIRS= `if [ -d tcl -a -d tk ] ; then echo tcl tk ; fi`
|
||||
gdb.tar.gz: $(DIST_SUPPORT) $(GDB_SUPPORT_DIRS) gdb
|
||||
$(MAKE) -f Makefile.in taz TOOL=gdb \
|
||||
SUPPORT_FILES="$(GDB_SUPPORT_DIRS)"
|
||||
SUPPORT_FILES="$(GDB_SUPPORT_DIRS) $(GDBTK_SUPPORT_DIRS)"
|
||||
|
||||
.PHONY: newlib.tar.gz
|
||||
NEWLIB_SUPPORT_DIRS=libgloss
|
||||
|
|
76
configure
vendored
76
configure
vendored
|
@ -17,7 +17,7 @@
|
|||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
# Please report any problems running this configure script to
|
||||
# configure@cygnus.com
|
||||
|
@ -523,7 +523,7 @@ tmpfile=${TMPDIR}/cONf$$
|
|||
# is at the end of the script; these actions are duplicated there, minus
|
||||
# the "exit 1". Don't use "exit 0" anywhere after this without resetting the
|
||||
# trap handler, or you'll lose.
|
||||
trap "rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15
|
||||
trap "rm -f Makefile.tem ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15
|
||||
|
||||
# split ${srcdir}/configure.in into common, per-host, per-target,
|
||||
# and post-target parts. Post-target is optional.
|
||||
|
@ -551,7 +551,15 @@ case "${srctrigger}" in
|
|||
esac
|
||||
|
||||
case "${build_alias}" in
|
||||
"") ;;
|
||||
"")
|
||||
if result=`${config_shell} ${configsub} ${host_alias}` ; then
|
||||
build_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
||||
build_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
||||
build_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
|
||||
build=${host_cpu}-${host_vendor}-${host_os}
|
||||
build_alias=${host_alias}
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
if result=`${config_shell} ${configsub} ${build_alias}` ; then
|
||||
buildopt="--build=${build_alias}"
|
||||
|
@ -639,6 +647,45 @@ if [ "${program_prefix}" != "" ] ; then
|
|||
program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
|
||||
fi
|
||||
|
||||
# If CC and CXX are not set in the environment, and the Makefile
|
||||
# exists, try to extract them from it. This is to handle running
|
||||
# ./config.status by hand.
|
||||
if [ -z "${CC}" -a -r Makefile ]; then
|
||||
sed -n -e ':loop
|
||||
/\\$/ N
|
||||
/\\$/ b loop
|
||||
s/\\\n//g
|
||||
/^CC[ ]*=/ s/CC[ ]*=\(.*\)/\1/p' < Makefile > Makefile.cc
|
||||
CC=`tail -1 Makefile.cc`
|
||||
rm -f Makefile.cc
|
||||
fi
|
||||
|
||||
if [ -z "${CXX}" -a -r Makefile ]; then
|
||||
sed -n -e ':loop
|
||||
/\\$/ N
|
||||
/\\$/ b loop
|
||||
s/\\\n//g
|
||||
/^CXX[ ]*=/ s/CXX[ ]*=\(.*\)/\1/p' < Makefile > Makefile.cc
|
||||
CXX=`tail -1 Makefile.cc`
|
||||
rm -f Makefile.cc
|
||||
fi
|
||||
|
||||
# If CC is still not set, try to get gcc.
|
||||
if [ -z "${CC}" ]; then
|
||||
IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for dir in $PATH; do
|
||||
test -z "$dir" && dir=.
|
||||
if test -f $dir/gcc; then
|
||||
CC="gcc"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
CC=${CC-cc}
|
||||
fi
|
||||
|
||||
CXX=${CXX-"g++ -O"}
|
||||
|
||||
for subdir in . ${subdirs} ; do
|
||||
|
||||
# ${subdir} is relative path from . to the directory we're currently
|
||||
|
@ -876,11 +923,6 @@ EOF
|
|||
echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
|
||||
fi
|
||||
|
||||
# make sure that some sort of reasonable default exists for these
|
||||
# two variables
|
||||
CXX=${CXX-"g++ -O"}
|
||||
CC=${CC-cc}
|
||||
|
||||
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
|
||||
# remove any form feeds.
|
||||
if [ -z "${subdirs}" ]; then
|
||||
|
@ -893,6 +935,24 @@ EOF
|
|||
fi
|
||||
sed -e "s:^prefix[ ]*=.*$:prefix = ${prefix}:" \
|
||||
-e "s:^exec_prefix[ ]*=.*$:exec_prefix = ${exec_prefix}:" \
|
||||
-e "/^CC[ ]*=/{
|
||||
b chkcc
|
||||
:contcc
|
||||
N
|
||||
:chkcc
|
||||
s/\\\\$//
|
||||
t contcc
|
||||
s%^CC[ ]*=.*$%CC = ${CC}%
|
||||
}" \
|
||||
-e "/^CXX[ ]*=/{
|
||||
b chkcxx
|
||||
:contcxx
|
||||
N
|
||||
:chkcxx
|
||||
s/\\\\$//
|
||||
t contcxx
|
||||
s%^CXX[ ]*=.*$%CXX = ${CXX}%
|
||||
}" \
|
||||
-e "s:^SHELL[ ]*=.*$:SHELL = ${config_shell}:" \
|
||||
-e "s:^srcdir[ ]*=.*$:srcdir = ${makesrcdir}:" \
|
||||
-e "s///" \
|
||||
|
|
96
configure.in
96
configure.in
|
@ -42,7 +42,7 @@ host_tools="texinfo byacc flex bison binutils ld gas gcc gdb make patch
|
|||
# these libraries are built for the target environment, and are built after
|
||||
# the host libraries and the host tools (which may be a cross compiler)
|
||||
#
|
||||
target_libs="libm xiberty libgloss newlib libio librx libstdc++ libg++"
|
||||
target_libs="xiberty libgloss newlib libio librx libstdc++ libg++"
|
||||
|
||||
|
||||
# these tools are built using the target libs, and are intended to run only
|
||||
|
@ -75,8 +75,11 @@ cross_only="xiberty libgloss newlib"
|
|||
## All tools belong in one of the four categories, and are assigned above
|
||||
## We assign ${configdirs} this way to remove all embedded newlines. This
|
||||
## is important because configure will choke if they ever get through.
|
||||
## ${configdirs} is directories we build using the host tools.
|
||||
## ${target_configdirs} is directories we build using the target tools.
|
||||
#
|
||||
configdirs=`echo ${host_libs} ${host_tools} ${target_libs} ${target_tools}`
|
||||
configdirs=`echo ${host_libs} ${host_tools}`
|
||||
target_configdirs=`echo ${target_libs} ${target_tools}`
|
||||
|
||||
################################################################################
|
||||
|
||||
|
@ -128,6 +131,13 @@ case "${host}" in
|
|||
esac
|
||||
fi
|
||||
|
||||
# See if we can extract a definition of CC from the fragment.
|
||||
if [ -z "${CC}" ]; then
|
||||
if [ -n "${host_makefile_frag}" -a -f ${host_makefile_frag} ]; then
|
||||
CC=`sed -n -e 's/CC[ ]*=[ ]*\(.*\)$/\1/p' < ${host_makefile_frag}`
|
||||
fi
|
||||
fi
|
||||
|
||||
# The Solaris /usr/ucb/cc compiler does not appear to work.
|
||||
case "${host}" in
|
||||
sparc-sun-solaris2*)
|
||||
|
@ -191,6 +201,7 @@ case "${target}" in
|
|||
powerpc-*-netware*) target_makefile_frag=config/mt-netware ;;
|
||||
esac
|
||||
|
||||
skipdirs=
|
||||
gasdir=gas
|
||||
use_gnu_ld=
|
||||
use_gnu_as=
|
||||
|
@ -202,7 +213,7 @@ case ${with_x} in
|
|||
yes | "") # the default value for this tree is that X11 is available
|
||||
;;
|
||||
no)
|
||||
configdirs=`echo " ${configdirs} " | sed -e 's/ tk / /;/ gash / /'`
|
||||
skipdirs="${skipdirs} tk gash"
|
||||
;;
|
||||
*)
|
||||
echo "*** bad value \"${with_x}\" for -with-x flag; ignored" 1>&2
|
||||
|
@ -219,16 +230,12 @@ is_cross_compiler=
|
|||
if [ x"${host}" = x"${target}" ] ; then
|
||||
# when doing a native toolchain, don't build the targets
|
||||
# that are in the 'cross only' list
|
||||
for i in ${cross_only} ; do
|
||||
configdirs=`echo " ${configdirs} " | sed -e "s/ $i / /"`
|
||||
done
|
||||
skipdirs="${skipdirs} ${cross_only}"
|
||||
is_cross_compiler=no
|
||||
else
|
||||
# similarly, don't build the targets in the 'native only'
|
||||
# list when building a cross compiler
|
||||
for i in ${native_only} ; do
|
||||
configdirs=`echo " ${configdirs} " | sed -e "s/ $i / /"`
|
||||
done
|
||||
skipdirs="${skipdirs} ${native_only}"
|
||||
is_cross_compiler=yes
|
||||
fi
|
||||
|
||||
|
@ -276,10 +283,9 @@ fi
|
|||
|
||||
# Recognize --with-newlib/--without-newlib.
|
||||
if [ x${with_newlib} = xno ]; then
|
||||
configdirs=`echo " ${configdirs} " | sed -e 's/ newlib / /'`
|
||||
skipdirs="${skipdirs} newlib"
|
||||
elif [ x${with_newlib} = xyes ]; then
|
||||
configdirs=`echo " ${configdirs} " | sed -e 's/ newlib / /'`
|
||||
configdirs="${configdirs} newlib"
|
||||
skipdirs=`echo " ${skipdirs} " | sed -e 's/ newlib / /'`
|
||||
fi
|
||||
|
||||
# Handle ${copy_dirs}
|
||||
|
@ -386,9 +392,7 @@ case "${target}" in
|
|||
noconfigdirs="$noconfigdirs ld shellutils"
|
||||
;;
|
||||
i[345]86-*-go32)
|
||||
# add the go32 support tools to the list
|
||||
# but don't build gdb
|
||||
configdirs=`echo go32 ${configdirs}`
|
||||
noconfigdirs="$noconfigdirs gdb libg++ libstdc++ libio librx"
|
||||
;;
|
||||
|
||||
|
@ -396,7 +400,7 @@ case "${target}" in
|
|||
# Can't build gdb for win32 target
|
||||
noconfigdirs="$noconfigdirs gdb tk"
|
||||
# but put newlib back
|
||||
configdirs="$configdirs newlib"
|
||||
skipdirs=`echo " ${skipdirs} " | sed -e 's/ newlib / /'`
|
||||
;;
|
||||
i[345]86-*-pe)
|
||||
noconfigdirs="$noconfigdirs libg++ libstdc++ libio librx"
|
||||
|
@ -459,14 +463,13 @@ case "${target}" in
|
|||
noconfigdirs="$noconfigdirs gprof"
|
||||
;;
|
||||
romp-*-*)
|
||||
noconfigdirs="bfd binutils ld gas opcodes"
|
||||
noconfigdirs="$noconfigdirs bfd binutils ld gas opcodes"
|
||||
;;
|
||||
sh-*-*)
|
||||
case "${host}" in
|
||||
i[345]86-*-vsta) ;; # don't add gprof back in
|
||||
*) configdirs=`echo gprof ${configdirs}` ;;
|
||||
i[345]86-*-go32) ;; # don't add gprof back in
|
||||
*) configdirs=`echo gprof ${configdirs}` ;;
|
||||
*) skipdirs=`echo " ${skipdirs} " | sed -e 's/ gprof / /'` ;;
|
||||
esac
|
||||
;;
|
||||
sparc-*-sunos4*)
|
||||
|
@ -491,18 +494,42 @@ case "${target}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
# Remove the entries in $noconfigdirs from $configdirs. If we have the
|
||||
# source for them, add them to $notsupp.
|
||||
# Remove the entries in $skipdirs and $noconfigdirs from $configdirs and
|
||||
# $target_configdirs.
|
||||
# If we have the source for $noconfigdirs entries, add them to $notsupp.
|
||||
notsupp=""
|
||||
for dir in . $noconfigdirs ; do
|
||||
for dir in . $skipdirs $noconfigdirs ; do
|
||||
if [ $dir != . ] && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||
configdirs=`echo " ${configdirs} " | sed -e "s/ ${dir} / /"`
|
||||
if [ -r $srcdir/$dir/configure ] || [ -r $srcdir/$dir/configure.in ]; then
|
||||
notsupp="$notsupp $dir"
|
||||
if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||
true
|
||||
else
|
||||
notsupp="$notsupp $dir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ $dir != . ] && echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||
target_configdirs=`echo " ${target_configdirs} " | sed -e "s/ ${dir} / /"`
|
||||
if [ -r $srcdir/$dir/configure ] || [ -r $srcdir/$dir/configure.in ]; then
|
||||
if echo " ${skipdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||
true
|
||||
else
|
||||
notsupp="$notsupp $dir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Deconfigure all subdirectories, in case we are changing the
|
||||
# configuration from one where a subdirectory is supported to one where it
|
||||
# is not.
|
||||
if [ -z "${norecursion}" ]; then
|
||||
for i in ${configdirs} ${target_configdirs}; do
|
||||
rm -f $i/Makefile
|
||||
done
|
||||
fi
|
||||
|
||||
# Produce a warning message for the subdirs we can't configure.
|
||||
# This isn't especially interesting in the Cygnus tree, but in the individual
|
||||
# FSF releases, it's important to let people know when their machine isn't
|
||||
|
@ -515,9 +542,15 @@ if [ -n "${notsupp}" ] && [ -z "${norecursion}" ]; then
|
|||
# pretend that all is well.)
|
||||
if [ -n "$appdirs" ]; then
|
||||
for dir in $appdirs ; do
|
||||
if [ -r $dir/Makefile.in ] && echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1 ; then
|
||||
appdirs=""
|
||||
break
|
||||
if [ -r $dir/Makefile.in ]; then
|
||||
if echo " ${configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||
appdirs=""
|
||||
break
|
||||
fi
|
||||
if echo " ${target_configdirs} " | grep " ${dir} " >/dev/null 2>&1; then
|
||||
appdirs=""
|
||||
break
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [ -n "$appdirs" ]; then
|
||||
|
@ -567,6 +600,19 @@ if [ x${enable_shared} = xyes ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# post-target:
|
||||
|
||||
# Record target_configdirs and the configure arguments in Makefile.
|
||||
targargs=`echo "${arguments}" | \
|
||||
sed -e 's/--*norecursion//' \
|
||||
-e 's/--*cache[a-z-]*=[^ ]*//' \
|
||||
-e 's/--*cache[a-z-]*[ ][ ]*[^ ]*//'`
|
||||
sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
|
||||
-e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \
|
||||
Makefile > Makefile.tem
|
||||
rm -f Makefile
|
||||
mv -f Makefile.tem Makefile
|
||||
|
||||
#
|
||||
# Local Variables:
|
||||
# fill-column: 131
|
||||
|
|
Loading…
Reference in a new issue