From owner-freebsd-questions@FreeBSD.ORG Tue Aug 27 14:03:23 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7934FA25 for ; Tue, 27 Aug 2013 14:03:23 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D3A4029B9 for ; Tue, 27 Aug 2013 14:03:22 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.7/8.14.7) with ESMTP id r7RE3F4s043781 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO) for ; Tue, 27 Aug 2013 15:03:16 +0100 (BST) (envelope-from matthew@FreeBSD.org) DKIM-Filter: OpenDKIM Filter v2.8.3 smtp.infracaninophile.co.uk r7RE3F4s043781 Authentication-Results: smtp.infracaninophile.co.uk/r7RE3F4s043781; dkim=none reason="no signature"; dkim-adsp=none (unprotected policy) Message-ID: <521CB19D.5050609@FreeBSD.org> Date: Tue, 27 Aug 2013 15:03:09 +0100 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: CURDIR-relative paths in ports' Makefiles References: <521C95E7.8000104@gmail.com> In-Reply-To: <521C95E7.8000104@gmail.com> X-Enigmail-Version: 1.5.2 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T7UPM8PvuL8eD4C4DaSgDRPFKBO7rWBSM" X-Virus-Scanned: clamav-milter 0.97.8 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Aug 2013 14:03:23 -0000 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--