aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorSteve Chamberlain <sac@cygnus>1992-06-23 01:32:47 +0000
committerSteve Chamberlain <sac@cygnus>1992-06-23 01:32:47 +0000
commit4347369fb188f0d164d8ed2e51ced75b9a59ec8d (patch)
tree7533da274d3240e83f16ce81af8d5092f42c4488 /configure
parentf74d99418e0321522e577a1cb489a76873c4ebfc (diff)
downloadgdb-4347369fb188f0d164d8ed2e51ced75b9a59ec8d.zip
gdb-4347369fb188f0d164d8ed2e51ced75b9a59ec8d.tar.gz
gdb-4347369fb188f0d164d8ed2e51ced75b9a59ec8d.tar.bz2
* configure: fix various problems with propogating
makefile_target_frag in subdirs. * configure.in: config libgcc if its there
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure47
1 files changed, 29 insertions, 18 deletions
diff --git a/configure b/configure
index aa9acf9..0975c38 100755
--- a/configure
+++ b/configure
@@ -92,14 +92,13 @@ NO_EDIT="This file was generated automatically by configure. Do not edit."
## path. Since PATH might include "." we also add `pwd` to the end of PATH.
##
-PWD=`pwd`
progname=$0
case "${progname}" in
/*) ;;
*/*) ;;
*)
- PATH=$PATH:${PWD} ; export PATH
+ PATH=$PATH:${PWD=`pwd`} ; export PATH
;;
esac
@@ -361,7 +360,7 @@ case "${srcdir}" in
".") ;;
*)
if [ -f ${srcdir}/config.status ] ; then
- echo '***' Cannot configure here in \"${PWD}\" when \"${srcdir}\" is currently configured. 1>&2
+ echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2
exit 1
fi
esac
@@ -417,7 +416,7 @@ fi
# some sanity checks on configure.in
case "${srctrigger}" in
"")
- echo '***' srctrigger not set in ${PWD}/configure.in. 1>&2
+ echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in. 1>&2
exit 1
;;
*) ;;
@@ -453,8 +452,8 @@ esac
if [ ! -r ${srcdir}/${srctrigger} ] ; then
case "${srcdirdefaulted}" in
- "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD}/${srcdir}" 1>&2 ;;
- *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD}/. or ${PWD}/.." 1>&2 ;;
+ "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;;
+ *) echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;;
esac
echo '***' \(At least ${srctrigger} is missing.\) 1>&2
@@ -587,7 +586,7 @@ EOF
sed -e "/^####/ r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
else
echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
- echo '***' is missing in ${PWD}. 1>&2
+ echo '***' is missing in ${PWD=`pwd`}. 1>&2
mv ${subdir}/Makefile.tem ${Makefile}
fi
esac
@@ -598,7 +597,9 @@ EOF
case "${target_makefile_frag}" in
"") mv ${Makefile} ${subdir}/Makefile.tem ;;
*)
- target_makefile_frag=${srcdir}/${target_makefile_frag}
+ if [ ! -f ${target_makefile_frag} ] ; then
+ target_makefile_frag=${srcdir}/${target_makefile_frag}
+ fi
if [ -f ${target_makefile_frag} ] ; then
sed -e "/^####/ r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
else
@@ -624,12 +625,22 @@ target_cpu = ${target_cpu}
target_vendor = ${target_vendor}
target_os = ${target_os}
EOF
- if [ "${target_makefile_frag}" != "" ] ; then
- echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile}
- fi
- if [ "${host_makefile_frag}" != "" ] ; then
- echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile}
- fi
+ case "${target_makefile_frag}" in
+ "") ;;
+ /*)
+ echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
+ *)
+ echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
+ esac
+
+ case "${host_makefile_frag}" in
+ "") ;;
+ /*)
+ echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
+ *)
+ echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
+ esac
+
if [ "${site_makefile_frag}" != "" ] ; then
echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
fi
@@ -689,7 +700,7 @@ EOF
newusing=`echo "${using}" | sed 's/and/using/'`
using=${newusing}
- echo "Created \"${Makefile}\" in" ${PWD} ${using}
+ echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
. ${tmpfile}.pos
@@ -706,13 +717,13 @@ EOF
if [ ${subdir} = . ] ; then
echo "#!/bin/sh
# ${NO_EDIT}
-# ${PWD} was configured as follows:
+# This directory was configured as follows:
${progname}" ${arguments} "
# ${using}" > ${subdir}/config.new
else
echo "#!/bin/sh
# ${NO_EDIT}
-# ${PWD}/${subdir} was configured as follows:
+# This directory was configured as follows:
cd ${invsubdir}
${progname}" ${arguments} "
# ${using}" > ${subdir}/config.new
@@ -743,7 +754,7 @@ if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then
;;
esac
- POPDIR=${PWD}
+ POPDIR=${PWD=`pwd`}
cd ${configdir}
### figure out what to do with srcdir