Subject: Re: WRKSRC's position in Makefiles, and pkglint
To: None <tech-pkg@netbsd.org>
From: Alistair Crooks <agc@pkgsrc.org>
List: tech-pkg
Date: 01/19/2004 11:06:51
On Mon, Jan 19, 2004 at 11:31:58AM +0100, Thomas Klausner wrote:
> > I believe strongly that the WRKSRC definition really belongs in the
> > build information, and that the first paragraph should be reserved for
> > detailing the location of any distfiles, and pertinent information to
> > them.
> 
> Since the WRKSRC is a property of the distfile and changes with
> it, it seems that even following your argument it belongs in the
> first section.

No, the first section has to do with the variables I listed:

DISTNAME
PKGNAME
SVR4_PKGNAME
CATEGORIES
MASTER_SITES
MASTER_SITE_SUBDIR
EXTRACT_SUFX DISTFILES

i.e. the categories for the package, where the distfiles are located,
and what the distfiles are called.

WRKSRC is the name of the directory in the build area on a local
machine where files will get extracted to, and built from.  WRKSRC is
not a property of the distfile - I would bet that 99% of all of the
distfiles in pkgsrc have no idea what a "WRKSRC" is.  Rather, WRKSRC
derives its name from DISTNAME by default, but that is absolutely no
reason to put WRKSRC beside DISTNAME.

Additionally, the standard definition of WRKSRC in bsd.pkg.mk is
${WRKDIR}/${DISTNAME}.  The definitions of WRKSRC that I see in pkgsrc
Makefiles are for the exception to this rule, i.e. where the DISTNAME
is not normally part of the ${WRKSRC}.  So why should WRKSRC be next
to DISTNAME for these exceptions?

I really do not want the WRKSRC definition cluttering up the most
important information at the top of the pkgsrc makefile.

Regards,
Alistair
--
Alistair Crooks <agc@pkgsrc.org>