tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Go packages with many dependencies



Am 14. August 2018 11:45:44 MESZ schrieb Jonathan Perkin <jperkin%joyent.com@localhost>:
>I wrote a small bit of infrastructure to go-package.mk that allows you
>to specify these dependencies in a package Makefile and will add them
>as additional DISTFILES to be built within the package.
>
>  https://gist.github.com/jperkin/e55797d996e07c460e07b8ffc4c71b1a

I like it.

>GO_GITHUB_DEPS+=
>collectd/go-collectd=collectd.org:2ce144541b8903101fb8f1483cc0497a68798122

What about this variant:

GO_DEPS+= github.com/user/repo:sha1:dir

I moved the GitHub into the variable value, to have more lowercase letters and because it matches the Godeps file.

I moved the :dir to the end, so that the three fields are in chronological order: where from, what exactly, where to. And to have the optional field at the end.

I prefer a uniform field separator. Isn't there some Make feature to access the n'th word of a variable? Like ${dep:S,:, ,g:[2]}? I think it's easier to read than the :C modifier.

Best,
Roland


Home | Main Index | Thread Index | Old Index