xen-org/xen-api-rpm-buildroot — pull request #73 by euanh (2013-06-07 13:57:11+00:00)
Title: Build: Add a script to generate a Makefile from specfile dependencies

'makemake.py' pulls dependency information out of the RPM spec files (specifically the 'BuildRequires' tag) and generates a Makefile which can then be used to build all the RPMs in dependency order.

This is a first cut! Known problems include:
* Make may not be the right tool for this - we may be better off handling the build tasks ourselves rather than generating a makefile. This might make it easier to spread the work out over a build cluster.
* The script generates naive rules for rpmbuild jobs which produce multiple targets. There's a risk that we either rebuild too much or not enough. See the dire warnings at: http://www.cmcrossroads.com/article/rules-multiple-outputs-gnu-make
* The script needs quite a bit of tidying up. We don't need to create a dict mapping spec_file_name -> spec; we should be able to generate all the dependency information in one pass; pylint still complains about variable naming issues.