From owner-freebsd-ports@FreeBSD.ORG Tue Mar 8 17:27:37 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D2D21065670 for ; Tue, 8 Mar 2011 17:27:37 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id C51E58FC18 for ; Tue, 8 Mar 2011 17:27:36 +0000 (UTC) Received: by wyf23 with SMTP id 23so231924wyf.13 for ; Tue, 08 Mar 2011 09:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=T9Ba3N1P4tgO9IjFjgp4tWZkAx2d3a/xWubG3/gqR+U=; b=sPCn7104NijMVIC25A4DQiUJylHepdsV5O6bvzWb88jho4EA4lQ7zJXYFMFf50Q7+6 hHxH+LpStyqsiI9w9sSZKYJjmyEnkBLA1H14K29QC/383n3Xqre5h6pfxFSlB83O9LvZ NwSfYM7Bj3HQzIERSci433oAhXpXfpPv+kWO4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; b=cRFJsZyBEPCnHOEoLacRqNXjuA87mR8JpuWMf5gRhLEYF9KnCsrLcAFHoG/KvgdCoQ jZRpOriCB2zZaCYd7OcyNtek3Yy3Q0UoIRsW3pKlyZqu1+vEkXgUuEwMLx2phRPwpP+Y v0pbC90ZO6D9X/I1mcMPkaZcqECLxAEWmTpmw= Received: by 10.216.241.4 with SMTP id f4mr4710699wer.42.1299605255615; Tue, 08 Mar 2011 09:27:35 -0800 (PST) MIME-Version: 1.0 Received: by 10.216.39.136 with HTTP; Tue, 8 Mar 2011 09:26:50 -0800 (PST) In-Reply-To: References: <4D766181.6020809@gmail.com> From: Chris Rees Date: Tue, 8 Mar 2011 17:26:50 +0000 Message-ID: To: David Demelier Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-ports@freebsd.org Subject: Re: Creating a new port, overriding a Makefile variable X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: utisoft@gmail.com List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 17:27:37 -0000 On 8 March 2011 17:11, Chris Rees wrote: > > On 8 Mar 2011 17:04, "David Demelier" wrote: >> >> Hello, >> >> I'm writing a port for a game, I setup a MANPREFIX= /share/man for almost >> all the systems to install in the correct place. >> >> In the port Makefile I've tried to use MAKE_ENV= MANPREFIX=/man to >> override it, but it seems it's ignored. >> >> Can I solve this without creating a files/patch-Makefile? >> >> Cheers, >> >> -- >> David Demelier >> > > If It's hard set in the Makefile, I'd use REINPLACE_CMD. > > Chris > or MAKE_ARGS= -EMANPREFIX MAKE_ENV= MANPREFIX=/man I tested this with: [crees@zeus]~% cat Makefile HELLO= "hello, world" all: @echo ${HELLO} [crees@zeus]~% make hello, world [crees@zeus]~% env HELLO=hello make hello, world [crees@zeus]~% env HELLO=hello make -EHELLO hello [crees@zeus]~% Try it out! Though I still think the usual response is to use REINPLACE_CMD on the Makefile. Chris NB gmake doesn't have the -E flag, but the -e flag sets environment precedence on all variables. Sounds risky!