Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 Aug 2013 15:03:09 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: CURDIR-relative paths in ports' Makefiles
Message-ID:  <521CB19D.5050609@FreeBSD.org>
In-Reply-To: <521C95E7.8000104@gmail.com>
References:  <521C95E7.8000104@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--T7UPM8PvuL8eD4C4DaSgDRPFKBO7rWBSM
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 27/08/2013 13:04, Koslov Sergey wrote:
> Hello
>=20
> I've noticed that many ports are using ${.CURDIR}/../../some/port
> construction in their Makefiles.
>=20
> But if you copy on of these ports elsewhere it won't work as expected
> because of the relative path.
> Shouldn't they use ${PORTSDIR}/some/port instead?

The use of relative paths is taken straight from The Porter's Handbook.  =
eg.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefil=
e-masterdir.html

So it's officially correct to do that.

While there is no direct proscription against saying
${PORTSDIR}/some/port in that circumstance that I can see in the
documentation, relative paths are generally only used in slave ports for
the ${MASTERDIR} setting or more generally for including other
Makefiles; whereas absolute paths are used for all sorts of FOO_DEPENDS
variables.  A quick (and by no means  definitive) grepping of the ports
tree I just did hasn't shown up any counter examples.

If you intend to copy a slave port to some other location in your
filesystem and have it refer to the original master port within the
default ports tree, then you're assumed to be capable of editing the
Makefile to resolve any such changes.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey



--T7UPM8PvuL8eD4C4DaSgDRPFKBO7rWBSM
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlIcsaMACgkQ8Mjk52CukIxJQwCfTNQ9PEud01Y1bNnC65EYWEiH
cpMAmwWn5g3pzyx3xG11NaENySQ6lHkB
=N/rA
-----END PGP SIGNATURE-----

--T7UPM8PvuL8eD4C4DaSgDRPFKBO7rWBSM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?521CB19D.5050609>