[Monodevelop-devel] Adding project build dependencies in MD's makefiles

Lluis Sanchez Gual lluis at novell.com
Tue Nov 18 11:40:39 EST 2008


El dt 18 de 11 de 2008 a les 09:18 -0600, en/na Mike Kestner va
escriure:
> On Tue, 2008-11-18 at 09:54 -0500, Lluis Sanchez Gual wrote:
> >  
> > > There's potentially a larger issue, in that the MD makefiles are
> > > synchronized by MD itself, so the functionality which does this sync
> > > apparently does not currently support robust dependency checking for its
> > > output.  Regardless of whether the MD project wants to have robust
> > > dependency checking for project references, I suspect many of our users
> > > will want it.
> > 
> > No, that's unrelated. Makefile synchronization just keeps in sync lists
> > of files and references, but it does not decide what to do with those.
> > That's up to the makefile. 
> 
> So the sync code doesn't create make targets for project assemblies?
> And it doesn't update those targets at all after they are created?

Nope.

> That's surprising to me.  I thought we could create a valid Makefile for
> a project from scratch.  I also thought we created distribution tarballs
> which had automake based build systems.  All of the above scenarios
> would require make target dependency handling for project references.
> 

We do support that, but it is a different feature.

On one hand, we have a Makefile Generator. This generator takes a
solution and generates a set of makefiles and configuration files that
can be used to build the project. The generated build system can
optionally be based on Autotools. Notice that every time the makefiles
are generated, the previous ones are overwritten. The makefiles it
generates are good enough for the projects you can create with MD, but
they can fall short for complex projects with more complex build system
needs (but still, the generated makefiles can be a good starting point
for those projects). The makefile generator is also used by the
packaging add-in, when you create a Tarball package. 

In MD, we have used the generator in the past to generate some of the
makefiles in 'extras', which have later been modified and improved. We
can certainly improve the generator to support project dependencies.

On the other hand there is the Makefile Synchronization feature. Using
this feature, you can sync the file and references list of a project
with a makefile. But it is just a matter of updating lists. What the
makefile does with those lists is up to the makefile, and the
synchronizer just doesn't care. So you can have arbitrarily complex
makefiles, but still keep them synchronized with MD projects. You can of
course generate makefiles with the Generator, and then enable
synchronization.

In MD, we are using the makefile synchronizer to keep the makefiles up
to date. However, if we want to support project dependencies we have to
fix the makefiles, not the synchronizer.

I hope this clarifies things a bit.
Lluis.



More information about the Monodevelop-devel-list mailing list