Как собрать mono

Разработка на C# под linux

Цели

1) собрать mono из git по SHA1 (а не через make dist по меткам)
2) довести через autoconf tools параметр /p:Configuration:Debug

Как формируется версия mono?

Как формируется минорная версия пакета mono ?
которая видна в
mono -V
/usr/bin/mono -> mono-sgen
/usr/bin/mono-sgen
можем ли мы глядя на текст ebuild определить как создаётся mono-sgen или mono ?
mono-4.9.0.729.ebuild
mono собирается при помощи autotools
https://github.com/mono/mono/blob/master/configure.ac#L5
поэтому там используется макрос AC_INIT
It is permissible to use m4_esyscmd or m4_esyscmd_s for computing a version string that changes with every commit to a version control system (in fact, Autoconf does just that, for all builds of the development tree made between releases).
AC_PACKAGE_VERSION, PACKAGE_VERSION
AC_PACKAGE_STRING, PACKAGE_STRING
Exactly version.

it's an incrementing counter generated by mono's private CI system, which should be number-of-commits-since-configure.ac-was-changed

Как вообще посчитать число коммитов между двумя sha1:
http://stackoverflow.com/questions/31997999/number-of-commits-between-two-commitishes
git rev-list --count A..B

where is the script which does that? is it inside "make dist" ?
i think it's part of bockbuild...
# Use the following line in your configure.ac, so that $(VERSION) will
# automatically be up-to-date each time configure is run (and note that
# since configure.ac no longer includes a version string, Makefile rules
# should not depend on configure.ac for version updates).
#
# AC_INIT([GNU project],
#         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
#         [bug-project@example])
http://stackoverflow.com/questions/8215785/how-can-i-use-ac-revision-with-git

Сборка mono

Некоторые зависимости:
Submodule 'external/Lucene.Net.Light' (git://github.com/mono/Lucene.Net.Light.git) registered for path 'external/Lucene.Net.Light'
Submodule 'external/Newtonsoft.Json' (git://github.com/mono/Newtonsoft.Json.git) registered for path 'external/Newtonsoft.Json'
Submodule 'external/aspnetwebstack' (git://github.com/mono/aspnetwebstack.git) registered for path 'external/aspnetwebstack'
Submodule 'external/reference-assemblies' (git://github.com/mono/reference-assemblies.git) registered for path 'external/binary-reference-assemblies'
Submodule 'external/cecil' (git://github.com/mono/cecil.git) registered for path 'external/cecil'
Submodule 'external/debian-snapshot' (git://github.com/directhex/mono-snapshot.git) registered for path 'external/debian-snapshot'
Submodule 'external/ikdasm' (git://github.com/mono/ikdasm.git) registered for path 'external/ikdasm'
Submodule 'external/ikvm' (git://github.com/mono/ikvm-fork.git) registered for path 'external/ikvm'
https://github.com/gentoo/dotnet/issues/182
IKVM не собирается, что-то там не так с патчем (вероятно, что билд не работал никогда)
Submodule 'external/referencesource' (git://github.com/mono/referencesource) registered for path 'external/referencesource'
Submodule 'external/rx' (git://github.com/mono/rx.git) registered for path 'external/rx'

Пакетирование для NuGet

Иконка в .svg - https://github.com/mono/mono/blob/master/mcs/ScalableMonoIcon.svg
ScalableMonoIcon.svg