* configure.in: Rename libFOO to target-libFOO, and xiberty

to target-xiberty, to provide more flexibility.
	(target_subdir):  Define.  Create if cross.
	Set TARGET_SUBDIR in Makefile to ${target_subdir}.
	* Makefile.in:  Rename all-libFOO -> all-target-libFOO, all-xiberty
	-> all-target-libiberty, configure-libFOO -> configure-target-libFOO,
	check-libFOO -> check-target-libFOO, etc.
	($(DO_X)):  Iterate over TARGET_CONFIGDIRS after SUBDIRS.
	($(CONFIGURE_TARGET_MODULES), $(CHECK_TARGET_MODULES),
	$(ALL_TARGET_MODULES), $(INSTALL_TARGET_MODULES)): Update accordingly.
	(configure-target-XXX):  Depend on $(ALL_GCC), not all-gcc, to
	allow ALL_GCC="" to only configure.
	(DEVO_SUPPORT):  Add cfg-ml-com.in and cfg-ml-pos.in.
	(ETC_SUPPORT, ETC_SUPPORT_PFX):  Merge;  update 'taz' accordingly.
	(LIBGXX_SUPPORT_DIRS):  Remove xiberty.
This commit is contained in:
Per Bothner
1995-10-28 06:28:42 +00:00
parent 3dbe0fa2a7
commit ab1cbc6742
3 changed files with 149 additions and 102 deletions

View File

@ -1,3 +1,21 @@
Fri Oct 27 23:14:12 1995 Per Bothner <bothner@kalessin.cygnus.com>
* configure.in: Rename libFOO to target-libFOO, and xiberty
to target-xiberty, to provide more flexibility.
(target_subdir): Define. Create if cross.
Set TARGET_SUBDIR in Makefile to ${target_subdir}.
* Makefile.in: Rename all-libFOO -> all-target-libFOO, all-xiberty
-> all-target-libiberty, configure-libFOO -> configure-target-libFOO,
check-libFOO -> check-target-libFOO, etc.
($(DO_X)): Iterate over TARGET_CONFIGDIRS after SUBDIRS.
($(CONFIGURE_TARGET_MODULES), $(CHECK_TARGET_MODULES),
$(ALL_TARGET_MODULES), $(INSTALL_TARGET_MODULES)): Update accordingly.
(configure-target-XXX): Depend on $(ALL_GCC), not all-gcc, to
allow ALL_GCC="" to only configure.
(DEVO_SUPPORT): Add cfg-ml-com.in and cfg-ml-pos.in.
(ETC_SUPPORT, ETC_SUPPORT_PFX): Merge; update 'taz' accordingly.
(LIBGXX_SUPPORT_DIRS): Remove xiberty.
Sat Oct 28 01:53:49 1995 Ken Raeburn <raeburn@cygnus.com> Sat Oct 28 01:53:49 1995 Ken Raeburn <raeburn@cygnus.com>
* Makefile.in (taz): Build "info" in etc explicitly. * Makefile.in (taz): Build "info" in etc explicitly.

View File

