Subject: Re: Alternative PLIST expansion of libtool archives
To: Todd Vierling <firstname.lastname@example.org>
From: Johnny C. Lam <jlam@NetBSD.org>
Date: 09/09/2004 14:32:25
On Wed, Sep 08, 2004 at 09:14:06PM -0400, Todd Vierling wrote:
> On Wed, 8 Sep 2004, Johnny C. Lam wrote:
> > (1) It uses the existing _PLIST_AWK_SCRIPT framework.
> > This is either good or bad depending on how one feels about the
> > _PLIST_AWK_SCRIPT framework :)
> The reasons I preferred an external script were that it can be run trivially
> by hand for debugging or external calls (very handy for external scripts),
> as well as being easier to maintain if and when libtool evolves in an
> incompatible way (different pkgsrc OS port, new libtool version, etc.).
Yes, I agree with what you say. I would actually rather see all of the
PLIST filtering done in an external script, since there isn't very much
reason to do it inline as we currently do in bsd.pkg.mk, and we may run
into variable length problems in make since the existing awk script is
machine-generated. It's something that I may tackle after we branch.
> That said, the only thing that made the script approach problematic, to me,
> was the fact that it did need the .la files in the Makefile; I didn't think
> about doing an awk callout as you did in the submitted patch (which could
> also work with the script version, right?).
Yes, we could encapsulate the awk callout in the external script, but
since the awk script is fixed, there isn't much benefit to having the
external script -- we can implement your idea without needing to add
anything extra to pkgsrc.
> BTW, one thing found on IRIX is that the .la files list the .so (no version)
> twice in the output, which needs to be made unique so as not to list the
> PLIST entry twice. I have been busy with a work deadline for this week and
> didn't get around to fixing that yet....
Yes, I handle this by capturing the output of the name expansion and
running it through "sort -u" to filter out duplicate names.
> > (2) It's not required that the libtool archives be explicitly
> > listed in LIBTOOL_LA_FILES in the package Makefiles.
> This is fine with me. I'd be happy for that to be automatic.
> > instead of duplicating the information in two separate places.
> Clarification: The transform-la script did indeed output the PLIST entry
> for the .la file too, so it wasn't in the PLIST template for my devel/rx
> testbed. However, if it were called out from _PLIST_AWK_SCRIPT as I
> proposed above, the .la entry could be moved from the Makefile to the PLIST
Yes, I think it'll be good to keep the PLIST as the master file list
instead of splitting off some bits into the package Makefile.
-- Johnny Lam <jlam@NetBSD.org>