Subject: make: .if exists weirdness
To: None <tech-pkg@netbsd.org>
From: Jan Schaumann <jschauma@netbsd.org>
List: tech-pkg
Date: 07/11/2003 17:57:24
--IJpNTDwzlM2Ie8A6
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Hi,
I seem to experience some particular weirdness wrt make(1)'s idea of
when a file exists or not:
In a Makefile:
FILE1=3D ${PREFIX}/lib/libGL.so.5
FILE2=3D /usr/pkg/lib/libGL.so.5
=2Eif exists(${FILE1})
BAR=3D blah =20
=2Eendif
=2Eif exists(${FILE2})
BLAH=3D blah
=2Eendif
Now, we would assume that, given that /usr/pkg/lib/libGL.so.5 exists,
and that PREFIX is indeed /usr/pkg (ie FILE1 =3D=3D FILE2 and exists) both
BAR and BLAH should be set, right?
Behold:
red-stripe# make show-var VARNAME=3DBAR
red-stripe# make show-var VARNAME=3DBLAH
blah
red-stripe#=20
Now let's change /usr/pkg/lib/libGL.so.5 to /usr/pkg/lib/libGL.so (and
FILE1 accordingly), and we get:
red-stripe# !119
make show-var VARNAME=3DBAR
blah
red-stripe# !120
make show-var VARNAME=3DBLAH
blah
red-stripe#=20
Ok, now change libGL.so to libGL.so.5.501:
red-stripe# !119
make show-var VARNAME=3DBAR
red-stripe# !120
make show-var VARNAME=3DBLAH
blah
red-stripe#=20
Now change /usr/pkg/lib/libGL.so to /usr/pkg/include/GL/gl.h:
red-stripe# !119
make show-var VARNAME=3DBAR
blah
red-stripe# !120
make show-var VARNAME=3DBLAH
blah
red-stripe#=20
This does not make any sense to me. Note that libGL.so and libGL.so.5
are symlinks, libGL.so.5.501 the actual file.=20
What's up with this - anybody have any idea?
-Jan
--=20
I always said there was something fundamentally wrong with the universe.
--IJpNTDwzlM2Ie8A6
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (NetBSD)
iD8DBQE/DzLEfFtkr68iakwRAnQ5AJwKw43mexlA5qwLD6vy5M45fEX6tQCfa3U2
myL8mPkkLmzO8lMOubgUGEc=
=ypln
-----END PGP SIGNATURE-----
--IJpNTDwzlM2Ie8A6--