From owner-cvs-ports@FreeBSD.ORG Mon Jun 6 06:07:23 2011 Return-Path: Delivered-To: cvs-ports@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 84A05106564A; Mon, 6 Jun 2011 06:07:23 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 65-241-43-5.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 36AA015FA1B; Mon, 6 Jun 2011 06:07:22 +0000 (UTC) Message-ID: <4DEC6E99.7020400@FreeBSD.org> Date: Sun, 05 Jun 2011 23:07:21 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110429 Thunderbird/3.1.10 MIME-Version: 1.0 To: Baptiste Daroussin References: <201106060553.p565rpOi094889@repoman.freebsd.org> In-Reply-To: <201106060553.p565rpOi094889@repoman.freebsd.org> X-Enigmail-Version: 1.1.2 OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: cvs-ports@FreeBSD.org, cvs-all@FreeBSD.org, ports-committers@FreeBSD.org Subject: Re: cvs commit: ports/Mk bsd.port.mk X-BeenThere: cvs-ports@freebsd.org X-Mailman-Version: 2.1.5 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, 06 Jun 2011 06:07:23 -0000 I think the following is a nice optimization, but I'm confused as to why we need to check this at all: check-categories: .for cat in ${CATEGORIES} - @if ${ECHO_CMD} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; then \ - ${TRUE}; \ - else \ - ${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ - ${FALSE}; \ - fi +. if empty(VALID_CATEGORIES:M${cat}) + @${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list of valid categories."; \ + ${FALSE}; +. endif .endfor .endif On the one hand, I don't think bsd.port.mk is the place for this. The other problem is that if you're creating local ports (e.g., /usr/ports/local/foo) you then have to play silly buggers in the port's Makefile, adding "VALID_CATEGORIES+= local" which just seems pointless to me. Is this such a huge problem that we need to check this on every port build? Doug On 06/05/2011 22:53, Baptiste Daroussin wrote: > bapt 2011-06-06 05:53:51 UTC > > FreeBSD ports repository > > Modified files: > Mk bsd.port.mk > Log: > - remove some old code (unsused on supported OS) [1] > - prevent some useless external program call (based on [2]) > - simplify (in)valid category detection > > PR: ports/155629 [1], ports/65804 [2], ports/157273 [3] http://www.FreeBSD.org/cgi/query-pr.cgi?pr=155629 > Submitted by: Eitan Adler [1], green@ [2], bapt@ (myself) [2] > Exp-runs by: pav@ > > Revision Changes Path > 1.684 +13 -28 ports/Mk/bsd.port.mk > > http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff?&r1=1.683&r2=1.684&f=h > -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/