From owner-cvs-ports@FreeBSD.ORG Mon Dec 20 15:04:00 2004 Return-Path: Delivered-To: cvs-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A995F16A4CE; Mon, 20 Dec 2004 15:04:00 +0000 (GMT) Received: from arabica.esil.univ-mrs.fr (arabica.esil.univ-mrs.fr [139.124.41.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7D77343D3F; Mon, 20 Dec 2004 15:03:57 +0000 (GMT) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (localhost.esil.univ-mrs.fr [127.0.0.1])iBKF3uXF024669; Mon, 20 Dec 2004 16:03:56 +0100 (CET) (envelope-from herve.quiroz@esil.univ-mrs.fr) Received: (from rv@localhost) by arabica.esil.univ-mrs.fr (8.13.1/8.13.1/Submit) id iBKF3tPa024668; Mon, 20 Dec 2004 16:03:55 +0100 (CET) (envelope-from herve.quiroz@esil.univ-mrs.fr) X-Authentication-Warning: arabica.esil.univ-mrs.fr: rv set sender to herve.quiroz@esil.univ-mrs.fr using -f Date: Mon, 20 Dec 2004 16:03:55 +0100 From: Herve Quiroz To: "David O'Brien" Message-ID: <20041220150355.GA24591@arabica.esil.univ-mrs.fr> References: <200412092144.iB9LimTj092202@repoman.freebsd.org> <20041219220959.GA49369@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041219220959.GA49369@dragon.nuxi.com> User-Agent: Mutt/1.4.2.1i cc: cvs-ports@FreeBSD.org cc: cvs-all@FreeBSD.org cc: ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/Mk bsd.port.mk bsd.port.subdir.mk X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Dec 2004 15:04:00 -0000 On Sun, Dec 19, 2004 at 02:09:59PM -0800, David O'Brien wrote: > On Thu, Dec 09, 2004 at 09:44:48PM +0000, Kirill Ponomarew wrote: > > krion 2004-12-09 21:44:48 UTC > > FreeBSD ports repository > > Modified files: > > Mk bsd.port.mk bsd.port.subdir.mk > > Log: > > * Add new command macros: DATE, FMT, MKTEMP, OBJDUMP, > > and use command macro SORT. [1] > > What is the use of all these macros? Back when we first added them in > the Satoshi day, they were actually useful. 'ls' vs. '${LS}' isn't. We > had MKDIR so that the '-p' option would be used. We had TAR because we > tried to support both {Open,Net}BSD and FreeBSD. > > I think we've forgotten the purpose of macros like these and just keep > adding them for command-line utils that have need to have them. These macros ensure that when building or running a port, you use exactly the executable you intend to. I think this reduces the amount of error reports due to some misconfiguration from the user. I find these macros quite useful myself, when patching a launcher shell script for instance (through sed magic or the nice new SUB_FILES feature). Indeed, it allows to enforce the use of an absolute path with no asumptions on the end-user configuration or PATH settings. That said, I admit there must be some cost to everything. Here I think of the CPU time cost to test if a macro is defined and then affect a value. And I don't know exactly whether this is cheap or not so I can't tell if these macros are worth it. My guess is that it's quite expensive when building INDEX file but probably not too much when building/installing a single port. Herve