svn commit: r435456 - in head: comms/wy60 deskutils/gbirthday devel/arduino-builder devel/cityhash devel/google-gdata devel/monodevelop emulators/citra games/openomf security/ssh-vault

Kyle Evans bsdports at kyle-evans.net
Mon Mar 20 19:29:29 UTC 2017


On Mon, Mar 20, 2017 at 1:38 PM, Mathieu Arnold <mat at freebsd.org> wrote:
>
> TL:DR; You should never use GH_ACCOUNT/GH_PROJECT/GH_TAGNAME in
> GH_SUBDIR because they get messed up with during processing.
>
> When reading the following, you may want to read Mk/bsd.sites.mk,
> starting around line 400.
>
> The default values of the GH_(ACCOUNT|PROJECT|TAGNAME) variables have an
> implied :DEFAULT group, which is the default group. So, when you write:
>
> GH_ACCOUNT= foo
>
> it ends up being:
>
> GH_ACCOUNT= foo:DEFAULT
>
> It is building on top of multiple distfiles feature explained here:
> https://www.freebsd.org/doc/en/books/porters-handbook/makefile-distfiles.html#porting-master-sites-n
>
> They can contain multiple values, and in fact, GH_TUPLE is only a
> syntastic sugar on top of them, so, when GH_TUPLE is processed, its
> content is hammered and sawed to fit into them.
>
> Then, for each group variables get filled in, so, if you have
>
> GH_ACCOUNT= foo bar:extra
>
> it'll generate
>
> GH_ACCOUNT_DEFAULT= foo
> GH_ACCOUNT_extra= bar
>
> and if you write:
>
> GH_ACCOUNT= foo
> GH_TUPLE= bar:bar:v1.0:extra/bar
>
> At one point, GH_ACCOUNT will contain "foo bar:extra" and then the same
> two variables describe above will be filled.
>

Excellent! Thank you for that explanation -- that makes a lot more
sense. It wasn't immediately obvious to me while looking at things how
GH_ACCOUNT could get clobbered, I wasn't thinking of (or looking for)
this kind of magic. Duly noted.

Thanks,

Kyle Evans


More information about the svn-ports-all mailing list