Subject: Re: Makefiles or So Many Ways Of Getting Package Versions
To: Randy Beaudreault <>
From: Julio M. Merino Vidal <>
List: tech-pkg
Date: 09/30/2003 21:54:25
On Tue, 30 Sep 2003 12:44:31 -0700
Randy Beaudreault <> wrote:

> Why are there the great variety of ways of setting up Makefiles in 
> pkgsrc?  I'm attempting to make a FinkCommander-style app for pkgsrc 
> on OS X and the first thing I want to do is get all the versions of 
> the packages in pkgsrc.  I started this thinking this shouldn't be so 
> hard, just write a shell or Perl script to parse the Makefiles in 
> each package directory thinking that I should only have to parse the 
> Makefiles in, at most, 3 or 4 ways.  Nope, I'm up to 4 ways in my 
> Perl script, not counting what I'll be using to get the versions of 
> Perl, and these are just the most common ways.  Why do we have so 
> many different ways of setting the package revision?  Isn't there a 
> standard way that package versions should be set up in the Makefiles? 
> I'm attaching my Perl script that does this version parsing to show 
> you the 4 ways I've identified so far that I have to parse the 
> Makefiles to grap the package version.


	$ cd ...../category/package
	$ make show-var VARNAME=PKGVERSION

Julio M. Merino Vidal <>
The NetBSD Project -