Subject: Re: Rework of the fetch target (was: CVS commit: pkgsrc/mk)
To: Bernd Ernesti <netbsd@arresum.inka.de>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-pkg
Date: 01/27/2002 11:01:38
On Sun, 27 Jan 2002, Bernd Ernesti wrote:

> I am not exactly sure that it is this change, but doing a make fetch-list
> is now a real mess.

I noticed that too. I didn't think anyone else cared, as the result
was never particularly pretty. The _FETCH_FILE macro is unchanged.

"make fetch-list | tr ';' '\012'" is a little better, but it's still
not properly and clearly formatted for humans.

It would be pretty easy to add the above to the target. To do better,
there needs to be a way to distinguish the tabs at the end of the
continued lines from the tabs at the beginning. Changing the style of
the relevant areas in bsd.pkg.mk, to put the backslash right after the
semi-colon, would help. There are other possibilities -- embedding a
marker which can be expanded to a new line, or maybe implementing a
little pretty-printer, in awk, which keeps track of the level of
statement nesting, but I'm not sure how far we want to go with this.

> Even if have the distfile, you see this kind of output, which makes it
> impossible to see which distfiles you need to get:

Actually, if that's all you want,

    make show-var VARNAME=_ALLFILES

should do. Even better,

    make show-var VARNAME=_ALLFILES | tr ' ' '\012'

Maybe people would like a target that just does that, lists the files.
What would you call it?

Frederick