[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with symlinks and VPATH Builds
From: |
Paul Eggert |
Subject: |
Re: Problem with symlinks and VPATH Builds |
Date: |
Sun, 21 Jul 2002 00:17:32 -0700 (PDT) |
> From: "Mark D. Roth" <address@hidden>
> Date: Sat, 20 Jul 2002 20:31:13 -0500
>
> I've attached a patch that does this. It passes the test suite, so if
> I don't hear any objections in the next couple of days, I'll commit
> this to CVS.
I don't like this patch, for two reasons:
* The output of "/bin/pwd" is often much uglier than the output of
"pwd" (or $PWD).
* Sometimes /bin/pwd fails when plain pwd would succeed. Here's
a contrived example:
$ cd /tmp
$ mkdir -p d/e
$ cd d/e
$ chmod 0 /tmp/d
$ pwd
/tmp/d/e
$ /bin/pwd
pwd: cannot determine current directory!
More-realistic examples are quite common in practice.
I think this may help explain why "/bin/pwd" doesn't occur anywhere in
the existing Autoconf sources. I'd rather avoid "/bin/pwd" if I can.
I went back to your original message
<http://mail.gnu.org/pipermail/autoconf/2002-July/013682.html>
and I could not reproduce the problem with autoconf 2.53 and Solaris 8
sparc, so I think there may be something else going on here. Perhaps
the bug is somewhere else, and is not in Autoconf.
Here's how I tried to reproduce the problem. I created the following
shell script and called it "/tmp/doit":
R=/tmp # root directory
cd $R || exit
rm -fr projects usr
mkdir -p projects/encap-src/psg/common
mkdir -p projects/encap-src/psg/sparc-solaris8
mkdir -p usr/local
ln -s $R/projects/encap-src/psg/sparc-solaris8 usr/local/src
(cd projects/encap-src/psg/common
mkdir dummy-0.1
cd dummy-0.1
touch dummy.c Makefile.in
cat >configure.ac <<'EOF'
AC_INIT([dummy], [0.1])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([dummy.c])
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF
autoconf
autoheader
)
(cd usr/local/src
mkdir dummy-0.1
cd dummy-0.1
../../common/dummy-0.1/configure
)
I then ran "sh -x /tmp/doit", with the following results:
R=/tmp
+ cd /tmp
+ rm -fr projects usr
+ mkdir -p projects/encap-src/psg/common
+ mkdir -p projects/encap-src/psg/sparc-solaris8
+ mkdir -p usr/local
+ ln -s /tmp/projects/encap-src/psg/sparc-solaris8 usr/local/src
+ cd projects/encap-src/psg/common
+ mkdir dummy-0.1
+ cd dummy-0.1
+ touch dummy.c Makefile.in
+ cat
+ autoconf
+ autoheader
autoheader: `config.h.in' is created
+ cd usr/local/src
+ mkdir dummy-0.1
+ cd dummy-0.1
+ ../../common/dummy-0.1/configure
checking for gcc... gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
I did not see the failure that you reported.
- Re: Problem with symlinks and VPATH Builds, Mark D. Roth, 2002/07/20
- Re: Problem with symlinks and VPATH Builds,
Paul Eggert <=
- Re: Problem with symlinks and VPATH Builds, Mark D. Roth, 2002/07/21
- Re: Problem with symlinks and VPATH Builds, Paul Eggert, 2002/07/23
- Re: Problem with symlinks and VPATH Builds, Mark D. Roth, 2002/07/23
- Re: Problem with symlinks and VPATH Builds, Paul Eggert, 2002/07/24
- Re: Problem with symlinks and VPATH Builds, Mark D. Roth, 2002/07/24
- Re: Problem with symlinks and VPATH Builds, Paul Eggert, 2002/07/25
- Re: Problem with symlinks and VPATH Builds, Mark D. Roth, 2002/07/25
- Re: Problem with symlinks and VPATH Builds, Akim Demaille, 2002/07/25
Re: Problem with symlinks and VPATH Builds, Akim Demaille, 2002/07/25