summaryrefslogtreecommitdiff
path: root/config-ml.in
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2002-05-22 09:21:32 +0000
committerNick Clifton <nickc@redhat.com>2002-05-22 09:21:32 +0000
commitb5e167618d0d0da1e1bce9a060bcfc29aeef7c6d (patch)
treec22aa2519aa32122a1739926ebda6656e3ed2070 /config-ml.in
parentb108c054b1e6601143ec0dd89b0871cf226ddcc9 (diff)
downloadgdb-b5e167618d0d0da1e1bce9a060bcfc29aeef7c6d.tar.gz
Allow for PWDCMD to override hardcoded pwd.
Diffstat (limited to 'config-ml.in')
-rw-r--r--config-ml.in16
1 files changed, 9 insertions, 7 deletions
diff --git a/config-ml.in b/config-ml.in
index c968bf0d719..4b1be0f0956 100644
--- a/config-ml.in
+++ b/config-ml.in
@@ -510,14 +510,16 @@ multidirs=`echo "$multidirs" | sed -e 's/^[ ][ ]*//' -e 's/[ ][ ]*$//' -e 's/[ ]
cat > Multi.tem <<\EOF
+PWD=$${PWDCMD-pwd}
+
# FIXME: There should be an @-sign in front of the `if'.
# Leave out until this is tested a bit more.
multi-do:
if [ -z "$(MULTIDIRS)" ]; then \
true; \
else \
- rootpre=`pwd`/; export rootpre; \
- srcrootpre=`cd $(srcdir); pwd`/; export srcrootpre; \
+ rootpre=`${PWD}`/; export rootpre; \
+ srcrootpre=`cd $(srcdir); ${PWD}`/; export srcrootpre; \
lib=`echo $${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
compiler="$(CC)"; \
for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
@@ -552,7 +554,7 @@ multi-clean:
if [ -z "$(MULTIDIRS)" ]; then \
true; \
else \
- lib=`pwd | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
+ lib=`${PWD} | sed -e 's,^.*/\([^/][^/]*\)$$,\1,'`; \
for dir in Makefile $(MULTIDIRS); do \
if [ -f ../$${dir}/$${lib}/Makefile ]; then \
if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) $(DO)); \
@@ -659,10 +661,10 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if [ "${ml_verbose}" = --verbose ]; then
echo "Running configure in multilib subdirs ${multidirs}"
- echo "pwd: `pwd`"
+ echo "pwd: `${PWDCMD-pwd}`"
fi
- ml_origdir=`pwd`
+ ml_origdir=`${PWDCMD-pwd}`
ml_libdir=`echo $ml_origdir | sed -e 's,^.*/,,'`
# cd to top-level-build-dir/${with_target_subdir}
cd ..
@@ -671,7 +673,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
if [ "${ml_verbose}" = --verbose ]; then
echo "Running configure in multilib subdir ${ml_dir}"
- echo "pwd: `pwd`"
+ echo "pwd: `${PWDCMD-pwd}`"
fi
if [ -d ${ml_dir} ]; then true; else
@@ -699,7 +701,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_norecursion}" ]; then
case ${srcdir} in
".")
- echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir}
+ echo Building symlink tree in `${PWDCMD-pwd}`/${ml_dir}/${ml_libdir}
if [ "${with_target_subdir}" != "." ]; then
ml_unsubdir="../"
else