cons-discuss
[Top][All Lists]
Advanced

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

Re: Extending cons


From: Johan Holmberg
Subject: Re: Extending cons
Date: Mon, 20 Nov 2000 16:50:10 +0100 (MET)

On Wed, 15 Nov 2000 address@hidden wrote:
> 
> Hi cons'ers,
> 
> I'd like to use cons as a tool for building software components
> in Philips. Each software component comes with a standardized makefile.
> A product could contain many components from different sources.
> 
[...]
> 
> So I'd like to extend cons so it can process with these components:
> - declare components
> - find where a component is.
> - determine build order.
> - build each component (generally by calling make).
> 
> I thus add a Construct file to each component, containing something like:
> 
> Component "comp1";
> UseComponent "comp2";
> UseComponent "comp3";
> 
> UseComponent indicates a dependency component, and should cause
> cons to read "comp2/Construct" etc, and add a build prerequisite to comp1.
> However, if a dependency component is a legacy component (has no Construct 
> file),
> I suggest this:
> UseComponent "legacy1", legacy=>1, command=>"gmake ...";
> 
> I value your comments on these ideas.
> 

As I understand it, you declare the dependencies between
"components" and then want to run "make" on each component in the
"right" order (and to *always* run all the makes, since only they
know if there is something to do in each component).

Isn't this just a topological sort ?
You could use the Graph::Directed-module to do it in Perl,
but do you really need cons ?

As long as you keep the Makefiles to build each component I
don't really see the benefit of starting to use cons.

The strength of cons is that it has a "global view" of
everything that can be built (in several directories for example).
If your Makefiles know how to build each component, what is there 
for cons to do ?

Or have I misunderstood your problem ?


> I also have been trying to implement it in cons 2.1.2, but get a bit confused.
> Is there any (internal) design documentation for cons?
> Especially how are build dependencies created?
> 

I'm afraid you have to read the code ....
(or ask specific question on this list)

/Johan Holmberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]