@ -132,7 +132,7 @@ OTHERS =
# This is set by the configure script to the list of directories which # This is set by the configure script to the list of directories which
# should be built using the target tools. # should be built using the target tools.
TARGET_CONFIGDIRS = xiberty libgloss newlib libio librx libstdc++ libg++ winsup TARGET_CONFIGDIRS = libiberty libgloss newlib libio librx libstdc++ libg++ winsup
# This is set by the configure script to the arguments passed to configure. # This is set by the configure script to the arguments passed to configure.
CONFIG_ARGUMENTS = CONFIG_ARGUMENTS =
@ -557,52 +557,53 @@ INSTALL_X11_MODULES = \
# This is a list of the targets for all of the modules which are compiled # This is a list of the targets for all of the modules which are compiled
# using $(TARGET_FLAGS_TO_PASS). # using $(TARGET_FLAGS_TO_PASS).
# RENAME these all-xinberty should be all-target-libiberty
ALL_TARGET_MODULES = \ ALL_TARGET_MODULES = \
all-libio \ all-target-libio \
all-libstdc++ \ all-target-libstdc++ \
all-librx \ all-target-librx \
all-libg++ \ all-target-libg++ \
all-newlib \ all-target-newlib \
all-winsup \ all-target-winsup \
all-libgloss \ all-target-libgloss \
all-xiberty all-target-libiberty
# This is a list of the configure targets for all of the modules which # This is a list of the configure targets for all of the modules which
# are compiled using the target tools. # are compiled using the target tools.
CONFIGURE_TARGET_MODULES = \ CONFIGURE_TARGET_MODULES = \
configure-libio \ configure-target-libio \
configure-libstdc++ \ configure-target-libstdc++ \
configure-librx \ configure-target-librx \
configure-libg++ \ configure-target-libg++ \
configure-newlib \ configure-target-newlib \
configure-winsup \ configure-target-winsup \
configure-libgloss \ configure-target-libgloss \
configure-xiberty configure-target-libiberty
# This is a list of the check targets for all of the modules which are # This is a list of the check targets for all of the modules which are
# compiled using $(TARGET_FLAGS_TO_PASS). # compiled using $(TARGET_FLAGS_TO_PASS).
CHECK_TARGET_MODULES = \ CHECK_TARGET_MODULES = \
check-libio \ check-target-libio \
check-libstdc++ \ check-target-libstdc++ \
check-libg++ \ check-target-libg++ \
check-newlib \ check-target-newlib \
check-winsup \ check-target-winsup \
check-xiberty check-target-libiberty
# This is a list of the install targets for all of the modules which are # This is a list of the install targets for all of the modules which are
# compiled using $(TARGET_FLAGS_TO_PASS). # compiled using $(TARGET_FLAGS_TO_PASS).
INSTALL_TARGET_MODULES = \ CROSS=native # or CROSS=cross
install-libio \ # Target libraries are put under this directory:
install-libstdc++ \ TARGET_SUBDIR = . # Changed by configure to $(target_alias) if cross.
install-libg++ \
install-newlib \
install-winsup \
install-libgloss \
install-xiberty
# This is a shell case of all modules which are compiled using INSTALL_TARGET_MODULES = \
# $(TARGET_FLAGS_TO_PASS), used in the do-X rule. install-target-libio \
TARGET_LIBS = libio | libstdc++ | librx | libg++ | newlib | xiberty | winsup install-target-libstdc++ \
install-target-libg++ \
install-target-newlib \
install-target-winsup \
install-target-libgloss \
install-target-libiberty
# The first rule in the file had better be this one. Don't put any above it. # The first rule in the file had better be this one. Don't put any above it.
all: all.normal all: all.normal
@ -638,14 +639,9 @@ $(DO_X):
@target=`echo $@ | sed -e 's/^do-//'`; \ @target=`echo $@ | sed -e 's/^do-//'`; \
r=`pwd`; export r; \ r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \ srcroot=`cd $(srcdir); pwd`; export srcroot; \
for i in $(SUBDIRS) $(TARGET_CONFIGDIRS); do \ for i in $(SUBDIRS) -dummy-; do \
if [ -f ./$$i/Makefile ]; then \ if [ -f ./$$i/Makefile ]; then \
case $$i in \ case $$i in \
$(TARGET_LIBS) ) \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
done; \
;; \
gcc) \ gcc) \
for flag in $(EXTRA_GCC_FLAGS); do \ for flag in $(EXTRA_GCC_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \ eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
@ -665,6 +661,20 @@ $(DO_X):
$${target}); \ $${target}); \
then true; else exit 1; fi; \ then true; else exit 1; fi; \
else true; fi; \ else true; fi; \
done;\
for i in $(TARGET_CONFIGDIRS) -dummy-; do \
if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
for flag in $(EXTRA_TARGET_FLAGS); do \
eval `echo "$$flag" | sed -e "s|^\(.*\)=\(.*\)|\1='\2'|"`; \
done; \
export AR AS CC CXX NM RANLIB; \
if (cd $(TARGET_SUBDIR)/$$i; \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "NM=$${NM}" \
"RANLIB=$${RANLIB}" \
$${target}); \
then true; else exit 1; fi; \
else true; fi; \
done done
# Here are the targets which correspond to the do-X targets. # Here are the targets which correspond to the do-X targets.
@ -831,12 +841,12 @@ $(INSTALL_MODULES): install-dirs
# target tools. # target tools.
.PHONY: $(CONFIGURE_TARGET_MODULES) .PHONY: $(CONFIGURE_TARGET_MODULES)
$(CONFIGURE_TARGET_MODULES): $(CONFIGURE_TARGET_MODULES):
@dir=`echo $@ | sed -e 's/configure-//'`; \ @dir=`echo $@ | sed -e 's/configure-target-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
true; \ true; \
elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \ elif echo " $(TARGET_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
if [ -d $(srcdir)/$${dir} ]; then \ if [ -d $(srcdir)/$${dir} ]; then \
if [ -d ./$${dir} ]; then true; else mkdir $${dir}; fi; \ [ -d $(TARGET_SUBDIR)/$${dir} ] || mkdir $(TARGET_SUBDIR)/$${dir};\
r=`pwd`; export r; \ r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \ srcroot=`cd $(srcdir); pwd`; export srcroot; \
AR="$(AR_FOR_TARGET)"; export AR; \ AR="$(AR_FOR_TARGET)"; export AR; \
@ -848,7 +858,7 @@ $(CONFIGURE_TARGET_MODULES):
LD="$(LD_FOR_TARGET)"; export LD; \ LD="$(LD_FOR_TARGET)"; export LD; \
NM="$(NM_FOR_TARGET)"; export NM; \ NM="$(NM_FOR_TARGET)"; export NM; \
RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \ RANLIB="$(RANLIB_FOR_TARGET)"; export RANLIB; \
cd $${dir}; \ cd $(TARGET_SUBDIR)/$${dir}; \
$${srcroot}/configure $(CONFIG_ARGUMENTS) --srcdir=$${srcroot}/$${dir}; \ $${srcroot}/configure $(CONFIG_ARGUMENTS) --srcdir=$${srcroot}/$${dir}; \
else \ else \
true; \ true; \
@ -861,11 +871,11 @@ $(CONFIGURE_TARGET_MODULES):
# To build a target all-X means to cd to X and make all. # To build a target all-X means to cd to X and make all.
.PHONY: $(ALL_TARGET_MODULES) .PHONY: $(ALL_TARGET_MODULES)
$(ALL_TARGET_MODULES): $(ALL_TARGET_MODULES):
@dir=`echo $@ | sed -e 's/all-//'`; \ @dir=`echo $@ | sed -e 's/all-target-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
r=`pwd`; export r; \ r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \ srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \ (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
else \ else \
true; \ true; \
fi fi
@ -874,11 +884,11 @@ $(ALL_TARGET_MODULES):
# To build a target install-X means to cd to X and make install. # To build a target install-X means to cd to X and make install.
.PHONY: $(CHECK_TARGET_MODULES) .PHONY: $(CHECK_TARGET_MODULES)
$(CHECK_TARGET_MODULES): $(CHECK_TARGET_MODULES):
@dir=`echo $@ | sed -e 's/check-//'`; \ @dir=`echo $@ | sed -e 's/check-target//'`; \
if [ -f ./$${dir}/Makefile ] ; then \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
r=`pwd`; export r; \ r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \ srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) check); \ (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
else \ else \
true; \ true; \
fi fi
@ -888,11 +898,12 @@ $(CHECK_TARGET_MODULES):
# and make install. # and make install.
.PHONY: $(INSTALL_TARGET_MODULES) .PHONY: $(INSTALL_TARGET_MODULES)
$(INSTALL_TARGET_MODULES): install-dirs $(INSTALL_TARGET_MODULES): install-dirs
@dir=`echo $@ | sed -e 's/install-//'`; \ @dir=`echo $@ | sed -e 's/install-target-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \ if [ -f $(TARGET_SUBDIR)/$${dir}/Makefile ] ; then \
r=`pwd`; export r; \ r=`pwd`; export r; \
srcroot=`cd $(srcdir); pwd`; export srcroot; \ srcroot=`cd $(srcdir); pwd`; export srcroot; \
(cd $${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) install); \ (cd $(TARGET_SUBDIR)/$${dir}; \
$(MAKE) $(TARGET_FLAGS_TO_PASS) install); \
else \ else \
true; \ true; \
fi fi
@ -1006,32 +1017,33 @@ all-flex: all-libiberty all-byacc
all-gas: all-libiberty all-opcodes all-bfd all-gas: all-libiberty all-opcodes all-bfd
all-gash: all-tcl all-gash: all-tcl
all-gawk: all-gawk:
all-gcc: all-libiberty all-byacc all-binutils all-gas all-ld ALL_GCC = all_gcc
all_gcc: all-libiberty all-byacc all-binutils all-gas all-ld
all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements) all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-byacc all-sim $(gdbnlmrequirements)
all-gprof: all-libiberty all-bfd all-gprof: all-libiberty all-bfd
all-grep: all-libiberty all-grep: all-libiberty
all-gui: all-gdb all-libproc all-librx all-gui: all-gdb all-libproc all-target-librx
all-gzip: all-libiberty all-gzip: all-libiberty
all-hello: all-libiberty all-hello: all-libiberty
all-indent: all-indent:
all-ispell: all-emacs19 all-ispell: all-emacs19
all-ld: all-libiberty all-bfd all-byacc all-flex all-ld: all-libiberty all-bfd all-byacc all-flex
configure-libg++: all-gcc configure-target-libg++: $(ALL_GCC)
all-libg++: configure-libg++ all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-librx all-libstdc++ all-target-libg++: configure-target-libg++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio all-target-librx all-target-libstdc++
configure-libgloss: all-gcc configure-target-libgloss: $(ALL_GCC)
all-libgloss: configure-libgloss all-target-libgloss: configure-target-libgloss
configure-libio: all-gcc configure-target-libio: $(ALL_GCC)
all-libio: configure-libio all-gas all-ld all-gcc all-xiberty all-newlib all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libiberty all-target-newlib
all-libiberty: all-libiberty:
configure-librx: all-gcc all-newlib configure-target-librx: $(ALL_GCC) configure-target-newlib
all-librx: configure-librx all-target-librx: configure-target-librx
configure-libstdc++: all-gcc configure-target-libstdc++: $(ALL_GCC)
all-libstdc++: configure-libstdc++ all-gas all-ld all-gcc all-xiberty all-newlib all-libio all-target-libstdc++: configure-target-libstdc++ all-gas all-ld all-gcc all-target-libiberty all-target-newlib all-target-libio
all-m4: all-libiberty all-m4: all-libiberty
all-make: all-libiberty all-make: all-libiberty
all-mmalloc: all-mmalloc:
configure-newlib: all-gcc configure-target-newlib: $(ALL_GCC)
all-newlib: configure-newlib all-binutils all-gas all-gcc all-target-newlib: configure-target-newlib all-binutils all-gas all-gcc
all-opcodes: all-bfd all-opcodes: all-bfd
all-patch: all-patch:
all-prms: all-libiberty all-prms: all-libiberty
@ -1051,11 +1063,11 @@ all-textutils:
all-tgas: all-libiberty all-bfd all-tgas: all-libiberty all-bfd
all-time: all-time:
all-wdiff: all-wdiff:
all-winsup: all-newlib all-target-winsup: all-target-newlib
configure-winsup: configure-newlib configure-target-winsup: configure-target-newlib
all-uudecode: all-libiberty all-uudecode: all-libiberty
configure-xiberty: all-gcc configure-target-libiberty: $(ALL_GCC)
all-xiberty: configure-xiberty all-gcc all-ld all-newlib all-target-libiberty: configure-target-libiberty all-gcc all-ld all-target-newlib
### other supporting targets ### other supporting targets
@ -1117,14 +1129,14 @@ Makefile: Makefile.in configure.in $(host_makefile_frag) $(target_makefile_frag)
DEVO_SUPPORT= README Makefile.in configure configure.in \ DEVO_SUPPORT= README Makefile.in configure configure.in \
config.guess config.sub config move-if-change \ config.guess config.sub config move-if-change \
mpw-README mpw-build.in mpw-config.in mpw-configure \ mpw-README mpw-build.in mpw-config.in mpw-configure \
COPYING COPYING.LIB install.sh COPYING COPYING.LIB install.sh cfg-ml-com.in cfg-ml-pos.in
# Files in devo/etc used in any net release. # Files in devo/etc used in any net release.
# ChangeLog omitted because it may refer to files which are not in this # ChangeLog omitted because it may refer to files which are not in this
# distribution (perhaps it would be better to include it anyway). # distribution (perhaps it would be better to include it anyway).
ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \ ETC_SUPPORT= Makefile.in cfg-paper.texi configure.in configure.man \
configure.texi standards.texi make-stds.texi configure.texi standards.texi make-stds.texi \
ETC_SUPPORT_PFX=configure.info standards.info cfg-paper.info configure.info* standards.info* cfg-paper.info*
# When you use `make setup-dirs' or `make taz' you should always redefine # When you use `make setup-dirs' or `make taz' you should always redefine
# this macro. # this macro.
@ -1155,15 +1167,19 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
@if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ; @if [ -f .Sanitize ] ; then echo "RUN Sanitize FIRST!" ; false ; fi ;
$(end-sanitize-Sanitize) $(end-sanitize-Sanitize)
./configure sun4 ./configure sun4
[ -z "$(CONFIGURE_TARGET_MODULES)" ] \
|| $(MAKE) $(CONFIGURE_TARGET_MODULES) ALL_GCC="" \
CC_FOR_TARGET="$(CC) CXX_FOR_TARGET="$(CXX)"
# Make links, and run "make diststuff" or "make info" when needed. # Make links, and run "make diststuff" or "make info" when needed.
rm -rf proto-toplev ; mkdir proto-toplev rm -rf proto-toplev ; mkdir proto-toplev
set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \ set -e ; dirs="$(TOOL) $(DEVO_SUPPORT) $(SUPPORT_FILES)" ; \
for d in $$dirs ; do \ for d in $$dirs ; do \
if [ -d $$d ]; then \ if [ -d $$d ]; then \
if grep '^diststuff:' $$d/Makefile >/dev/null ; then \ if [ ! -f $$d/Makefile ] ; then true ; \
(cd $$d ; $(MAKE) diststuff ) || exit 1 ; \ elif grep '^diststuff:' $$d/Makefile >/dev/null ; then \
(cd $$d ; $(MAKE) diststuff ) || exit 1 ; \
elif grep '^info:' $$d/Makefile >/dev/null ; then \ elif grep '^info:' $$d/Makefile >/dev/null ; then \
(cd $$d ; $(MAKE) info ) || exit 1 ; \ (cd $$d ; $(MAKE) info ) || exit 1 ; \
fi ; \ fi ; \
if [ -d $$d/proto-$$d.dir ]; then \ if [ -d $$d/proto-$$d.dir ]; then \
ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \ ln -s ../$$d/proto-$$d.dir proto-toplev/$$d ; \
@ -1179,9 +1195,6 @@ taz: $(DEVO_SUPPORT) $(SUPPORT_FILES) \
(cd proto-toplev/etc; \ (cd proto-toplev/etc; \
for i in $(ETC_SUPPORT); do \ for i in $(ETC_SUPPORT); do \
ln -s ../../etc/$$i . ; \ ln -s ../../etc/$$i . ; \
done ; \
for i in $(ETC_SUPPORT_PFX); do \
ln -s ../../etc/$$i* . ; \
done) done)
# #
# Take out texinfo from configurable dirs # Take out texinfo from configurable dirs
@ -1224,7 +1237,7 @@ gas+binutils.tar.gz: $(DIST_SUPPORT) $(GASB_SUPPORT_DIRS) gas
SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat" SUPPORT_FILES="$(GASB_SUPPORT_DIRS) makeall.bat configure.bat"
.PHONY: libg++.tar.gz .PHONY: libg++.tar.gz
LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty xiberty LIBGXX_SUPPORT_DIRS=include libstdc++ libio librx libiberty
libg++.tar.gz: $(DIST_SUPPORT) libg++ libg++.tar.gz: $(DIST_SUPPORT) libg++
$(MAKE) -f Makefile.in taz TOOL=libg++ \ $(MAKE) -f Makefile.in taz TOOL=libg++ \
SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)" SUPPORT_FILES="$(LIBGXX_SUPPORT_DIRS)"

