# clear some things potentially inherited from environment.
ansi=
+arguments=$*
defaulttargets=
destdir=
fatal=
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/'`
#### 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/'`
#### configure.in per-target parts come in here.
-# XXX - FIXME there needs to be a case for tmake-a29k
-
#
# Local Variables:
# fill-column: 131
## 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
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}
# 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
using=" using \"${host_makefile_frag}\""
fi
+ # remove any form feeds.
+ sed -e "s/\f//" ${Makefile} > Makefile.tem
+ mv Makefile.tem ${Makefile}
+
if [ -f ${srcdir}/${target_makefile_frag} ] ; then
if [ -z "${using}" ] ; then
andusing=" using \"${target_makefile_frag}\""
## 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}
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-*)
#
# $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.