cons-discuss
[Top][All Lists]
Advanced

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

Extending cons


From: wouter . batelaan
Subject: Extending cons
Date: Wed, 15 Nov 2000 16:01:18 +0100

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.

At the moment we haven't got a tool which sits over these makefiles
and sequences builds using these makefiles.
(It's to big a job (currently) trying to convert the makefiles to Construct 
files).
Of course I could write a makefile which does this, but I like Perl, cons
and programming!
I also want to sneak cons 'in the door', so that we could incrementally
convert makefiles to Construct files.

Another issue is that the relative and absolute locations of component
directories are undefined, generally speaking. 
Ideally I'd like to define a COMPPATH variable which is a component
(directory) search list (like a linker LDPATH).

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.

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?

Regards,

-- Wouter Batelaan                     mailto:address@hidden
System Laboratory /  Philips Semiconductors
Second Avenue / Millbrook Ind. Estate/ Southampton SO15 0DJ / England
 tel:+44-23-80 312615   fax:+44-23-80 316303



reply via email to

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