aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@dcc.unicamp.br>1999-04-03 13:01:48 +0000
committerAlexandre Oliva <oliva@gcc.gnu.org>1999-04-03 13:01:48 +0000
commit965c3f43f9e5e017da24f17b8a5c539147b4279c (patch)
treeba2196bae5303cb72b14d332e1393b0106567ae2 /gcc
parentebc7e094e168aa1d2ab1a2f25f14f411fc20b79e (diff)
downloadgcc-965c3f43f9e5e017da24f17b8a5c539147b4279c.zip
gcc-965c3f43f9e5e017da24f17b8a5c539147b4279c.tar.gz
gcc-965c3f43f9e5e017da24f17b8a5c539147b4279c.tar.bz2
Makefile.in (install-headers-tar, [...]): avoid problems with CDPATH Reported by Ralf Canis <canis@bigfoot.com>
* Makefile.in (install-headers-tar, install-headers-cpio): avoid problems with CDPATH Reported by Ralf Canis <canis@bigfoot.com> From-SVN: r26157
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/Makefile.in10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3816e96..fdb72eb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Sat Apr 3 17:57:35 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
+
+ * Makefile.in (install-headers-tar, install-headers-cpio): avoid
+ problems with CDPATH
+ Reported by Ralf Canis <canis@bigfoot.com>
+
Sat Apr 3 13:50:16 1999 Jeffrey A Law (law@cygnus.com)
* fixinc.x86-linux-gnu: Deleted.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 62597e3..121b4de 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2636,7 +2636,11 @@ install-include-dir: installdirs
# Install the include directory using tar.
install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
- (cd include; \
+# We use `pwd`/include instead of just include to problems with CDPATH
+# Unless a full pathname is provided, some shells would print the new CWD,
+# found in CDPATH, corrupting the output. We could just redirect the
+# output of `cd', but some shells lose on redirection within `()'s
+ (cd `pwd`/include ; \
tar -cf - .; exit 0) | (cd $(libsubdir)/include; tar $(TAROUTOPTS) - )
# /bin/sh on some systems returns the status of the first tar,
# and that can lose with GNU tar which always writes a full block.
@@ -2644,7 +2648,9 @@ install-headers-tar: stmp-headers $(STMP_FIXPROTO) install-include-dir
# Install the include directory using cpio.
install-headers-cpio: stmp-headers $(STMP_FIXPROTO) install-include-dir
- (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
+# See discussion about the use of `pwd` above
+ cd `pwd`/include ; \
+ find . -print | cpio -pdum $(libsubdir)/include
# Put assert.h where it won't override GNU libc's assert.h.
# It goes in a dir that is searched after GNU libc's headers;