On 16 May, 2007, at 01:09, James Berry wrote:
        variant myvariant description "This variant does this and that" {
                configure.args-append   --do-this --do-that
        }


I'd love to get feedback both on the syntax. The syntax is a little bit different because it requires quoting of the description string -- something we don't often use in portfiles.

Technically, shouldn't it be unnecessary to do so? We can always guarantee that the final argument to `variants` is the body. If we require that the `description` come after `conflicts` and `depends` statements, then don't we have a well defined slice of `args` that we can take?

Not that I would advocate this; I don't find the result readable, and it wouldn't trigger any sort of syntax-highlighting:

        variant myvariant description This variant does this and that {
                configure.args-append   --do-this --do-that
        }


Inlined descriptions are obviously the neatest solution, but I suppose the "cleanest" way to do it would be to spawn a specialized interp with the appropriate description function and `proc unknown {args} {}`... which is not clean, though fairly short, code-wise :)


Chris

Attachment: PGP.sig
Description: This is a digitally signed message part

_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo/macports-dev

Reply via email to