* use aliases as directory names.
* put aliases AND parsed triples into Makefiles. * config.status is a shell script. * remove formfeeds from resulting Makefile.
This commit is contained in:
parent
46766962cf
commit
b8f8fddc8c
70
configure
vendored
70
configure
vendored
@ -48,6 +48,7 @@ progname=$0
|
||||
|
||||
# clear some things potentially inherited from environment.
|
||||
ansi=
|
||||
arguments=$*
|
||||
defaulttargets=
|
||||
destdir=
|
||||
fatal=
|
||||
@ -319,6 +320,8 @@ for host in ${hosts} ; do
|
||||
defaulttargets=true
|
||||
fi
|
||||
|
||||
host_alias=${host}
|
||||
|
||||
result=`/bin/sh ./config.sub ${host}`
|
||||
host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
||||
@ -328,16 +331,11 @@ for host in ${hosts} ; do
|
||||
|
||||
#### configure.in per-host parts come in here.
|
||||
|
||||
# XXX - FIXME there needs to be a case for hmake-dgux
|
||||
|
||||
case "${host_os}" in
|
||||
sysv* | irix*) host_makefile_frag=config/hmake-sysv ;;
|
||||
esac
|
||||
|
||||
## end of per-host part.
|
||||
|
||||
for target in ${targets} ; do
|
||||
|
||||
target_alias=${target}
|
||||
result=`/bin/sh ./config.sub ${target}`
|
||||
target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
|
||||
target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
|
||||
@ -347,8 +345,6 @@ esac
|
||||
|
||||
#### configure.in per-target parts come in here.
|
||||
|
||||
# XXX - FIXME there needs to be a case for tmake-a29k
|
||||
|
||||
#
|
||||
# Local Variables:
|
||||
# fill-column: 131
|
||||
@ -357,8 +353,8 @@ esac
|
||||
## end of per-target part.
|
||||
|
||||
# Temporarily, we support only direct subdir builds.
|
||||
hostsubdir=Host-${host}
|
||||
targetsubdir=Target-${target}
|
||||
hostsubdir=H-${host_alias}
|
||||
targetsubdir=T-${target_alias}
|
||||
|
||||
if [ -n "${removing}" ] ; then
|
||||
if [ -n "${subdirs}" ] ; then
|
||||
@ -488,8 +484,15 @@ esac
|
||||
fi
|
||||
|
||||
# set target, host, VPATH
|
||||
echo "host = ${host}" >> ${Makefile}
|
||||
echo "target = ${target}" >> ${Makefile}
|
||||
echo "host_alias = ${host_alias}" >> ${Makefile}
|
||||
echo "host_cpu = ${host_cpu}" >> ${Makefile}
|
||||
echo "host_vendor = ${host_vendor}" >> ${Makefile}
|
||||
echo "host_os = ${host_os}" >> ${Makefile}
|
||||
|
||||
echo "target_alias = ${target_alias}" >> ${Makefile}
|
||||
echo "target_cpu = ${target_cpu}" >> ${Makefile}
|
||||
echo "target_vendor = ${target_vendor}" >> ${Makefile}
|
||||
echo "target_os = ${target_os}" >> ${Makefile}
|
||||
|
||||
if [ -n "${subdirs}" ] ; then
|
||||
echo "subdir = /${hostsubdir}/${targetsubdir}" >> ${Makefile}
|
||||
@ -505,13 +508,15 @@ esac
|
||||
|
||||
# Conditionalize the makefile for this host.
|
||||
if [ -f ${srcdir}/${host_makefile_frag} ] ; then
|
||||
sed -e "/^####/ r ${srcdir}/${host_makefile_frag}" ${Makefile} > Makefile.tem
|
||||
(echo "host_makefile_frag = ${srcdir}/${host_makefile_frag}" ;
|
||||
sed -e "/^####/ r ${srcdir}/${host_makefile_frag}" ${Makefile}) > Makefile.tem
|
||||
mv Makefile.tem ${Makefile}
|
||||
fi
|
||||
|
||||
# Conditionalize the makefile for this target.
|
||||
if [ -f ${srcdir}/${target_makefile_frag} ] ; then
|
||||
sed -e "/^####/ r ${srcdir}/${target_makefile_frag}" ${Makefile} > Makefile.tem
|
||||
(echo "target_makefile_frag = ${srcdir}/${target_makefile_frag}" ;
|
||||
sed -e "/^####/ r ${srcdir}/${target_makefile_frag}" ${Makefile}) > Makefile.tem
|
||||
mv Makefile.tem ${Makefile}
|
||||
fi
|
||||
|
||||
@ -538,6 +543,10 @@ esac
|
||||
using=" using \"${host_makefile_frag}\""
|
||||
fi
|
||||
|
||||
# remove any form feeds.
|
||||
sed -e "s///" ${Makefile} > Makefile.tem
|
||||
mv Makefile.tem ${Makefile}
|
||||
|
||||
if [ -f ${srcdir}/${target_makefile_frag} ] ; then
|
||||
if [ -z "${using}" ] ; then
|
||||
andusing=" using \"${target_makefile_frag}\""
|
||||
@ -556,15 +565,15 @@ esac
|
||||
|
||||
## end of post-target part.
|
||||
|
||||
if [ "${host}" = "${target}" ] ; then
|
||||
echo "Links are now set up for use with a ${target}." \
|
||||
> config.status
|
||||
# | tee ${srcdir}/config.status
|
||||
else
|
||||
echo "Links are now set up for host ${host} and target ${target}." \
|
||||
> config.status
|
||||
# | tee ${srcdir}/config.status
|
||||
fi
|
||||
# describe the chosen configuration in config.status.
|
||||
# Make that file a shellscript which will reestablish
|
||||
# the same configuration. Used in Makefiles to rebuild
|
||||
# Makefiles.
|
||||
|
||||
echo "#!/bin/sh
|
||||
# ${srcname} was configured as follows:
|
||||
${srcdir}/configure" ${arguments} `if [ -z "${norecursion}" ] ; then echo +norecursion ; else true ; fi` > config.status
|
||||
chmod a+x config.status
|
||||
|
||||
originaldir=`pwd`
|
||||
cd ${srcdir}
|
||||
@ -595,7 +604,7 @@ esac
|
||||
if [ -n "${subdirs}" -a ! -n "${removing}" ] ; then
|
||||
cd ${hostsubdir}
|
||||
cat > GNUmakefile << E!O!F
|
||||
# Makefile generated by configure for host ${host}.
|
||||
# Makefile generated by configure for host ${host_alias}.
|
||||
|
||||
ALL := $(shell ls -d Target-*)
|
||||
|
||||
@ -612,14 +621,11 @@ exit 0
|
||||
|
||||
#
|
||||
# $Log$
|
||||
# Revision 1.39 1991/10/01 02:38:26 rich
|
||||
# Reword recurr.
|
||||
#
|
||||
# Revision 1.38 1991/09/20 01:03:38 grossman
|
||||
# configure +template to bring in irix stuff.
|
||||
#
|
||||
# Revision 1.37 1991/09/12 00:33:18 rich
|
||||
# Add gdbm.
|
||||
# Revision 1.40 1991/10/01 02:44:32 rich
|
||||
# * use aliases as directory names.
|
||||
# * put aliases AND parsed triples into Makefiles.
|
||||
# * config.status is a shell script.
|
||||
# * remove formfeeds from resulting Makefile.
|
||||
#
|
||||
# Revision 1.36 1991/08/31 03:54:36 rich
|
||||
# Welcome emacs to the mess.
|
||||
|
Loading…
Reference in New Issue
Block a user