View File

@ -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 # 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) # the host libraries and the host tools (which may be a cross compiler)
# #
target_libs="xiberty libgloss newlib libio librx libstdc++ libg++" target_libs="target-libiberty target-libgloss target-newlib target-libio target-librx target-libstdc++ target-libg++"
# these tools are built using the target libs, and are intended to run only # these tools are built using the target libs, and are intended to run only
@ -59,7 +59,7 @@ target_tools="examples groff"
## These two lists are of directories that are to be removed from the ## These two lists are of directories that are to be removed from the
## ${configdirs} list for either cross-compilations or for native- ## ${configdirs} list for either cross-compilations or for native-
## compilations. For example, it doesn't make that much sense to ## compilations. For example, it doesn't make that much sense to
## cross-compile Emacs, nor is it terribly useful to compile xiberty in ## cross-compile Emacs, nor is it terribly useful to compile target-libiberty in
## a native environment. ## a native environment.
# directories to be built in the native environment only # directories to be built in the native environment only
@ -70,7 +70,7 @@ native_only="autoconf cvs emacs emacs19 fileutils find grep groff gzip hello
# directories to be built in a cross environment only # directories to be built in a cross environment only
# #
cross_only="xiberty libgloss newlib" cross_only="target-libiberty target-libgloss target-newlib"
## All tools belong in one of the four categories, and are assigned above ## All tools belong in one of the four categories, and are assigned above
## We assign ${configdirs} this way to remove all embedded newlines. This ## We assign ${configdirs} this way to remove all embedded newlines. This
@ -232,11 +232,20 @@ if [ x"${host}" = x"${target}" ] ; then
# that are in the 'cross only' list # that are in the 'cross only' list
skipdirs="${skipdirs} ${cross_only}" skipdirs="${skipdirs} ${cross_only}"
is_cross_compiler=no is_cross_compiler=no
target_subdir=.
else else
# similarly, don't build the targets in the 'native only' # similarly, don't build the targets in the 'native only'
# list when building a cross compiler # list when building a cross compiler
skipdirs="${skipdirs} ${native_only}" skipdirs="${skipdirs} ${native_only}"
is_cross_compiler=yes is_cross_compiler=yes
target_subdir=${target_alias}
if [ ! -d ${target_subdir} ] ; then
if mkdir ${target_subdir} ; then true
else
echo "'*** could not make ${PWD=`pwd`}/${target_subdir}" 1>&2
exit 1
fi
fi
fi fi
copy_dirs= copy_dirs=
@ -283,9 +292,9 @@ fi
# Recognize --with-newlib/--without-newlib. # Recognize --with-newlib/--without-newlib.
if [ x${with_newlib} = xno ]; then if [ x${with_newlib} = xno ]; then
skipdirs="${skipdirs} newlib" skipdirs="${skipdirs} target-newlib"
elif [ x${with_newlib} = xyes ]; then elif [ x${with_newlib} = xyes ]; then
skipdirs=`echo " ${skipdirs} " | sed -e 's/ newlib / /'` skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
fi fi
# Handle ${copy_dirs} # Handle ${copy_dirs}
@ -347,19 +356,19 @@ esac
case "${target}" in case "${target}" in
*-*-netware) *-*-netware)
noconfigdirs="$noconfigdirs libg++ libstdc++ librx newlib xiberty" noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-librx target-newlib target-libiberty"
;; ;;
*-*-vxworks5.1) *-*-vxworks5.1)
noconfigdirs="$noconfigdirs newlib" noconfigdirs="$noconfigdirs target-newlib"
;; ;;
alpha-dec-osf*) alpha-dec-osf*)
# ld works, but does not support shared libraries. emacs doesn't # ld works, but does not support shared libraries. emacs doesn't
# work. newlib is not 64 bit ready. I'm not sure about fileutils or grep. # work. newlib is not 64 bit ready. I'm not sure about fileutils or grep.
noconfigdirs="$noconfigdirs ld emacs fileutils grep newlib" noconfigdirs="$noconfigdirs ld emacs fileutils grep target-newlib"
;; ;;
alpha*-*-*) alpha*-*-*)
# newlib is not 64 bit ready # newlib is not 64 bit ready
noconfigdirs="$noconfigdirs newlib" noconfigdirs="$noconfigdirs target-newlib"
;; ;;
# start-sanitize-arc # start-sanitize-arc
arc-*-*) arc-*-*)
@ -374,7 +383,7 @@ case "${target}" in
;; ;;
h8300*-*-* | \ h8300*-*-* | \
h8500-*-*) h8500-*-*)
noconfigdirs="$noconfigdirs libg++ libstdc++ libio librx" noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx"
;; ;;
hppa*-*-*elf* | \ hppa*-*-*elf* | \
hppa*-*-lites*) hppa*-*-lites*)
@ -392,7 +401,7 @@ case "${target}" in
;; ;;
i[345]86-*-go32) i[345]86-*-go32)
# but don't build gdb # but don't build gdb
noconfigdirs="$noconfigdirs gdb libg++ libstdc++ libio librx" noconfigdirs="$noconfigdirs gdb target-libg++ target-libstdc++ target-libio target-librx"
;; ;;
i[345]86-*-win32) i[345]86-*-win32)
@ -402,12 +411,12 @@ case "${target}" in
noconfigdirs="$noconfigdirs gdb" noconfigdirs="$noconfigdirs gdb"
fi fi
# always build newlib. # always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ newlib / /'` skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
# and winsup # and winsup
configdirs="$configdirs winsup" configdirs="$configdirs winsup"
;; ;;
i[345]86-*-pe) i[345]86-*-pe)
noconfigdirs="$noconfigdirs libg++ libstdc++ libio librx" noconfigdirs="$noconfigdirs target-libg++ target-libstdc++ target-libio target-librx"
;; ;;
i[345]86-*-sco*) i[345]86-*-sco*)
noconfigdirs="$noconfigdirs gprof" noconfigdirs="$noconfigdirs gprof"
@ -442,7 +451,7 @@ case "${target}" in
# a gcc built textutils will cause the linker to hang on 'join' # a gcc built textutils will cause the linker to hang on 'join'
# The CVS server code doesn't work on the RS/6000 # The CVS server code doesn't work on the RS/6000
# Newlib makes problems for libg++ in crosses. # Newlib makes problems for libg++ in crosses.
noconfigdirs="$noconfigdirs ld newlib gprof textutils cvs" noconfigdirs="$noconfigdirs ld target-newlib gprof textutils cvs"
use_gnu_ld=no use_gnu_ld=no
use_gnu_as=no use_gnu_as=no
;; ;;
@ -482,23 +491,23 @@ case "${target}" in
;; ;;
sparc-*-sunos4*) sparc-*-sunos4*)
if [ x${is_cross_compiler} != xno ] ; then if [ x${is_cross_compiler} != xno ] ; then
noconfigdirs="$noconfigdirs gdb gdbtest newlib" noconfigdirs="$noconfigdirs gdb gdbtest target-newlib"
else else
use_gnu_ld=no use_gnu_ld=no
fi fi
;; ;;
v810-*-*) v810-*-*)
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld libg++ libstdc++ opcodes" noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld target-libg++ target-libstdc++ opcodes"
;; ;;
vax-*-vms) vax-*-vms)
noconfigdirs="$noconfigdirs bfd binutils gdb ld newlib opcodes" noconfigdirs="$noconfigdirs bfd binutils gdb ld target-newlib opcodes"
;; ;;
vax-*-*) vax-*-*)
noconfigdirs="$noconfigdirs newlib" noconfigdirs="$noconfigdirs target-newlib"
;; ;;
*-*-lynxos*) *-*-lynxos*)
# Newlib makes problems for libg++ in crosses. # Newlib makes problems for libg++ in crosses.
noconfigdirs="$noconfigdirs newlib" noconfigdirs="$noconfigdirs target-newlib"
;; ;;
esac esac
@ -533,11 +542,16 @@ done
# Deconfigure all subdirectories, in case we are changing the # Deconfigure all subdirectories, in case we are changing the
# configuration from one where a subdirectory is supported to one where it # configuration from one where a subdirectory is supported to one where it
# is not. # is not.
if [ -z "${norecursion}" ]; then if [ -z "${norecursion}" -a -n "${configdirs}" ]; then
for i in ${configdirs} ${target_configdirs}; do for i in ${configdirs} ; do
rm -f $i/Makefile rm -f $i/Makefile
done done
fi fi
if [ -z "${norecursion}" -a -n "${target_configdirs}" ]; then
for i in ${target_configdirs} ; do
rm -f ${target_subdir}/$i/Makefile
done
fi
# Produce a warning message for the subdirs we can't configure. # Produce a warning message for the subdirs we can't configure.
# This isn't especially interesting in the Cygnus tree, but in the individual # This isn't especially interesting in the Cygnus tree, but in the individual
@ -612,12 +626,14 @@ fi
# post-target: # post-target:
# Record target_configdirs and the configure arguments in Makefile. # Record target_configdirs and the configure arguments in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
targargs=`echo "${arguments}" | \ targargs=`echo "${arguments}" | \
sed -e 's/--*norecursion//' \ sed -e 's/--*norecursion//' \
-e 's/--*cache[a-z-]*=[^ ]*//' \ -e 's/--*cache[a-z-]*=[^ ]*//' \
-e 's/--*cache[a-z-]*[ ][ ]*[^ ]*//'` -e 's/--*cache[a-z-]*[ ][ ]*[^ ]*//'`
sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \ sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
-e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \ -e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \
-e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
Makefile > Makefile.tem Makefile > Makefile.tem
rm -f Makefile rm -f Makefile
mv -f Makefile.tem Makefile mv -f Makefile.tem Makefile