From owner-freebsd-ports@FreeBSD.ORG Fri Jan 21 12:51:27 2005 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1C4D16A4CE; Fri, 21 Jan 2005 12:51:26 +0000 (GMT) Received: from lakermmtao03.cox.net (lakermmtao03.cox.net [68.230.240.36]) by mx1.FreeBSD.org (Postfix) with ESMTP id 085F443D58; Fri, 21 Jan 2005 12:51:26 +0000 (GMT) (envelope-from conrads@cox.net) Received: from dolphin.local.net ([68.14.122.164]) by lakermmtao03.cox.net (InterMail vM.6.01.04.00 201-2131-117-20041022) with ESMTP id <20050121125124.QQAC2250.lakermmtao03.cox.net@dolphin.local.net>; Fri, 21 Jan 2005 07:51:24 -0500 Received: from dolphin.local.net (localhost.local.net [127.0.0.1]) by dolphin.local.net (8.13.1/8.13.1) with ESMTP id j0LCpFuF070771; Fri, 21 Jan 2005 06:51:16 -0600 (CST) (envelope-from conrads@cox.net) Date: Fri, 21 Jan 2005 06:51:10 -0600 From: "Conrad J. Sabatier" To: Edwin Groothuis Message-ID: <20050121065110.100b445f@dolphin.local.net> In-Reply-To: <20050119072607.GJ1033@k7.mavetju> References: <20050117131440.2486ac2a@dolphin.local.net> <41EC175F.8060805@tvog.net> <20050117225702.GA31708@xor.obsecurity.org> <20050119005427.70f7b3ac@dolphin.local.net> <20050119072607.GJ1033@k7.mavetju> X-Mailer: Sylpheed-Claws 1.0.0 (GTK+ 1.2.10; amd64-portbld-freebsd6.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: Frank Laszlo cc: freebsd-ports-bugs@freebsd.org cc: freebsd-ports@freebsd.org cc: Kris Kennaway Subject: Re: Bug in ports system's DISTFILES handling? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Jan 2005 12:51:27 -0000 On Wed, 19 Jan 2005 18:26:07 +1100, Edwin Groothuis wrote: > On Wed, Jan 19, 2005 at 12:54:27AM -0600, Conrad J. Sabatier wrote: > > This just seems less than intuitive, if you ask me, especially given > > that the += operator does work with other variables without > > requiring the explicit definition of an initial value first. > > Euhm... you need to keep a couple of things seperated: > > - The ports framework (bsd.port.mk) consists of two parts: > > - One to set the basic variables which are not directly port > related, for example OSVERSION, WANT_GNOME and LOCALBASE. > This is called "bsd.port.pre.mk". > > - One to set the basic variables which are directly port > related, for example LIB_DEPENDS and the pre/do/post targets. > This is called "bsd.port.post.mk". > > The definition of DISTFILES itself is defined in the second part. > Why? I don't know. It shouldn't have, because all the necessary > information to build DISTFILES (DISTNAME and EXTRACT_SUFX) are > defined in the "bsd.port.pre.mk" part. > > > I mean, if this were something that was consciously decided on, > > that's one thing, but the lack of consistency would seem to indicate > > that it's just not as well implemented as it could/should be. > > I wouldn't go that far. I don't think you're the first who steps > into this problem and goes "euhm... this doesn't make sense", but > I think you're the first who goes "euhm... guys! this doesn't make > sense!" > > For example see biology/garlic: > DISTFILES= ${DISTNAME}${EXTRACT_SUFX} > .if !defined(NOPORTDOCS) > DISTFILES+= ${DISTNAME}-doc${EXTRACT_SUFX} > .endif > > I won't say that > -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} > .if !defined(NOPORTDOCS) > DISTFILES+= ${DISTNAME}-doc${EXTRACT_SUFX} > .endif > should work, but I would say that: > -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} > +.include > .if !defined(NOPORTDOCS) > DISTFILES+= ${DISTNAME}-doc${EXTRACT_SUFX} > .endif > should work. > > Or even: > DISTFILES= ${DISTNAME}${EXTRACT_SUFX} > .if !defined(NOPORTDOCS) > +EXTRA_DISTFILES+=${DISTNAME}-doc${EXTRACT_SUFX} > .endif > which would work as EXTRA_PATCHES. > > Or to make it easiest of all: > -DISTFILES= ${DISTNAME}${EXTRACT_SUFX} > +DISTFILES= ${DEFAULTDISTFILE} > .if !defined(NOPORTDOCS) > DISTFILES+= ${DISTNAME}-doc${EXTRACT_SUFX} > .endif > and then DEFAULTDISTFILE is in the "bsd.port.pre.mk" defined. This > way it's easy to for the Makefile of chinese/xcin25: > DISTFILES= ${DEFAULTDISTFILE} > chewing-2002Jan07-snapshot.tar.gz > No confusion about things here. > > I would go for the last one, and volunteer to send patches when > there is some consensus. Yes, I like that last version, too. I say go for it. :-) -- Conrad J. Sabatier -- "In Unix veritas"